fix: don't show theme picker if not logged in (#967)

Also tweak some of the styles and layout in the theme picker itself
This commit is contained in:
Nolan Lawson 2019-02-11 21:04:00 -08:00 committed by GitHub
parent 8179c1b53f
commit 4bf3c2fd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -2,11 +2,9 @@
<div class="theme-groups">
{#each themeGroups as themeGroup}
<div class="theme-group">
{#if themeGroup.dark}
<h2>Dark Background</h2>
{:else}
<h2>Light Background</h2>
{/if}
<h3>
{themeGroup.dark ? 'Dark background' : 'Light background' }
</h3>
{#each themeGroup.themes as theme}
<div class="theme-picker">
<input type="radio" id="choice-theme-{theme.name}"
@ -65,10 +63,18 @@
border: 2px solid #dadada;
}
h3 {
font-size: 1.4em;
}
@media (max-width: 479px) {
.theme-groups {
grid-template-columns: 1fr;
}
h3 {
margin-top: 0.5em;
}
}
</style>
<script>

View File

@ -63,8 +63,10 @@
</div>
</form>
<h2>{themeTitle}</h2>
<ThemeSettings instanceName={$currentInstance} />
{#if $isUserLoggedIn }
<h2>{themeTitle}</h2>
<ThemeSettings instanceName={$currentInstance} />
{/if}
</SettingsLayout>
<style>
.ui-settings {