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

View file

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