forked from MapComplete/MapComplete
Uniformly style titles of pages
This commit is contained in:
parent
762807dc1f
commit
f1d416320c
2 changed files with 44 additions and 31 deletions
|
@ -29,7 +29,7 @@
|
||||||
size="xl"
|
size="xl"
|
||||||
{defaultClass} {bodyClass} {dialogClass} {headerClass}
|
{defaultClass} {bodyClass} {dialogClass} {headerClass}
|
||||||
color="none">
|
color="none">
|
||||||
<h1 slot="header" class="w-full">
|
<h1 slot="header" class="page-header w-full">
|
||||||
<slot name="header" />
|
<slot name="header" />
|
||||||
</h1>
|
</h1>
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -44,3 +44,16 @@
|
||||||
</slot>
|
</slot>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:global(.page-header) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.page-header svg) {
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
margin-right: 0.75rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -96,10 +96,10 @@
|
||||||
|
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.usersettings}>
|
<Page {onlyLink} shown={pg.usersettings}>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<CogIcon class="h-6 w-6" />
|
<CogIcon/>
|
||||||
<Tr t={UserRelatedState.usersettingsConfig.title.GetRenderValue({})} />
|
<Tr t={UserRelatedState.usersettingsConfig.title.GetRenderValue({})} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
|
|
||||||
<!-- All shown components are set by 'usersettings.json', which happily uses some special visualisations created specifically for it -->
|
<!-- All shown components are set by 'usersettings.json', which happily uses some special visualisations created specifically for it -->
|
||||||
<LoginToggle {state}>
|
<LoginToggle {state}>
|
||||||
|
@ -128,10 +128,10 @@
|
||||||
<LoginToggle {state}>
|
<LoginToggle {state}>
|
||||||
<Page {onlyLink} shown={pg.favourites}>
|
<Page {onlyLink} shown={pg.favourites}>
|
||||||
|
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<HeartIcon class="h-6 w-6" />
|
<HeartIcon />
|
||||||
<Tr t={Translations.t.favouritePoi.tab} />
|
<Tr t={Translations.t.favouritePoi.tab} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
|
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
|
@ -167,10 +167,10 @@
|
||||||
<Marker icons={layout.icon} size="h-6 w-6 mr-2" />
|
<Marker icons={layout.icon} size="h-6 w-6 mr-2" />
|
||||||
<Tr t={t.showIntroduction} />
|
<Tr t={t.showIntroduction} />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<Marker icons={layout.icon} size="h-8 w-8 mr-4" />
|
<Marker icons={layout.icon} />
|
||||||
<Tr t={layout.title} />
|
<Tr t={layout.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<ThemeIntroPanel {state} />
|
<ThemeIntroPanel {state} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
@ -179,20 +179,20 @@
|
||||||
<RasterLayerOverview {onlyLink} {state} />
|
<RasterLayerOverview {onlyLink} {state} />
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.share}>
|
<Page {onlyLink} shown={pg.share}>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<Share class="h-4 w-4" />
|
<Share/>
|
||||||
<Tr t={Translations.t.general.sharescreen.title} />
|
<Tr t={Translations.t.general.sharescreen.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<ShareScreen {state} />
|
<ShareScreen {state} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
|
||||||
{#if state.featureSwitches.featureSwitchEnableExport}
|
{#if state.featureSwitches.featureSwitchEnableExport}
|
||||||
<Page {onlyLink} shown={pg.download}>
|
<Page {onlyLink} shown={pg.download}>
|
||||||
<div slot="header" class="flex">
|
<svelte:fragment slot="header">
|
||||||
<ArrowDownTray class="h-4 w-4" />
|
<ArrowDownTray />
|
||||||
<Tr t={Translations.t.general.download.title} />
|
<Tr t={Translations.t.general.download.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<DownloadPanel {state} />
|
<DownloadPanel {state} />
|
||||||
</Page>
|
</Page>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -230,10 +230,10 @@
|
||||||
|
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.community_index}>
|
<Page {onlyLink} shown={pg.community_index}>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<Community class="h-6 w-6" />
|
<Community/>
|
||||||
<Tr t={Translations.t.communityIndex.title} />
|
<Tr t={Translations.t.communityIndex.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<CommunityIndexView location={state.mapProperties.location} />
|
<CommunityIndexView location={state.mapProperties.location} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
@ -264,10 +264,10 @@
|
||||||
|
|
||||||
<div class="hidden-on-mobile w-full">
|
<div class="hidden-on-mobile w-full">
|
||||||
<Page {onlyLink} shown={pg.hotkeys}>
|
<Page {onlyLink} shown={pg.hotkeys}>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<BoltIcon class="w-6 h-6" />
|
<BoltIcon />
|
||||||
<Tr t={ Translations.t.hotkeyDocumentation.title} />
|
<Tr t={ Translations.t.hotkeyDocumentation.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<HotkeyTable />
|
<HotkeyTable />
|
||||||
</Page>
|
</Page>
|
||||||
</div>
|
</div>
|
||||||
|
@ -295,29 +295,29 @@
|
||||||
|
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.copyright}>
|
<Page {onlyLink} shown={pg.copyright}>
|
||||||
<div slot="header" class="flex">
|
<svelte:fragment slot="header">
|
||||||
<Copyright class="w-8 h-8" />
|
<Copyright />
|
||||||
<Tr t={Translations.t.general.attribution.attributionTitle} />
|
<Tr t={Translations.t.general.attribution.attributionTitle} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<CopyrightPanel {state} />
|
<CopyrightPanel {state} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.copyright_icons}>
|
<Page {onlyLink} shown={pg.copyright_icons}>
|
||||||
<div slot="header" class="flex">
|
<svelte:fragment slot="header" >
|
||||||
<Copyright class="w-8 h-8" />
|
<Copyright/>
|
||||||
<Tr t={ Translations.t.general.attribution.iconAttribution.title} />
|
<Tr t={ Translations.t.general.attribution.iconAttribution.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<CopyrightAllIcons {state} />
|
<CopyrightAllIcons {state} />
|
||||||
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
|
||||||
<Page {onlyLink} shown={pg.privacy}>
|
<Page {onlyLink} shown={pg.privacy}>
|
||||||
<div class="flex" slot="header">
|
<svelte:fragment slot="header">
|
||||||
<EyeIcon class="w-8 h-8" />
|
<EyeIcon />
|
||||||
<Tr t={Translations.t.privacy.title} />
|
<Tr t={Translations.t.privacy.title} />
|
||||||
</div>
|
</svelte:fragment>
|
||||||
<PrivacyPolicy {state} />
|
<PrivacyPolicy {state} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue