@include smaller-than($l) {
header .header-links {
+ @include lightDark(background-color, #fff, #333);
display: none;
- background-color: #FFF;
z-index: 10;
right: $-m;
border-radius: 4px;
display: block;
}
}
- header .links a, header .dropdown-container ul li a {
+ header .links a, header .dropdown-container ul li a, header .dropdown-container ul li button {
text-align: start;
display: block;
padding: $-s $-m;
color: $text-dark;
- fill: $text-dark;
+ @include lightDark(color, $text-dark, #eee);
svg {
margin-inline-end: $-s;
}
&:hover {
- background-color: #EEE;
- color: #444;
- fill: #444;
+ @include lightDark(background-color, #eee, #333);
+ @include lightDark(color, #000, #fff);
text-decoration: none;
}
}
@include lightDark(color, #555, #eee);
fill: currentColor;
white-space: nowrap;
+ line-height: 1.6;
+ cursor: pointer;
&:hover, &:focus {
text-decoration: none;
background-color: var(--color-primary-light);
</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>
<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
\ No newline at end of file
<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
\ No newline at end of file
<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
\ No newline at end of file
@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>
--- /dev/null
+<form action="{{ url('/settings/users/toggle-dark-mode') }}" method="post">
+ {{ csrf_field() }}
+ {{ method_field('patch') }}
+ @if(setting()->getForCurrentUser('dark-mode-enabled'))
+ <button class="{{ $classes ?? '' }}"><span>@icon('light-mode')</span><span>{{ trans('common.light_mode') }}</span></button>
+ @else
+ <button class="{{ $classes ?? '' }}"><span>@icon('dark-mode')</span><span>{{ trans('common.dark_mode') }}</span></button>
+ @endif
+</form>
\ No newline at end of file