From 9e82712be966734c6737fc940dbfd923469e6762 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Fri, 2 Jul 2021 12:28:08 +1200 Subject: [PATCH 1/2] feat(landing): include version in landing page --- packages/landing/src/config.ts | 3 +++ packages/landing/src/ui.ts | 4 ++++ packages/landing/static/index.css | 8 ++++++-- packages/landing/static/index.html | 7 +++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/landing/src/config.ts b/packages/landing/src/config.ts index 08e9c436a..df1a1ea70 100644 --- a/packages/landing/src/config.ts +++ b/packages/landing/src/config.ts @@ -11,6 +11,9 @@ export const Config = { get GoogleAnalytics(): string { return process.env.GOOGLE_ANALYTICS ?? ''; }, + get Version(): string { + return process.env.GIT_VERSION ?? ''; + }, }; // Inject google analytics after everything has loaded diff --git a/packages/landing/src/ui.ts b/packages/landing/src/ui.ts index 6c4453304..8700f2c7c 100644 --- a/packages/landing/src/ui.ts +++ b/packages/landing/src/ui.ts @@ -20,6 +20,10 @@ export class BasemapsUi { constructor(basemaps: Basemaps) { this.basemaps = basemaps; + + const versionEl = document.getElementById('basemaps-version'); + if (versionEl) versionEl.innerText = Config.Version; + this.bindMenuButton(); this.bindProjectionButtons(); this.bindApiLinks(); diff --git a/packages/landing/static/index.css b/packages/landing/static/index.css index 659bf7e29..d52d0bf08 100644 --- a/packages/landing/static/index.css +++ b/packages/landing/static/index.css @@ -69,6 +69,9 @@ button { margin-top:4px; margin-bottom:4px; } +label { + margin-top:8px; +} .align-center { align-items: center; @@ -94,6 +97,8 @@ button { overflow-x: hidden; padding: 16px; transition: right 0.5s; + display: flex; + flex-direction: column; } #side-nav > h3 { @@ -144,7 +149,7 @@ button { .info-links li { border-bottom: 1px solid #eaeaea; - padding: 8px 8px; + padding: 8px 16px; margin: 0; } @@ -165,7 +170,6 @@ button { position: relative; } - .lui-standard-form .lui-form-icon.lui-form-icon--right input:not([type='checkbox']):not([type='radio']), .lui-standard-form .lui-form-icon.lui-form-icon--right textarea, .lui-standard-form .lui-form-icon.lui-form-icon--right select { diff --git a/packages/landing/static/index.html b/packages/landing/static/index.html index 4f79e8f20..565e3e8e3 100644 --- a/packages/landing/static/index.html +++ b/packages/landing/static/index.html @@ -144,7 +144,14 @@
About Basemaps
+
  • + + Version $GIT_VERSION + launch + +
  • + $JS_FILE From e6e1d35b3457d72ae37756d57d4929f29a0c8ea2 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Fri, 2 Jul 2021 12:41:16 +1200 Subject: [PATCH 2/2] fix(landing): overflow attribution text with ... --- packages/landing/static/index.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/landing/static/index.css b/packages/landing/static/index.css index d52d0bf08..787fab1d3 100644 --- a/packages/landing/static/index.css +++ b/packages/landing/static/index.css @@ -69,6 +69,7 @@ button { margin-top:4px; margin-bottom:4px; } + label { margin-top:8px; } @@ -217,3 +218,14 @@ label { visibility: hidden; transition: 0.5s; } + + +.mapboxgl-ctrl-attrib { + max-width: 100vw; +} +.mapboxgl-ctrl-attrib-inner { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + text-align: right; +} \ No newline at end of file