1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Some further dark-mode fixes, added toggle to homepage

- Homepage toggle especially useful for not-logged-in users since they
do not have a dropdown.
This commit is contained in:
Dan Brown
2020-04-12 19:06:34 +01:00
parent b80b6ed942
commit 88dfb40c63
8 changed files with 31 additions and 17 deletions

View File

@ -72,15 +72,7 @@
</li>
<li><hr></li>
<li>
<form action="{{ url('/settings/users/toggle-dark-mode') }}" method="post">
{{ csrf_field() }}
{{ method_field('patch') }}
@if(setting()->getForCurrentUser('dark-mode-enabled'))
<button>@icon('light-mode'){{ trans('common.light_mode') }}</button>
@else
<button>@icon('dark-mode'){{ trans('common.dark_mode') }}</button>
@endif
</form>
@include('partials.dark-mode-toggle')
</li>
</ul>
</div>

View File

@ -14,6 +14,7 @@
<div class="icon-list text-primary">
@include('partials.view-toggle', ['view' => $view, 'type' => 'books'])
@include('components.expand-toggle', ['target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
@include('partials.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
</div>
</div>
@stop

View File

@ -19,6 +19,7 @@
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
@include('components.expand-toggle', ['target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
@include('partials.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
</div>
</div>
@stop

View File

@ -14,6 +14,7 @@
<div class="icon-list text-primary">
@include('partials.view-toggle', ['view' => $view, 'type' => 'shelves'])
@include('components.expand-toggle', ['target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
@include('partials.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
</div>
</div>
@stop

View File

@ -3,8 +3,17 @@
@section('body')
<div class="container px-xl py-s">
<div class="icon-list inline block">
@include('components.expand-toggle', ['target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
<div class="grid half">
<div>
<div class="icon-list inline block">
@include('components.expand-toggle', ['target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
</div>
</div>
<div class="text-m-right">
<div class="icon-list inline block">
@include('partials.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
</div>
</div>
</div>
</div>