Added Customization for making narrow reader the default using DefaultNarrowReader
configuration key
This commit is contained in:
parent
c878cdc727
commit
c75d4fd5af
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<main class="flex-1 flex flex-col">
|
||||
<SectionOutlet SectionName="GlobalHeader" />
|
||||
<input id="narrow-reading-toggle" type="checkbox" class="narrow-reading-toggle" />
|
||||
<input id="narrow-reading-toggle" checked="@Customizations.Value.DefaultNarrowReader" type="checkbox" class="narrow-reading-toggle" />
|
||||
<div class="flex-1 container mx-auto px-4 md:px-12 py-8 reading-toggle-target h-full">
|
||||
<AlertComponent CanDelete="true" />
|
||||
@Body
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<label for="narrow-reading-toggle" class="narrow-reading-toggle btn btn-square btn-sm swap max-lg:hidden" title="@Label" onclick="this.classList.toggle('swap-active')">
|
||||
@using Microsoft.Extensions.Options
|
||||
@using Wave.Data
|
||||
@inject IOptions<Customization> CustomizationOptions
|
||||
|
||||
<label for="narrow-reading-toggle"
|
||||
class="btn btn-square btn-sm swap max-lg:hidden @(CustomizationOptions.Value.DefaultNarrowReader ? "swap-active":"")"
|
||||
title="@Label" onclick="this.classList.toggle('swap-active')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="currentColor" class="swap-on fill-current">
|
||||
<path fill-rule="evenodd" d="M15 3.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V5.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l3.97-3.97h-2.69a.75.75 0 0 1-.75-.75Zm-12 0A.75.75 0 0 1 3.75 3h4.5a.75.75 0 0 1 0 1.5H5.56l3.97 3.97a.75.75 0 0 1-1.06 1.06L4.5 5.56v2.69a.75.75 0 0 1-1.5 0v-4.5Zm11.47 11.78a.75.75 0 1 1 1.06-1.06l3.97 3.97v-2.69a.75.75 0 0 1 1.5 0v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-3.97-3.97Zm-4.94-1.06a.75.75 0 0 1 0 1.06L5.56 19.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
|
|
@ -6,6 +6,7 @@ public class Customization {
|
|||
public string AppUrl { get; set; } = "http://localhost";
|
||||
public string DefaultTheme { get; set; } = "";
|
||||
public string DefaultLanguage { get; set; } = "";
|
||||
public bool DefaultNarrowReader { get; set; } = false;
|
||||
public string LogoLink { get; set; } = "";
|
||||
public string Footer { get; set; } = "";
|
||||
}
|
|
@ -36,7 +36,7 @@ @layer components {
|
|||
input.narrow-reading-toggle {
|
||||
display: none;
|
||||
}
|
||||
input.narrow-reading-toggle:checked ~ .reading-toggle-target {
|
||||
body:has(label[for=narrow-reading-toggle]) input.narrow-reading-toggle:checked + .reading-toggle-target {
|
||||
@apply max-w-3xl;
|
||||
}
|
||||
|
||||
|
|
2
Wave/wwwroot/css/main.min.css
vendored
2
Wave/wwwroot/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue