diff --git a/ui/locales/app.de.json b/ui/locales/app.de.json index 8976af170..c5bd92bf6 100644 --- a/ui/locales/app.de.json +++ b/ui/locales/app.de.json @@ -1,4 +1,9 @@ { + "menu_layers": "Angezeigte Daten", + "menu_tools": "Werkzeuge", + "menu_share": "Teilen", + "menu_projects": "Projekte", + "menu_settings": "Einstellungen", "app_cancel_btn_label": "Abbrechen", "by": "von", "cam_configuration_header": "Kamera-Einstellungen", @@ -92,7 +97,7 @@ "dtd_zoom_to": "Heranzoomen", "duplicate_to_project": "Zu Projekt duplizieren", "edit_project": "Projekt bearbeiten", - "header_search_placeholder": "Suche...", + "header_search_placeholder": "Suche nach...", "lsb_cesium_toolbar_label": "Cesium-Toolbar", "lsb_debug_tools": "Debugtools", "lsb_settings": "Einstellungen", diff --git a/ui/locales/app.en.json b/ui/locales/app.en.json index e7a72090d..46f09e0bb 100644 --- a/ui/locales/app.en.json +++ b/ui/locales/app.en.json @@ -1,4 +1,9 @@ { + "menu_layers": "Angezeigte Daten", + "menu_tools": "Werkzeuge", + "menu_share": "Teilen", + "menu_projects": "Projekte", + "menu_settings": "Einstellungen", "app_cancel_btn_label": "Cancel", "by": "by", "cam_configuration_header": "Camera configuration", @@ -92,7 +97,7 @@ "dtd_zoom_to": "Zoom to", "duplicate_to_project": "Duplicate to my projects", "edit_project": "Edit project", - "header_search_placeholder": "Search...", + "header_search_placeholder": "Search by...", "lsb_cesium_toolbar_label": "Cesium Toolbar", "lsb_debug_tools": "Debug tools", "lsb_settings": "Settings", diff --git a/ui/locales/app.fr.json b/ui/locales/app.fr.json index 182704e46..b071d1f2d 100644 --- a/ui/locales/app.fr.json +++ b/ui/locales/app.fr.json @@ -1,4 +1,9 @@ { + "menu_layers": "Données Affichées", + "menu_tools": "Outils", + "menu_share": "Partager", + "menu_projects": "Projets", + "menu_settings": "Paramètres", "app_cancel_btn_label": "Annuler", "by": "de", "cam_configuration_header": "Configuration de la caméra", @@ -92,7 +97,7 @@ "dtd_zoom_to": "Zoom sur", "duplicate_to_project": "Dupliquer comme projet", "edit_project": "Editer projet", - "header_search_placeholder": "Recherche...", + "header_search_placeholder": "Recherche par...", "lsb_cesium_toolbar_label": "Cesium Toolbar", "lsb_debug_tools": "Debug tools", "lsb_settings": "Paramètres", diff --git a/ui/locales/app.it.json b/ui/locales/app.it.json index 5f6ef7bfc..ee58a5699 100644 --- a/ui/locales/app.it.json +++ b/ui/locales/app.it.json @@ -1,4 +1,9 @@ { + "menu_layers": "Dati Visualizzati", + "menu_tools": "Strumenti", + "menu_share": "Condividi", + "menu_projects": "Progetti", + "menu_settings": "Impostazioni", "app_cancel_btn_label": "Cancellare", "by": "di", "cam_configuration_header": "Configurazione della camera", @@ -92,7 +97,7 @@ "dtd_zoom_to": "Zoom su", "duplicate_to_project": "Duplicare nei progetti", "edit_project": "Editare progetto", - "header_search_placeholder": "Ricercare...", + "header_search_placeholder": "Ricercare per...", "lsb_cesium_toolbar_label": "Cesium Toolbar", "lsb_debug_tools": "Debug tools", "lsb_settings": "Impostazioni", diff --git a/ui/src/components/search/search-input.ts b/ui/src/components/search/search-input.ts index 4b243a2ea..05937a9aa 100644 --- a/ui/src/components/search/search-input.ts +++ b/ui/src/components/search/search-input.ts @@ -79,8 +79,8 @@ export class SearchInput extends LitElementI18n { - - + + `; protected updated(changedProperties: PropertyValues): void { @@ -394,9 +394,9 @@ export class SearchInput extends LitElementI18n { align-self: center; flex: 2; - --padding-h: 1rem; - --padding-v: 1rem; - --icon-size: 24px; + --padding-h: 12px; + --padding-v: 6px; + --icon-size: 20px; } :host { @@ -410,9 +410,9 @@ export class SearchInput extends LitElementI18n { @media (width >= 700px) { :host { position: relative; - height: calc(var(--ngm-header-height) - var(--header-padding-v) * 2); - min-width: 260px; - max-width: 496px; + height: 56px; + width: 500px; + max-width: 500px; } } @@ -432,10 +432,9 @@ export class SearchInput extends LitElementI18n { @media (min-width: 700px) { ga-search, :host(:not(.is-active)) ga-search { display: flex; - min-width: 260px; - max-width: 496px; + width: 500px; + max-width: 500px; z-index: auto; - margin-left: 100px; } } @@ -448,40 +447,23 @@ export class SearchInput extends LitElementI18n { font-family: var(--font); font-size: 1rem; + line-height: 24px; + letter-spacing: calc(1rem * 0.001); flex: 1; width: 100%; height: 100%; - padding: var(--padding-v) calc(var(--padding-v) * 2 + var(--icon-size)) var(--padding-v) var(--padding-h); + padding: var(--padding-v) var(--padding-h) var(--padding-v) calc(var(--padding-h) * 2 + var(--icon-size)); - border: 2px solid transparent; - border-radius: 4px; - } - - input:hover { - background-color: var(--color-bg); - } - - input:focus { - background-color: var(--color-highlight); - } - - input:focus, input:hover { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-color: transparent; - border-bottom-color: var(--color-highlight--dark); + border: none; + border-bottom: 2px solid var(--color-main); + border-radius: 6px; } input::placeholder { color: var(--color-bg-contrast); } - input:focus::placeholder { - color: var(--color-bg-contrast--lighter); - opacity: 1; - } - input::-webkit-search-decoration, input::-webkit-search-cancel-button, input::-webkit-search-results-button, @@ -504,8 +486,8 @@ export class SearchInput extends LitElementI18n { text-align: left; font-family: var(--font); font-size: 1rem; - line-height: 1.5rem; - letter-spacing: 0.16px; + line-height: 24px; + letter-spacing: calc(1rem * 0.001); } ul > li { @@ -545,45 +527,37 @@ export class SearchInput extends LitElementI18n { } /* icon */ - - .icon { + ngm-icon { width: var(--icon-size); height: var(--icon-size); - mask: var(--icon, none) no-repeat center; - -webkit-mask: var(--icon, none) no-repeat center; - background-color: var(--color-highlight--darker); + color: var(--color-bg-contrast); position: absolute; - right: var(--padding-h); + left: var(--padding-h); top: 0; bottom: 0; margin: auto; cursor: pointer; } - .icon.is-close { - --icon: url('./images/i_close.svg'); + ngm-icon[icon="close"] { right: calc(var(--padding-h) + 54px) } - .icon.is-search { - --icon: url('./images/icon_search.svg'); - } - - :host(.is-active) .icon.is-search { + :host(.is-active) ngm-icon[icon="search"] { color: var(--color-highlight); } - ga-search:has(input:placeholder-shown) ~ .icon.is-close { + ga-search:has(input:placeholder-shown) ~ ngm-icon[icon="close"] { display: none; } @media (min-width: 700px) { - .icon.is-close { - right: var(--padding-h); + ngm-icon[icon="close"] { + display: none; } - ga-search:has(input:not(:placeholder-shown)) ~ .icon.is-search { + ga-search:has(input:not(:placeholder-shown)) ~ ngm-icon[icon="search"] { display: none; } } diff --git a/ui/src/elements/ngm-auth.ts b/ui/src/elements/ngm-auth.ts index d5726ac93..7e9eb5dad 100644 --- a/ui/src/elements/ngm-auth.ts +++ b/ui/src/elements/ngm-auth.ts @@ -1,13 +1,13 @@ -import {html} from 'lit'; +import {css, html} from 'lit'; import type {AuthUser} from '../authService'; import AuthService from '../authService'; import {LitElementI18n} from '../i18n.js'; import auth from '../store/auth'; -import {classMap} from 'lit/directives/class-map.js'; import {customElement, property, state} from 'lit/decorators.js'; import DashboardStore from '../store/dashboard'; import {consume} from '@lit/context'; import {authServiceContext} from '../context'; +import './shared/ngm-icon'; /** * Authentication component @@ -61,16 +61,28 @@ export class NgmAuth extends LitElementI18n { this.authService.logout(); } - render() { - return html` -
-
-
`; - } + readonly render = () => html` +
+ +
+ `; - createRenderRoot() { - // no shadow dom - return this; - } + static readonly styles = css` + div { + color: var(--color-bg); + background-color: var(--color-main); + width: 36px; + height: 36px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + + ngm-icon { + width: 20px; + height: 20px; + } + `; } diff --git a/ui/src/elements/ngm-cursor-information.ts b/ui/src/elements/ngm-cursor-information.ts index ec909c66c..3419f6102 100644 --- a/ui/src/elements/ngm-cursor-information.ts +++ b/ui/src/elements/ngm-cursor-information.ts @@ -1,4 +1,4 @@ -import {html} from 'lit'; +import {css, html} from 'lit'; import i18next from 'i18next'; import {LitElementI18n} from '../i18n.js'; import type {Viewer} from 'cesium'; @@ -73,23 +73,62 @@ export class NgmCursorInformation extends LitElementI18n { render() { if (!this.coordinates || this.height === undefined) return ''; return html` -
- - - +
+ + + +
+
+
+ ${this.showTerrainHeight ? i18next.t('nav_terrain_height_label') : i18next.t('nav_object_height_label')}
-
-
- ${this.showTerrainHeight ? i18next.t('nav_terrain_height_label') : i18next.t('nav_object_height_label')} -
-
- ${this.height !== undefined && this.integerFormat.format(this.height)} m -
+
+ ${this.height !== undefined && this.integerFormat.format(this.height)} m
- `; +
+ `; } - createRenderRoot() { - return this; - } + + static readonly styles = css` + :host { + min-width: 0; + } + + .ngm-nci-height, + .ngm-nci-position { + display: none; + } + + @media (min-width: 1200px) { + :host .ngm-nci-value { + font-weight: 600; + min-width: 75px; + } + + .ngm-nci-position { + display: unset; + width: 83px; + margin-right: 20px; + } + + .ngm-nci-height { + display: flex; + flex-direction: column; + white-space: nowrap; + margin-right: 10px; + } + + :host { + flex-wrap: wrap; + align-self: center; + color: #212529; + text-align: left; + font: normal normal normal 14px/20px Inter, sans-serif; + letter-spacing: 0; + min-width: 255px; + padding-right:48px + } + } + `; } diff --git a/ui/src/elements/ngm-side-bar.ts b/ui/src/elements/ngm-side-bar.ts index 2358a7a63..56c36bf6e 100644 --- a/ui/src/elements/ngm-side-bar.ts +++ b/ui/src/elements/ngm-side-bar.ts @@ -4,6 +4,8 @@ import '../toolbox/ngm-toolbox'; import '../layers/ngm-layers'; import '../layers/ngm-layers-sort'; import './dashboard/ngm-dashboard'; +import './sidebar/ngm-menu-item'; +import './shared/ngm-icon'; import '../components/navigation/navigation-layer-panel'; import LayersActions from '../layers/LayersActions'; import {DEFAULT_LAYER_OPACITY, LayerType} from '../constants'; @@ -181,10 +183,20 @@ export class SideBar extends LitElementI18n { }); const sliceOptions = getSliceParam(); - if (sliceOptions && sliceOptions.type && sliceOptions.slicePoints) + if (sliceOptions?.type && sliceOptions.slicePoints) this.activePanel = 'tools'; } + private readonly renderMenuItem = (icon: string, title: string, panel: string) => html` + this.togglePanel(panel)} + > + `; + render() { if (!this.queryManager) { return ''; @@ -193,16 +205,17 @@ export class SideBar extends LitElementI18n { this.queryManager.activeLayers = this.activeLayers .filter(config => config.visible && !config.noQuery); - const shareBtn = html` - `; - const settingsBtn = html` -
this.togglePanel('settings')}> -
-
`; + + const layerBtn = this.renderMenuItem('layer', 'menu_layers', 'data'); + const toolsBtn = this.renderMenuItem('tools', 'menu_tools', 'tools'); + const projectsBtn = this.renderMenuItem('projects', 'menu_projects', 'dashboard'); + const shareBtn = this.renderMenuItem('share', 'menu_share', 'share'); + const settingsBtn = this.renderMenuItem('config', 'menu_settings', 'settings'); + const mobileExpandBtn = html` + this.mobileShowAll = !this.mobileShowAll} + >`; return html`
@@ -212,31 +225,15 @@ export class SideBar extends LitElementI18n {
-
-
-
this.togglePanel('dashboard')}> -
-
-
this.togglePanel('data')}> -
-
-
this.togglePanel('tools', false)}> -
-
+
+
+ ${layerBtn} + ${toolsBtn} ${!this.mobileView ? shareBtn : ''} -
this.mobileShowAll = !this.mobileShowAll}> -
-
+ ${projectsBtn} + ${this.mobileView ? mobileExpandBtn : ''}
-
+
${settingsBtn}
@@ -300,7 +297,6 @@ export class SideBar extends LitElementI18n { return; } this.activePanel = panelName; - // if (this.activePanel === 'data' && !this.mobileView) this.hideDataDisplayed = false; } async syncActiveLayers() { @@ -417,7 +413,7 @@ export class SideBar extends LitElementI18n { if (panelElement) { for (let i = 0; i < panelElement.childElementCount; i++) { const element = panelElement.children.item(i); - if (element && element.classList.contains('accordion')) { + if (element?.classList.contains('accordion')) { $(element).accordion({duration: 150}); } } @@ -559,7 +555,7 @@ export class SideBar extends LitElementI18n { if (zoomToPosition) { let altitude = 0, cartesianPosition: Cartesian3 | undefined, windowPosition: Cartesian2 | undefined; const updateValues = () => { - altitude = this.viewer!.scene.globe.getHeight(this.viewer!.scene.camera.positionCartographic) || 0; + altitude = this.viewer!.scene.globe.getHeight(this.viewer!.scene.camera.positionCartographic) ?? 0; cartesianPosition = Cartesian3.fromDegrees(zoomToPosition.longitude, zoomToPosition.latitude, zoomToPosition.height + altitude); windowPosition = this.viewer!.scene.cartesianToCanvasCoordinates(cartesianPosition); }; diff --git a/ui/src/elements/shared/ngm-icon.ts b/ui/src/elements/shared/ngm-icon.ts new file mode 100644 index 000000000..f369a816e --- /dev/null +++ b/ui/src/elements/shared/ngm-icon.ts @@ -0,0 +1,25 @@ +import {customElement, property} from 'lit/decorators.js'; +import {css, html, LitElement} from 'lit'; +import {IconKey, icons} from '../../icons/icons'; + +@customElement('ngm-icon') +export class Icon extends LitElement { + @property() + accessor icon: IconKey = 'config'; + + render() { + return html`${icons[this.icon]}`; + } + + static readonly styles = css` + :host { + width: 24px; + height: 24px; + } + + svg { + width: 100%; + height: 100%; + } + `; +} diff --git a/ui/src/elements/sidebar/ngm-menu-item.ts b/ui/src/elements/sidebar/ngm-menu-item.ts new file mode 100644 index 000000000..c66a458e1 --- /dev/null +++ b/ui/src/elements/sidebar/ngm-menu-item.ts @@ -0,0 +1,119 @@ +import {customElement, property} from 'lit/decorators.js'; +import {LitElementI18n} from '../../i18n.js'; +import {css, html} from 'lit'; +import {classMap} from 'lit/directives/class-map.js'; +import {IconKey} from '../../icons/icons'; +import i18next from 'i18next'; +import '../shared/ngm-icon'; + + +@customElement('ngm-menu-item') +export class MenuItem extends LitElementI18n { + @property({type: String}) + accessor title: string = ''; + @property() + accessor icon: IconKey = 'config'; + @property({type: Boolean, attribute: 'isactive', reflect: true}) + accessor isActive: boolean = false; + @property({type: Boolean}) + accessor isMobile: boolean = false; + + static readonly styles = css` + :host { + position: relative; + width: 68px; + height: 58px; + display: flex; + justify-content: center; + align-items: center; + color: var(--color-main); + padding-inline: 5px; + z-index: 10; + } + + :host > .container { + position: relative; + text-decoration: none; + width: 100%; + height: 100%; + cursor: pointer; + } + + .container .box { + position: absolute; + width: 58px; + min-width: 58px; + left: 0; + top: 9px; + height: 40px; + display: flex; + justify-content: flex-start; + align-items: center; + border-radius: 4px; + background-color: transparent; + color: var(--color-main); + transition: ease-out 100ms; + transition-property: color, background-color; + } + + .container .box > .icon { + display: flex; + justify-content: center; + align-items: center; + min-width: 58px; + height: 40px; + color: var(--color-main); + } + + .container .box > .title { + transform: scaleX(0); + transition: ease-out 100ms; + transition-property: transform; + transform-origin: left; + } + + .container:hover .box { + background-color: var(--color-main); + color: var(--color-bg); + width: unset; + white-space: nowrap; + } + + .container:hover .box > .title { + transform: scaleX(1); + } + + .container:hover .box .icon { + color: var(--color-bg); + } + + @media (min-width: 599px) { + .container:hover .box { + padding-right: 22px; + } + } + + :host([isactive]) .container .box { + background-color: var(--color-active); + } + + :host([isactive]) .container .box .icon { + color: var(--color-bg); + } + `; + + render() { + return html` +
+
+
+ +
+
+ ${i18next.t(this.title)} +
+
+
+ `; + } +} diff --git a/ui/src/icons/i_checkmark.ts b/ui/src/icons/i_checkmark.ts new file mode 100644 index 000000000..b11fd9adb --- /dev/null +++ b/ui/src/icons/i_checkmark.ts @@ -0,0 +1,8 @@ +import {html} from 'lit'; + +export const checkmarkIcon = html` + + + + +`; diff --git a/ui/src/icons/i_close.ts b/ui/src/icons/i_close.ts new file mode 100644 index 000000000..a0cb0d77f --- /dev/null +++ b/ui/src/icons/i_close.ts @@ -0,0 +1,7 @@ +import {html} from 'lit'; + +export const closeIcon = html` + + + +`; diff --git a/ui/src/icons/i_config.ts b/ui/src/icons/i_config.ts new file mode 100644 index 000000000..e91ad3ea5 --- /dev/null +++ b/ui/src/icons/i_config.ts @@ -0,0 +1,8 @@ +import {html} from 'lit'; + +export const configIcon = html` + + +`; + + diff --git a/ui/src/icons/i_dropdown.ts b/ui/src/icons/i_dropdown.ts new file mode 100644 index 000000000..70a32a9a2 --- /dev/null +++ b/ui/src/icons/i_dropdown.ts @@ -0,0 +1,7 @@ +import {html} from 'lit'; + +export const dropdownIcon = html` + + + +`; diff --git a/ui/src/icons/i_layer.ts b/ui/src/icons/i_layer.ts new file mode 100644 index 000000000..b21e6223b --- /dev/null +++ b/ui/src/icons/i_layer.ts @@ -0,0 +1,5 @@ +import {html} from 'lit'; + +export const layerIcon = html` + +`; diff --git a/ui/src/icons/i_projects.ts b/ui/src/icons/i_projects.ts new file mode 100644 index 000000000..22b91d676 --- /dev/null +++ b/ui/src/icons/i_projects.ts @@ -0,0 +1,5 @@ +import {html} from 'lit'; + +export const projectsIcon = html` + +`; diff --git a/ui/src/icons/i_search.ts b/ui/src/icons/i_search.ts new file mode 100644 index 000000000..e0b59d40b --- /dev/null +++ b/ui/src/icons/i_search.ts @@ -0,0 +1,7 @@ +import {html} from 'lit'; + +export const searchIcon = html` + + + +`; diff --git a/ui/src/icons/i_share.ts b/ui/src/icons/i_share.ts new file mode 100644 index 000000000..f01d623cf --- /dev/null +++ b/ui/src/icons/i_share.ts @@ -0,0 +1,5 @@ +import {html} from 'lit'; + +export const shareIcon = html` + +`; diff --git a/ui/src/icons/i_tools.ts b/ui/src/icons/i_tools.ts new file mode 100644 index 000000000..64f14c77b --- /dev/null +++ b/ui/src/icons/i_tools.ts @@ -0,0 +1,5 @@ +import {html} from 'lit'; + +export const toolsIcon = html` + +`; diff --git a/ui/src/icons/i_user.ts b/ui/src/icons/i_user.ts new file mode 100644 index 000000000..368e0a5bb --- /dev/null +++ b/ui/src/icons/i_user.ts @@ -0,0 +1,7 @@ +import {html} from 'lit'; + +export const userIcon = html` + + + +`; diff --git a/ui/src/images/i_view_all.svg b/ui/src/icons/i_view_all.ts similarity index 75% rename from ui/src/images/i_view_all.svg rename to ui/src/icons/i_view_all.ts index 462e1658f..22b01bdb2 100644 --- a/ui/src/images/i_view_all.svg +++ b/ui/src/icons/i_view_all.ts @@ -1,4 +1,6 @@ - - - - +import {html} from 'lit'; + +export const viewAllIcon = html` + + +`; diff --git a/ui/src/images/i_view_less.svg b/ui/src/icons/i_view_less.ts similarity index 71% rename from ui/src/images/i_view_less.svg rename to ui/src/icons/i_view_less.ts index 9243f0daa..a7b4fb731 100644 --- a/ui/src/images/i_view_less.svg +++ b/ui/src/icons/i_view_less.ts @@ -1,4 +1,6 @@ - - - - +import {html} from 'lit'; + +export const viewLessIcon = html` + + +`; diff --git a/ui/src/icons/icons.ts b/ui/src/icons/icons.ts new file mode 100644 index 000000000..cab424ad2 --- /dev/null +++ b/ui/src/icons/icons.ts @@ -0,0 +1,29 @@ +import {layerIcon} from './i_layer'; +import {toolsIcon} from './i_tools'; +import {shareIcon} from './i_share'; +import {projectsIcon} from './i_projects'; +import {configIcon} from './i_config'; +import {viewAllIcon} from './i_view_all'; +import {viewLessIcon} from './i_view_less'; +import {userIcon} from './i_user'; +import {checkmarkIcon} from './i_checkmark'; +import {searchIcon} from './i_search'; +import {closeIcon} from './i_close'; +import {dropdownIcon} from './i_dropdown'; + +export const icons = { + checkmark: checkmarkIcon, + close: closeIcon, + config: configIcon, + dropdown: dropdownIcon, + layer: layerIcon, + projects: projectsIcon, + search: searchIcon, + share: shareIcon, + tools: toolsIcon, + user: userIcon, + viewAll: viewAllIcon, + viewLess: viewLessIcon, +}; + +export type IconKey = keyof typeof icons; diff --git a/ui/src/images/i_config.svg b/ui/src/images/i_config.svg deleted file mode 100644 index 80c21976c..000000000 --- a/ui/src/images/i_config.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/images/i_layer.svg b/ui/src/images/i_layer.svg deleted file mode 100644 index 239346727..000000000 --- a/ui/src/images/i_layer.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/images/i_menu.svg b/ui/src/images/i_menu.svg deleted file mode 100644 index b3770918e..000000000 --- a/ui/src/images/i_menu.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/images/i_share.svg b/ui/src/images/i_share.svg deleted file mode 100644 index c26a36047..000000000 --- a/ui/src/images/i_share.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/images/i_tools.svg b/ui/src/images/i_tools.svg deleted file mode 100644 index 89c7636f1..000000000 --- a/ui/src/images/i_tools.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/images/i_user.svg b/ui/src/images/i_user.svg deleted file mode 100644 index dfa5bb37a..000000000 --- a/ui/src/images/i_user.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/src/ngm-app.ts b/ui/src/ngm-app.ts index 7c82c81f7..6b824260d 100644 --- a/ui/src/ngm-app.ts +++ b/ui/src/ngm-app.ts @@ -20,7 +20,8 @@ import './elements/ngm-ion-modal'; import './elements/ngm-wmts-date-picker'; import './components/search/search-input'; import 'fomantic-ui-css/components/dropdown'; - +import 'fomantic-ui-css/components/dropdown.js'; +import './elements/shared/ngm-icon'; import '@geoblocks/cesium-view-cube'; import {COGNITO_VARIABLES, DEFAULT_VIEW, SUPPORTED_LANGUAGES} from './constants'; @@ -59,6 +60,7 @@ import $ from 'jquery'; import {clientConfigContext} from './context'; import {consume} from '@lit/context'; import {ClientConfig} from './api/client-config'; +import {styleMap} from 'lit/directives/style-map.js'; const SKIP_STEP2_TIMEOUT = 5000; @@ -248,6 +250,8 @@ export class NgmApp extends LitElementI18n { } async firstUpdated() { + this.querySelectorAll('.menu').forEach((it) => $(it).dropdown()); + setTimeout(() => this.determinateLoading = true, 3000); setupI18n(); rewriteParams(); @@ -411,25 +415,32 @@ export class NgmApp extends LitElementI18n { render() { return html`
- - - -
swissgeol
-
- +
diff --git a/ui/src/style/header.css b/ui/src/style/header.css index d11679134..cab69e446 100644 --- a/ui/src/style/header.css +++ b/ui/src/style/header.css @@ -1,7 +1,7 @@ header { display: flex; align-items: center; - justify-content: space-between; + padding: 0 16px; height: var(--ngm-header-height); box-shadow: 0 3px 5px rgba(57, 63, 72, 0.3); border-bottom: 1px solid rgba(0, 0, 0, 0.1); @@ -9,8 +9,6 @@ header { --header-padding-l: 56px; --header-padding-r: 16px; - --header-padding-v: 10px; - padding: var(--header-padding-v) var(--header-padding-r) var(--header-padding-v) var(--header-padding-l); --content-width: calc(100vw - var(--header-padding-l) - var(--header-padding-r)); --suffix-width: 90px; @@ -18,7 +16,6 @@ header { @media (min-width: 700px) { header { - --header-padding-v: 16px; justify-content: flex-start; } } @@ -27,12 +24,19 @@ header > * { display: flex; } -header > a { +header > .left { + display: inline-flex; + align-items: center; + gap: 160px; +} + +header a#ngm-home-link { display: flex; align-items: center; font-size: 16px; color: #212529; z-index: 1; + height: fit-content; } @media (min-width: 700px) { @@ -76,6 +80,7 @@ header .ngm-header-suffix { max-width: var(--suffix-width); display: flex; align-items: center; + gap: 8px; } @media (min-width: 700px) { diff --git a/ui/src/style/icons.css b/ui/src/style/icons.css index 0b90643d6..e87a2e9a2 100644 --- a/ui/src/style/icons.css +++ b/ui/src/style/icons.css @@ -1,375 +1,319 @@ -.ngm-icon.disabled { - cursor: default; - pointer-events: none; - opacity: 0.45; -} - -.ngm-search-icon { - mask: url('./images/icon_search.svg') no-repeat center; - -webkit-mask: url('./images/icon_search.svg') no-repeat center; -} - -.ngm-close-icon { - mask: url('./images/i_close.svg') no-repeat center; - -webkit-mask: url('./images/i_close.svg') no-repeat center; -} - -.ngm-dashboard-icon { - width: 20px; - height: 14px; - mask: url('./images/i_menu.svg') no-repeat center; - -webkit-mask: url('./images/i_menu.svg') no-repeat center; -} - -.ngm-data-icon { - width: 24px; - height: 20px; - mask: url('./images/i_layer.svg') no-repeat center; - -webkit-mask: url('./images/i_layer.svg') no-repeat center; -} - -.ngm-tools-icon { - width: 22px; - height: 22px; - mask: url('./images/i_tools.svg') no-repeat center; - -webkit-mask: url('./images/i_tools.svg') no-repeat center; -} - -.ngm-share-icon { - width: 22px; - height: 22px; - mask: url('./images/i_share.svg') no-repeat center; - -webkit-mask: url('./images/i_share.svg') no-repeat center; -} - -.ngm-user-icon { - width: 18px; - height: 18px; - mask: url('./images/i_user.svg') no-repeat center; - -webkit-mask: url('./images/i_user.svg') no-repeat center; -} - -.ngm-settings-icon { - width: 20px; - height: 20px; - mask: url('./images/i_config.svg') no-repeat center; - -webkit-mask: url('./images/i_config.svg') no-repeat center; -} - -.ngm-zoom-p-icon { - width: 24px; - height: 24px; - mask: url('./images/i_zoom_plus.svg') no-repeat center; - -webkit-mask: url('./images/i_zoom_plus.svg') no-repeat center; -} - -.ngm-zoom-o-icon { - width: 24px; - height: 24px; - mask: url('./images/i_zoom_origin.svg') no-repeat center; - -webkit-mask: url('./images/i_zoom_origin.svg') no-repeat center; -} - -.ngm-zoom-m-icon { - width: 24px; - height: 24px; - mask: url('./images/i_zoom_minus.svg') no-repeat center; - -webkit-mask: url('./images/i_zoom_minus.svg') no-repeat center; -} - -.ngm-map-icon { - width: 24px; - height: 24px; - mask: url('./images/i_switzerland.svg') no-repeat center; - -webkit-mask: url('./images/i_switzerland.svg') no-repeat center; -} - -.ngm-cam-icon { - width: 24px; - height: 14px; - mask: url('./images/i_cam.svg') no-repeat center; - -webkit-mask: url('./images/i_cam.svg') no-repeat center; -} - -.ngm-cam-behind-icon { - width: 24px; - height: 24px; - mask: url('./images/i_cam_behind.svg') no-repeat center; - -webkit-mask: url('./images/i_cam_behind.svg') no-repeat center; -} - -.ngm-cam-h-icon { - width: 24px; - height: 24px; - mask: url('./images/i_cam_height.svg') no-repeat center; - -webkit-mask: url('./images/i_cam_height.svg') no-repeat center; -} - -.ngm-cam-d-icon { - width: 24px; - height: 24px; - mask: url('./images/i_cam_angle.svg') no-repeat center; - -webkit-mask: url('./images/i_cam_angle.svg') no-repeat center; -} - -.ngm-cam-t-icon { - width: 24px; - height: 22px; - mask: url('./images/i_cam_tilt.svg') no-repeat center; - -webkit-mask: url('./images/i_cam_tilt.svg') no-repeat center; -} - -.ngm-dropdown-icon { - width: 24px; - height: 24px; - mask: url('./images/i_menu-1.svg') no-repeat center; - -webkit-mask: url('./images/i_menu-1.svg') no-repeat center; -} - -.ngm-visible-icon { - width: 24px; - height: 24px; - mask: url('./images/i_visible.svg') no-repeat center; - -webkit-mask: url('./images/i_visible.svg') no-repeat center; -} - -.ngm-invisible-icon { - width: 24px; - height: 24px; - mask: url('./images/i_invisible.svg') no-repeat center; - -webkit-mask: url('./images/i_invisible.svg') no-repeat center; -} - -.ngm-zoom-plus-icon { - width: 20px; - height: 20px; - mask: url('./images/i_heranzoomen.svg') no-repeat center; - -webkit-mask: url('./images/i_heranzoomen.svg') no-repeat center; -} - -.ngm-delete-icon { - width: 24px; - height: 24px; - mask: url('./images/i_delete.svg') no-repeat center; - -webkit-mask: url('./images/i_delete.svg') no-repeat center; -} - -.ngm-coords-icon { - width: 22px; - height: 24px; - mask: url('./images/i_coordinates.svg') no-repeat center; - -webkit-mask: url('./images/i_coordinates.svg') no-repeat center; -} - -.ngm-vector-icon { - width: 24px; - height: 24px; - mask: url('./images/i_vector.svg') no-repeat center; - -webkit-mask: url('./images/i_vector.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-line-draw-icon { - width: 24px; - height: 24px; - mask: url('./images/i_line_draw.svg') no-repeat center; - -webkit-mask: url('./images/i_line_draw.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-polygon-draw-icon { - width: 24px; - height: 24px; - mask: url('./images/i_polygon_draw.svg') no-repeat center; - -webkit-mask: url('./images/i_polygon_draw.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-point-draw-icon { - width: 24px; - height: 24px; - mask: url('./images/i_point_draw.svg') no-repeat center; - -webkit-mask: url('./images/i_point_draw.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-rectangle-draw-icon { - width: 24px; - height: 24px; - mask: url('./images/i_rectangle_draw.svg') no-repeat center; - -webkit-mask: url('./images/i_rectangle_draw.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-file-upload-icon { - width: 24px; - height: 24px; - mask: url('./images/i_kml_gpx_upload.svg') no-repeat center; - -webkit-mask: url('./images/i_kml_gpx_upload.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-file-download-icon { - width: 24px; - height: 24px; - mask: url('./images/i_download_kml.svg') no-repeat center; - -webkit-mask: url('./images/i_download_kml.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-action-menu-icon { - width: 24px; - height: 24px; - mask: url('./images/i_action_menu.svg') no-repeat center; - -webkit-mask: url('./images/i_action_menu.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-slicing-icon { - width: 24px; - height: 24px; - mask: url('./images/i_slicing.svg') no-repeat center; - -webkit-mask: url('./images/i_slicing.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-in-box-icon { - width: 24px; - height: 24px; - mask: url('./images/i_box_inside.svg') no-repeat center; - -webkit-mask: url('./images/i_box_inside.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-out-box-icon { - width: 24px; - height: 24px; - mask: url('./images/i_box_outside.svg') no-repeat center; - -webkit-mask: url('./images/i_box_outside.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-back-icon { - width: 24px; - height: 24px; - mask: url('./images/i_back.svg') no-repeat center; - -webkit-mask: url('./images/i_back.svg') no-repeat center; - background-color: #000000; -} - -.ngm-slice-left-icon { - width: 24px; - height: 24px; - mask: url('./images/i_slice_left.svg') no-repeat center; - -webkit-mask: url('./images/i_slice_left.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-slice-right-icon { - width: 24px; - height: 24px; - mask: url('./images/i_slice_right.svg') no-repeat center; - -webkit-mask: url('./images/i_slice_right.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-upload-icon { - width: 24px; - height: 24px; - mask: url('./images/i_upload.svg') no-repeat center; - -webkit-mask: url('./images/i_upload.svg') no-repeat center; -} - -.ngm-extrusion-icon { - width: 20px; - height: 24px; - mask: url('./images/i_extrusion.svg') no-repeat center; - -webkit-mask: url('./images/i_extrusion.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-edit-icon { - width: 24px; - height: 24px; - mask: url('./images/i_edit.svg') no-repeat center; - -webkit-mask: url('./images/i_edit.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-download-icon { - width: 24px; - height: 24px; - mask: url('./images/i_download.svg') no-repeat center; - -webkit-mask: url('./images/i_download.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-screenshot-icon { - width: 18px; - height: 18px; - mask: url('./images/i_screenshot.svg') no-repeat center; - -webkit-mask: url('./images/i_screenshot.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-gst-icon { - width: 24px; - height: 24px; - mask: url('./images/i_query_3d_models.svg') no-repeat center; - -webkit-mask: url('./images/i_query_3d_models.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-play-last-icon { - width: 24px; - height: 24px; - mask: url('./images/i_play_the_last.svg') no-repeat center; - -webkit-mask: url('./images/i_play_the_last.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-play-icon { - width: 24px; - height: 24px; - mask: url('./images/i_play.svg') no-repeat center; - -webkit-mask: url('./images/i_play.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-view-all-icon { - width: 24px; - height: 24px; - mask: url('./images/i_view_all.svg') no-repeat center; - -webkit-mask: url('./images/i_view_all.svg') no-repeat center; -} - -.ngm-view-less-icon { - width: 24px; - height: 24px; - mask: url('./images/i_view_less.svg') no-repeat center; - -webkit-mask: url('./images/i_view_less.svg') no-repeat center; -} - -.ngm-profile-icon { - width: 24px; - height: 24px; - mask: url('./images/i_terrain.svg') no-repeat center; - -webkit-mask: url('./images/i_terrain.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-save-icon { - width: 24px; - height: 24px; - mask: url('./images/i_save.svg') no-repeat center; - -webkit-mask: url('./images/i_save.svg') no-repeat center; - background-color: var(--ngm-interaction); -} - -.ngm-copy-icon { - width: 24px; - height: 24px; - mask: url('./images/i_copy.svg') no-repeat center; - -webkit-mask: url('./images/i_copy.svg') no-repeat center; - background-color: var(--ngm-interaction); -} +.ngm-icon.disabled { + cursor: default; + pointer-events: none; + opacity: 0.45; +} + +.ngm-search-icon { + mask: url('./images/icon_search.svg') no-repeat center; + -webkit-mask: url('./images/icon_search.svg') no-repeat center; +} + +.ngm-close-icon { + mask: url('./images/i_close.svg') no-repeat center; + -webkit-mask: url('./images/i_close.svg') no-repeat center; +} + +.ngm-zoom-p-icon { + width: 24px; + height: 24px; + mask: url('./images/i_zoom_plus.svg') no-repeat center; + -webkit-mask: url('./images/i_zoom_plus.svg') no-repeat center; +} + +.ngm-zoom-o-icon { + width: 24px; + height: 24px; + mask: url('./images/i_zoom_origin.svg') no-repeat center; + -webkit-mask: url('./images/i_zoom_origin.svg') no-repeat center; +} + +.ngm-zoom-m-icon { + width: 24px; + height: 24px; + mask: url('./images/i_zoom_minus.svg') no-repeat center; + -webkit-mask: url('./images/i_zoom_minus.svg') no-repeat center; +} + +.ngm-map-icon { + width: 24px; + height: 24px; + mask: url('./images/i_switzerland.svg') no-repeat center; + -webkit-mask: url('./images/i_switzerland.svg') no-repeat center; +} + +.ngm-cam-icon { + width: 24px; + height: 14px; + mask: url('./images/i_cam.svg') no-repeat center; + -webkit-mask: url('./images/i_cam.svg') no-repeat center; +} + +.ngm-cam-behind-icon { + width: 24px; + height: 24px; + mask: url('./images/i_cam_behind.svg') no-repeat center; + -webkit-mask: url('./images/i_cam_behind.svg') no-repeat center; +} + +.ngm-cam-h-icon { + width: 24px; + height: 24px; + mask: url('./images/i_cam_height.svg') no-repeat center; + -webkit-mask: url('./images/i_cam_height.svg') no-repeat center; +} + +.ngm-cam-d-icon { + width: 24px; + height: 24px; + mask: url('./images/i_cam_angle.svg') no-repeat center; + -webkit-mask: url('./images/i_cam_angle.svg') no-repeat center; +} + +.ngm-cam-t-icon { + width: 24px; + height: 22px; + mask: url('./images/i_cam_tilt.svg') no-repeat center; + -webkit-mask: url('./images/i_cam_tilt.svg') no-repeat center; +} + +.ngm-dropdown-icon { + width: 24px; + height: 24px; + mask: url('./images/i_menu-1.svg') no-repeat center; + -webkit-mask: url('./images/i_menu-1.svg') no-repeat center; +} + +.ngm-visible-icon { + width: 24px; + height: 24px; + mask: url('./images/i_visible.svg') no-repeat center; + -webkit-mask: url('./images/i_visible.svg') no-repeat center; +} + +.ngm-invisible-icon { + width: 24px; + height: 24px; + mask: url('./images/i_invisible.svg') no-repeat center; + -webkit-mask: url('./images/i_invisible.svg') no-repeat center; +} + +.ngm-zoom-plus-icon { + width: 20px; + height: 20px; + mask: url('./images/i_heranzoomen.svg') no-repeat center; + -webkit-mask: url('./images/i_heranzoomen.svg') no-repeat center; +} + +.ngm-delete-icon { + width: 24px; + height: 24px; + mask: url('./images/i_delete.svg') no-repeat center; + -webkit-mask: url('./images/i_delete.svg') no-repeat center; +} + +.ngm-coords-icon { + width: 22px; + height: 24px; + mask: url('./images/i_coordinates.svg') no-repeat center; + -webkit-mask: url('./images/i_coordinates.svg') no-repeat center; +} + +.ngm-vector-icon { + width: 24px; + height: 24px; + mask: url('./images/i_vector.svg') no-repeat center; + -webkit-mask: url('./images/i_vector.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-line-draw-icon { + width: 24px; + height: 24px; + mask: url('./images/i_line_draw.svg') no-repeat center; + -webkit-mask: url('./images/i_line_draw.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-polygon-draw-icon { + width: 24px; + height: 24px; + mask: url('./images/i_polygon_draw.svg') no-repeat center; + -webkit-mask: url('./images/i_polygon_draw.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-point-draw-icon { + width: 24px; + height: 24px; + mask: url('./images/i_point_draw.svg') no-repeat center; + -webkit-mask: url('./images/i_point_draw.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-rectangle-draw-icon { + width: 24px; + height: 24px; + mask: url('./images/i_rectangle_draw.svg') no-repeat center; + -webkit-mask: url('./images/i_rectangle_draw.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-file-upload-icon { + width: 24px; + height: 24px; + mask: url('./images/i_kml_gpx_upload.svg') no-repeat center; + -webkit-mask: url('./images/i_kml_gpx_upload.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-file-download-icon { + width: 24px; + height: 24px; + mask: url('./images/i_download_kml.svg') no-repeat center; + -webkit-mask: url('./images/i_download_kml.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-action-menu-icon { + width: 24px; + height: 24px; + mask: url('./images/i_action_menu.svg') no-repeat center; + -webkit-mask: url('./images/i_action_menu.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-slicing-icon { + width: 24px; + height: 24px; + mask: url('./images/i_slicing.svg') no-repeat center; + -webkit-mask: url('./images/i_slicing.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-in-box-icon { + width: 24px; + height: 24px; + mask: url('./images/i_box_inside.svg') no-repeat center; + -webkit-mask: url('./images/i_box_inside.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-out-box-icon { + width: 24px; + height: 24px; + mask: url('./images/i_box_outside.svg') no-repeat center; + -webkit-mask: url('./images/i_box_outside.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-back-icon { + width: 24px; + height: 24px; + mask: url('./images/i_back.svg') no-repeat center; + -webkit-mask: url('./images/i_back.svg') no-repeat center; + background-color: #000000; +} + +.ngm-slice-left-icon { + width: 24px; + height: 24px; + mask: url('./images/i_slice_left.svg') no-repeat center; + -webkit-mask: url('./images/i_slice_left.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-slice-right-icon { + width: 24px; + height: 24px; + mask: url('./images/i_slice_right.svg') no-repeat center; + -webkit-mask: url('./images/i_slice_right.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-upload-icon { + width: 24px; + height: 24px; + mask: url('./images/i_upload.svg') no-repeat center; + -webkit-mask: url('./images/i_upload.svg') no-repeat center; +} + +.ngm-extrusion-icon { + width: 20px; + height: 24px; + mask: url('./images/i_extrusion.svg') no-repeat center; + -webkit-mask: url('./images/i_extrusion.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-edit-icon { + width: 24px; + height: 24px; + mask: url('./images/i_edit.svg') no-repeat center; + -webkit-mask: url('./images/i_edit.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-download-icon { + width: 24px; + height: 24px; + mask: url('./images/i_download.svg') no-repeat center; + -webkit-mask: url('./images/i_download.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-screenshot-icon { + width: 18px; + height: 18px; + mask: url('./images/i_screenshot.svg') no-repeat center; + -webkit-mask: url('./images/i_screenshot.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-gst-icon { + width: 24px; + height: 24px; + mask: url('./images/i_query_3d_models.svg') no-repeat center; + -webkit-mask: url('./images/i_query_3d_models.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-play-last-icon { + width: 24px; + height: 24px; + mask: url('./images/i_play_the_last.svg') no-repeat center; + -webkit-mask: url('./images/i_play_the_last.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-play-icon { + width: 24px; + height: 24px; + mask: url('./images/i_play.svg') no-repeat center; + -webkit-mask: url('./images/i_play.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-profile-icon { + width: 24px; + height: 24px; + mask: url('./images/i_terrain.svg') no-repeat center; + -webkit-mask: url('./images/i_terrain.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-save-icon { + width: 24px; + height: 24px; + mask: url('./images/i_save.svg') no-repeat center; + -webkit-mask: url('./images/i_save.svg') no-repeat center; + background-color: var(--ngm-interaction); +} + +.ngm-copy-icon { + width: 24px; + height: 24px; + mask: url('./images/i_copy.svg') no-repeat center; + -webkit-mask: url('./images/i_copy.svg') no-repeat center; + background-color: var(--ngm-interaction); +} diff --git a/ui/src/style/index.css b/ui/src/style/index.css index 0772d67ab..7e97e5bf3 100644 --- a/ui/src/style/index.css +++ b/ui/src/style/index.css @@ -36,7 +36,6 @@ @import 'keyboard-navigation.css'; @import 'layers.css'; @import 'ngm-map-configuration.css'; -@import 'ngm-cursor-information.css'; @import 'ngm-point-edit.css'; @import 'ngm-position-edit.css'; @import 'ngm-map-chooser.css'; @@ -63,6 +62,7 @@ @import 'ngm-coordinate-popup.css'; @import 'ngm-ion-modal.css'; @import 'ngm-info-table.css'; +@import '../styles/index.css'; @import '../styles/index.css'; @@ -204,18 +204,48 @@ cesium-view-cube { } .ngm-lang-dropdown { - background-color: #F1F3F5; display: flex; - justify-content: center; + justify-content: space-between; align-items: center; - margin-right: 20px; + gap: 6px; + width: 69px; + + padding: 8px 12px; + border-radius: 4px; + color: var(--color-main); +} + +.ngm-lang-dropdown:hover { + background-color: var(--color-hovered); + color: var(--color-main--dark); +} + +.ngm-lang-dropdown.active ngm-icon[icon="dropdown"] { + transform: rotate(180deg); } .ngm-lang-title { - padding: 5px 5px 5px 10px; display: flex; justify-content: center; align-items: center; + gap: 6px; +} + +.ngm-lang-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 12px; + gap: 12px; + width: 85px; + font-size: 14px; + font-family: var(--font); + line-height: 20px; + letter-spacing: calc(14px * 0.0025); +} + +.ngm-lang-item:hover { + background-color: var(--color-pressed); } .ngm-lang-title .ngm-dropdown-icon { @@ -223,12 +253,18 @@ cesium-view-cube { transform: rotate(90deg); } -.ngm-lang-dropdown.active .ngm-lang-title .ngm-dropdown-icon { - transform: rotate(-90deg); +.ui.dropdown .menu { + box-shadow: + 0 2px 4px -1px #0000000F, + 0 4px 10px -1px #00000014; } -:lang(de) .lang-de, :lang(fr) .lang-fr, :lang(it) .lang-it, :lang(en) .lang-en { - color: #A83526 !important; +.ui.dropdown .menu .ngm-lang-dropdown.active.item { + font-weight: 500; +} + +.ngm-lang-dropdown.active .ngm-lang-title .ngm-dropdown-icon { + transform: rotate(-90deg); } .ui.checkbox label { @@ -244,42 +280,6 @@ cesium-view-cube { z-index: 10; } -ngm-auth { - cursor: pointer; -} - -ngm-auth > .ngm-user { - display: flex; - flex-direction: column; - align-items: center; - text-align: center; -} - -ngm-auth > a { - cursor: pointer; -} - -ngm-auth .ngm-user-icon { - margin-bottom: 5px; - background-color: #030303; -} - -ngm-auth:hover .ngm-user-icon { - background-color: var(--ngm-interaction-hover); -} - -ngm-auth:hover { - color: var(--ngm-interaction-hover); -} - -ngm-auth .ngm-active-section > div:nth-child(1) { - background-color: var(--ngm-interaction-active); -} - -ngm-auth .ngm-active-section { - color: var(--ngm-interaction-active); -} - ngm-gst-interaction > .ui.tiny.icon.buttons { display: flex; } @@ -612,6 +612,7 @@ body:after { /* Beta label */ color: #fff; line-height: 27px; transform: rotate(-45deg); + z-index: 6; } .cursor-preloader, diff --git a/ui/src/style/ngm-cursor-information.css b/ui/src/style/ngm-cursor-information.css index 4f1b7b878..e69de29bb 100644 --- a/ui/src/style/ngm-cursor-information.css +++ b/ui/src/style/ngm-cursor-information.css @@ -1,41 +0,0 @@ -ngm-cursor-information { - display: flex; - flex-wrap: wrap; - align-self: center; - color: #212529; - text-align: left; - font: normal normal normal 14px/20px Inter, sans-serif; - letter-spacing: 0; - min-width: 255px; -} - -ngm-cursor-information .ngm-nci-value { - font-weight: 600; - min-width: 75px; -} - -.ngm-nci-position { - width: 83px; - margin-right: 20px; -} - -.ngm-nci-height { - display: flex; - flex-direction: column; - white-space: nowrap; - margin-right: 10px; -} - -ngm-cursor-information > img { - width: 24px; -} - -@media (max-width: 1193px) { - .ngm-nci-height, - .ngm-nci-position { - display: none; - } - ngm-cursor-information { - min-width: 0; - } -} diff --git a/ui/src/style/ngm-side-bar.css b/ui/src/style/ngm-side-bar.css index c360956b5..451e08192 100644 --- a/ui/src/style/ngm-side-bar.css +++ b/ui/src/style/ngm-side-bar.css @@ -4,74 +4,47 @@ ngm-side-bar { max-width: 100vw; } -.ngm-menu, -.ngm-menu-mobile, -.ngm-menu-1, -.ngm-menu-2, -.ngm-menu-1 > div, -.ngm-menu-2 > div, -.ngm-menu-mobile > div { +.ngm-menu-mobile { display: flex; - flex-direction: column; align-items: center; - text-align: center; -} - - -.ngm-menu, -.ngm-menu-mobile { - width: var(--ngm-left-side-bar-width); - justify-content: space-between; - font: normal normal normal 12px/15px Inter, sans-serif; - color: #222529; - background-color: #FFFFFF; -} - -.ngm-menu-1 { - margin-top: 24px; -} - -.ngm-menu-2 { - margin-bottom: 40px; -} - -.ngm-menu-1 > div, -.ngm-menu-2 > div { - margin-bottom: 28px; - cursor: pointer; + bottom: var(--ngm-bottom-menu-height); + width: 100%; + height: 56px; + position: absolute; + z-index: 9999; + justify-content: center; + background-color: white; } -.ngm-menu-2 > .ngm-settings { +.ngm-menu-mobile > div { margin-bottom: 0; + width: 68px; } -.ngm-menu-1 > div > div:nth-child(1), -.ngm-menu-2 > div > div:nth-child(1), -.ngm-menu-mobile > div > div:nth-child(1) { - background-color: #030303; -} - -.ngm-menu-1 > div:hover > div:nth-child(1), -.ngm-menu-2 > div:hover > div:nth-child(1), -.ngm-menu-mobile > div:hover > div:nth-child(1) { - background-color: var(--ngm-interaction-hover); -} +.ngm-menu { + position: absolute; + bottom: 0; + width: 100%; + height: 56px; + display: flex; + justify-content: center; -.ngm-menu-1 > div:hover, -.ngm-menu-2 > div:hover, -.ngm-menu-mobile > div:hover { - color: var(--ngm-interaction-hover); + .ngm-menu-top { + display: flex; + align-items: center; + justify-content: center; + } } .ngm-side-bar-panel { - width: 250px; - height: calc(100vh - var(--ngm-header-height)); + width: 100%; + height: calc(100% - (var(--ngm-header-height-mobile) + var(--ngm-bottom-menu-height))); max-width: 1028px; background-color: var(--color-bg--dark); box-shadow: 4px 0 4px #00000029; padding: var(--panel-padding); position: absolute; - margin-left: var(--ngm-left-side-bar-width); + margin-left: 0; z-index: 5; display: flex; flex-direction: column; @@ -79,28 +52,28 @@ ngm-side-bar { } ngm-navigation-catalog .ngm-side-bar-panel { - margin-left: 0; -} - -.inner-toolbar-settings { - display: flex; - flex-direction: column; - justify-content: space-between; - gap: 10px; - margin-top: 14px; + margin-left: 0; } .ngm-side-bar-panel.ngm-large-panel { - width: calc(100vw - 144px); + width: 100%; } .ngm-side-bar-panel.ngm-share-panel { - width: 436px; + width: 100% } .ngm-side-bar-panel.ngm-extension-panel { - width: 528px; - left: 250px; + width: 100%; + left: 0; +} + +.ngm-side-bar-panel.ngm-layer-catalog { + z-index: 5; +} + +.ngm-side-bar-panel .ngm-panel-content { + max-height: calc(100vh - (var(--ngm-header-height-mobile) + var(--ngm-bottom-menu-height) + 34px)); } .ngm-panel-header { @@ -128,27 +101,30 @@ ngm-navigation-catalog .ngm-side-bar-panel { cursor: pointer; } -.ngm-panel-content { +.inner-toolbar-settings { display: flex; flex-direction: column; - margin-top: 9px; - overflow-y: auto; - overflow-x: hidden; - padding-bottom: 40px; + justify-content: space-between; + gap: 10px; + margin-top: 14px; } -.ngm-menu-1 > div.ngm-active-section > div:nth-child(1), -.ngm-menu-2 > div.ngm-active-section > div:nth-child(1) { - background-color: var(--ngm-interaction-active); +.ngm-label-btn { + margin-left: auto; + font: normal normal 500 14px/20px Inter, sans-serif; + letter-spacing: 0; + color: var(--ngm-interaction); + opacity: 1; + margin-right: 17px; + cursor: pointer; } -.ngm-menu-1 > div.ngm-active-section, -.ngm-menu-2 > div.ngm-active-section { +.ngm-label-btn.active { color: var(--ngm-interaction-active); } -.ngm-side-bar-panel.ngm-layer-catalog { - z-index: 5; +.ngm-label-btn:hover { + color: var(--ngm-interaction-hover); } .ngm-background-label.ui.header { @@ -161,22 +137,13 @@ ngm-navigation-catalog .ngm-side-bar-panel { margin-left: 5px; } -.ngm-label-btn { - margin-left: auto; - font: normal normal 500 14px/20px Inter, sans-serif; - letter-spacing: 0; - color: var(--ngm-interaction); - opacity: 1; - margin-right: 17px; - cursor: pointer; -} - -.ngm-label-btn.active { - color: var(--ngm-interaction-active); -} - -.ngm-label-btn:hover { - color: var(--ngm-interaction-hover); +.ngm-panel-content { + display: flex; + flex-direction: column; + margin-top: 9px; + overflow-y: auto; + overflow-x: hidden; + padding-bottom: 40px; } .ngm-configure-data { @@ -184,77 +151,58 @@ ngm-navigation-catalog .ngm-side-bar-panel { margin-top: 9px; } -@media (max-height: 629px), (max-width: 599px) { - .ngm-menu, - .ngm-menu-1, - .ngm-menu-2 { - flex-direction: row; - align-items: center; - justify-content: start; - } +.ngm-data-catalog-label { + margin-right: 10px; +} - .ngm-menu, - .ngm-menu-mobile { - width: 100%; - height: var(--ngm-bottom-menu-height); - position: absolute; - z-index: 9999; - bottom: 0; - justify-content: center; - } +.ngm-data-catalog-label.active { + color: var(--ngm-interaction-active); +} - .ngm-menu-1 { - align-items: start; - margin: 0; - } +@media (min-height: 629px) and (min-width: 599px) { + .ngm-menu { + position: relative; + height: 100%; + width: var(--ngm-left-side-bar-width); + justify-content: space-between; + flex-direction: column; + padding: 12px 6px; - .ngm-menu-1 > div, - .ngm-menu-mobile > div { - margin-bottom: 0; - width: 68px; + .ngm-menu-top { + flex-direction: column; + } } - .ngm-menu-mobile > div:first-child, - .ngm-menu-1 > div:first-child { - margin-left: 12px; + .ngm-side-bar-panel { + width: 250px; + margin-left: var(--ngm-left-side-bar-width); + height: calc(100vh - var(--ngm-header-height)); } - .ngm-menu-mobile { - display: flex; - flex-direction: row; - align-items: start; - bottom: var(--ngm-bottom-menu-height); - height: 62px; + .ngm-side-bar-panel.ngm-large-panel { + width: calc(100vw - 144px); } - .ngm-menu-mobile > div { - margin-top: 10px; + .ngm-side-bar-panel.ngm-share-panel { + width: 436px; } - .ngm-side-bar-panel { - margin-left: 0; - height: calc(100% - (var(--ngm-header-height-mobile) + var(--ngm-bottom-menu-height))); + .ngm-side-bar-panel.ngm-extension-panel { + left: 250px; + width: 528px; } - .ngm-side-bar-panel .ngm-panel-content { - max-height: calc(100vh - (var(--ngm-header-height-mobile) + var(--ngm-bottom-menu-height) + 34px)); - } - - .ngm-side-bar-panel.ngm-large-panel { - width: calc(100vw - 64px); - } - - .ngm-side-bar-panel.ngm-share-panel { - width: 100% + max-height: unset; } +} - .ngm-menu-1 > div > div:nth-child(1), - .ngm-menu-mobile > div > div:nth-child(1) { - margin-bottom: 1px; - background-color: #030303; - height: 24px; +@media (max-width: 350px) { + .ngm-menu-mobile > div { + width: 60px; } +} +@media (max-height: 629px), (max-width: 599px) { .ngm-side-bar-panel.ngm-large-panel .ngm-proj-information .ngm-proj-description { margin-left: 0; margin-top: 12px; @@ -270,27 +218,11 @@ ngm-navigation-catalog .ngm-side-bar-panel { margin-bottom: 12px; } - .ngm-side-bar-panel.ngm-side-bar-panel, - .ngm-side-bar-panel.ngm-large-panel { - width: 100%; - } - .ngm-side-bar-panel.ngm-share-panel, .ngm-side-bar-panel.ngm-large-panel { overflow: auto; } - .ngm-side-bar-panel.ngm-extension-panel { - left: 0; - } - - .ngm-data-catalog-label { - margin-right: 10px; - } - - .ngm-data-catalog-label.active { - color: var(--ngm-interaction-active); - } ngm-map-configuration .base-map-labels { display: flex; @@ -314,9 +246,3 @@ ngm-navigation-catalog .ngm-side-bar-panel { } } -@media (max-width: 350px) { - .ngm-menu-1 > div, - .ngm-menu-mobile > div { - width: 60px; - } -} diff --git a/ui/src/style/search.css b/ui/src/style/search.css index 88ad85804..9dedcb32f 100644 --- a/ui/src/style/search.css +++ b/ui/src/style/search.css @@ -1,28 +1,28 @@ .ngm-search-icon-container { - width: 30px; - height: 100%; - position: absolute; - right: 12px; - color: #66D9E8; - background-color: var(--ngm-interaction); + width: 30px; + height: 100%; + position: absolute; + left: 12px; + color: #66D9E8; + background-color: var(--ngm-interaction); } .ngm-search-icon-container.ngm-close-icon { - cursor: pointer; + cursor: pointer; } .mobile-search-active ga-search .ngm-search-icon { - display: none; + display: none; } @media (max-width: 690px) { - ga-search { - min-width: 180px; - max-width: 180px; - } + ga-search { + min-width: 180px; + max-width: 180px; + } - ga-search > input { - padding: 11px 16px !important; - width: 150px; - } + ga-search > input { + padding: 11px 16px !important; + width: 150px; + } } diff --git a/ui/src/style/variables.css b/ui/src/style/variables.css index a1d685572..9ded405e7 100644 --- a/ui/src/style/variables.css +++ b/ui/src/style/variables.css @@ -1,13 +1,13 @@ -:root { - --ngm-interaction: #0B7285; - --ngm-interaction-active: #B9271A; - --ngm-interaction-hover: #FF0000; - --ngm-action-hover: #A83526; - --ngm-hover: #C5F6FA; - --ngm-warning: #C92A2A; - --ngm-header-height: 88px; - --ngm-header-height-mobile: 48px; - --ngm-bottom-menu-height: 56px; - --ngm-panel-header-height: 34px; - --ngm-left-side-bar-width: 56px; -} +:root { + --ngm-interaction: #0B7285; + --ngm-interaction-active: #B9271A; + --ngm-interaction-hover: #FF0000; + --ngm-action-hover: #A83526; + --ngm-hover: #C5F6FA; + --ngm-warning: #C92A2A; + --ngm-header-height: 88px; + --ngm-header-height-mobile: 48px; + --ngm-bottom-menu-height: 56px; + --ngm-panel-header-height: 34px; + --ngm-left-side-bar-width: 80px; +} diff --git a/ui/src/styles/index.css b/ui/src/styles/index.css index c12807fe2..eaae722e9 100644 --- a/ui/src/styles/index.css +++ b/ui/src/styles/index.css @@ -1,4 +1,3 @@ - :root { --color-bg: #FFF; --color-bg--dark: #F1F3F5; @@ -11,6 +10,14 @@ --color-highlight--dark: #66D9E8; --color-highlight--darker: #0B7285; + --color-main: #337083; + --color-main--dark: #2F4356; + + --color-hovered: #D6E2E6; + --color-pressed: #DFE4E9; + + --color-active: #607D52; + --color-action: #a83526; --color-action--light: #FF0000; @@ -22,4 +29,3 @@ font-family: var(--font); font-size: 16px; } -