ui: redesign

This commit is contained in:
Andras Bacsai
2024-03-19 15:37:16 +01:00
parent 42715bba50
commit 91950e1891
40 changed files with 481 additions and 436 deletions

View File

@@ -1,17 +1,15 @@
@extends('layouts.base')
@section('body')
@parent
<x-navbar />
@persist('magic-bar')
<div class="fixed z-30 top-[4.5rem] left-4" id="vue">
<magic-bar></magic-bar>
</div>
@endpersist
<livewire:layout-popups />
@auth
<livewire:realtime-connection />
@endauth
<main class="pb-10 main">
{{ $slot }}
<main class="flex gap-2">
<x-navbar />
<div class="w-full px-10 pt-4">
{{ $slot }}
</div>
</main>
@endsection

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html data-theme="coollabs" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<html data-theme="coolify" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
@@ -38,6 +38,7 @@
@section('body')
<body>
{{-- <button onclick="changeTheme()" class="fixed z-50 left-52">Dark/light</button> --}}
@livewire('wire-elements-modal')
<dialog id="help" class="modal">
<livewire:help />
@@ -48,6 +49,22 @@
<x-toast />
<x-version class="fixed left-2 bottom-1" />
<script data-navigate-once>
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia(
'(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
function changeTheme() {
if (localStorage.theme === 'dark') {
localStorage.theme = 'light'
document.documentElement.classList.remove('dark')
} else {
localStorage.theme = 'dark'
document.documentElement.classList.add('dark')
}
}
@auth
window.Pusher = Pusher;
window.Echo = new Echo({