mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 07:26:02 +00:00
Lots of new code.
This commit is contained in:
@@ -8,6 +8,51 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
|
||||
<script type="text/javascript">
|
||||
/*!
|
||||
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
|
||||
* Copyright 2011-2023 The Bootstrap Authors
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License.
|
||||
*/
|
||||
|
||||
(() => {
|
||||
'use strict'
|
||||
// todo store just happens to store in localStorage but if not, this would break.
|
||||
const getStoredTheme = () => JSON.parse(localStorage.getItem('darkMode'))
|
||||
const setStoredTheme = theme => localStorage.setItem('darkMode', theme)
|
||||
|
||||
const getPreferredTheme = () => {
|
||||
const storedTheme = getStoredTheme()
|
||||
if (storedTheme) {
|
||||
return storedTheme
|
||||
}
|
||||
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
||||
}
|
||||
|
||||
const setTheme = theme => {
|
||||
if (theme === 'browser' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark')
|
||||
return;
|
||||
}
|
||||
if (theme === 'browser' && window.matchMedia('(prefers-color-scheme: light)').matches) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light')
|
||||
return;
|
||||
}
|
||||
document.documentElement.setAttribute('data-bs-theme', theme)
|
||||
}
|
||||
|
||||
setTheme(getPreferredTheme())
|
||||
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
||||
const storedTheme = getStoredTheme()
|
||||
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
||||
setTheme(getPreferredTheme())
|
||||
}
|
||||
})
|
||||
})()
|
||||
</script>
|
||||
|
||||
<title>
|
||||
@if($subTitle)
|
||||
{{ $subTitle }} »
|
||||
@@ -23,7 +68,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!--begin::Fonts-->
|
||||
<link href="v4/css/fonts.css" rel="stylesheet">
|
||||
<link href="v2/css/fonts.css" rel="stylesheet">
|
||||
<!--end::Fonts-->
|
||||
|
||||
<!--begin::Third Party Plugin(OverlayScrollbars)-->
|
||||
@@ -39,7 +84,7 @@
|
||||
--}}
|
||||
<!--end::Third Party Plugin(Bootstrap Icons)-->
|
||||
<!--begin::Required Plugin(AdminLTE)-->
|
||||
<link rel="stylesheet" href="v4/css/adminlte.css">
|
||||
<link rel="stylesheet" href="v2/css/adminlte.css">
|
||||
<!--end::Required Plugin(AdminLTE)-->
|
||||
@yield('vite')
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
crossorigin="anonymous"></script>
|
||||
--}}
|
||||
<!--end::Required Plugin(Bootstrap 5)--><!--begin::Required Plugin(AdminLTE)-->
|
||||
<script src="v4/js/adminlte.js"></script>
|
||||
<script src="v2/js/adminlte.js"></script>
|
||||
<!--end::Required Plugin(AdminLTE)-->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!--begin::Brand Link-->
|
||||
<a href="{{route('index') }}" class="brand-link">
|
||||
<!--begin::Brand Image-->
|
||||
<img src="v4/i/logo.png" alt="Firefly III Logo"
|
||||
<img src="v2/i/logo.png" alt="Firefly III Logo"
|
||||
class="brand-image opacity-75 shadow">
|
||||
<!--end::Brand Image-->
|
||||
<!--begin::Brand Text-->
|
||||
|
||||
Reference in New Issue
Block a user