diff --git a/CHANGELOG.md b/CHANGELOG.md index cee1cae9..44fd708a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.19.0](https://github.com/adobe/helix-importer-ui/compare/v1.18.0...v1.19.0) (2022-11-23) + + +### Features + +* show project name and version ([#58](https://github.com/adobe/helix-importer-ui/issues/58)) ([74239cf](https://github.com/adobe/helix-importer-ui/commit/74239cfb6fd30f58aa63d8edcb088fbb4b553e33)) + # [1.18.0](https://github.com/adobe/helix-importer-ui/compare/v1.17.3...v1.18.0) (2022-11-23) diff --git a/css/styles.css b/css/styles.css index 6774508d..f61db428 100644 --- a/css/styles.css +++ b/css/styles.css @@ -93,9 +93,17 @@ footer { padding: 24px; } +footer a { + text-decoration: none; + color: var(--spectrum-global-color-gray-800); +} + footer svg { height: 24px; fill: var(--spectrum-global-color-gray-300); + vertical-align: middle; + margin-right: 6px; + margin-left: 12px; } /* MAIN */ diff --git a/js/script.js b/js/script.js index dc2a4739..1d29cb5e 100644 --- a/js/script.js +++ b/js/script.js @@ -1,4 +1,5 @@ const SIDENAV_ITEMS = document.querySelectorAll('sp-sidenav-item'); +const GITHUB_LINK = document.querySelector('a.footer'); function updateSectionView(e) { const value = e.target?.getAttribute('value'); @@ -11,3 +12,11 @@ function updateSectionView(e) { SIDENAV_ITEMS?.forEach((item) => { item.addEventListener('click', updateSectionView); }); + +async function updateVersion() { + const res = await fetch('./package.json'); + const json = await res.json(); + GITHUB_LINK.innerHTML += `${json.name}@${json.version}`; +} + +updateVersion(); diff --git a/package-lock.json b/package-lock.json index bcf3b2a8..82d91177 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "helix-import-ui", - "version": "1.18.0", + "version": "1.19.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "helix-import-ui", - "version": "1.18.0", + "version": "1.19.0", "dependencies": { "@adobe/helix-importer": "2.3.0", "@adobe/mdast-util-gridtables": "1.0.3", diff --git a/package.json b/package.json index 6600f9f4..6b275cdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "helix-import-ui", - "version": "1.18.0", + "version": "1.19.0", "description": "helix-import-ui", "type": "module", "scripts": {