Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
Change the dark/light mode by toggle

I have a website that can make dark/light mode from the backend but I would like to add this option to the frontend with toggle button in navbar the following code to switch between light and dark mode any seggtion with JS or HTML toggle ? , any help?

<div class="custom-control custom-switch">
    <input type="checkbox" class="custom-control-input" id="customSwitches">
    <label class="custom-control-label" for="customSwitches">Toggle this switch element</label>
</div>
        <form method="post" action="{{ route('admin.settings.update',$siteInfo->id) }}">
            @csrf
            @method('PUT')
            <input type="hidden" name="ui" value="2">
            <center><button class="btn btn-primary col-md-10 mb-1" @if($siteInfo->ui==2) type="button" @else  type="submit"  @endif> @if($siteInfo->ui==2) Active <i class="fa fa-check"></i> @else Select @endif </button> </center>
                    <center>
                        <br>
                        <b>Light Theme</b>
                    </center>
            </form>
            <form method="post" action="{{ route('admin.settings.update',$siteInfo->id) }}">
                @csrf
                @method('PUT')
                <input type="hidden" name="ui" value="1">
                <center><button class="btn btn-primary col-md-10 mb-1" @if($siteInfo->ui==1) type="button" @else   type="submit" @endif> @if($siteInfo->ui==1) Active <i class="fa fa-check"></i> @else Select @endif </button> </center>
                <center>
                    <br>
                    <b>Dark Theme</b>
                </center>
            </form>```
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda