fix ridiculous dark mode button look with noscript

pull/27/head
Ondřej Hruška 6 years ago
parent f48887b21a
commit 1e8deaef1a
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 8
      resources/assets/sass/bootstrap-customizations/_navbar.scss
  2. 2
      resources/views/layouts/nav-buttons.blade.php

@ -23,17 +23,17 @@
} }
@if $theme == 'dark' { @if $theme == 'dark' {
.dropdown-menu .dark-mode-switch-on { .page-navbar .dark-mode-switch-on {
display: block; display: block;
} }
.dropdown-menu .dark-mode-switch-off { .page-navbar .dark-mode-switch-off {
display: none; display: none;
} }
} @else { } @else {
.dropdown-menu .dark-mode-switch-on { .page-navbar .dark-mode-switch-on {
display: none; display: none;
} }
.dropdown-menu .dark-mode-switch-off { .page-navbar .dark-mode-switch-off {
display: block; display: block;
} }
} }

@ -19,7 +19,7 @@ $aclass = $dropdown ? 'dropdown-item' : 'nav-link';
{!! $li !!} {!! $li !!}
<form method="POST" action="{{ route('toggle-dark-mode') }}" aria-hidden="true"> <form method="POST" action="{{ route('toggle-dark-mode') }}" aria-hidden="true">
@csrf @csrf
<button id="toggle-dark-mode-btn" class="{{ $aclass }}" type="submit" onclick="event.preventDefault(); toggleDarkMode();"> <button id="toggle-dark-mode-btn" class="btn-link border-0 {{ $aclass }}" type="submit" onclick="event.preventDefault(); toggleDarkMode();">
<div class="dark-mode-switch-on"> <div class="dark-mode-switch-on">
<i class="fa-sun-o fa-pr"></i>{{ __('Light Mode') }} <i class="fa-sun-o fa-pr"></i>{{ __('Light Mode') }}
</div> </div>

Loading…
Cancel
Save