site now uses dark theme when it is night for you when logged out
This commit is contained in:
parent
81dbfbd06d
commit
2d2a7beef5
|
|
@ -207,6 +207,10 @@
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
#navbarlogincontainer {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#profilefriendscontainer p,
|
||||
#profilefriendscontainer a {
|
||||
display: inline;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,21 @@
|
|||
@endswitch
|
||||
@else
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<script>
|
||||
function getStylesheet() {
|
||||
var currentTime = new Date().getHours();
|
||||
if (7 >= currentTime && currentTime > 18) {} else {
|
||||
var li = document.createElement('link');
|
||||
var href = "{{ asset('css/appdark.css?id='.Str::random(8)) }}";
|
||||
var rel = 'stylesheet';
|
||||
li.setAttribute('href', href);
|
||||
li.setAttribute('rel', rel);
|
||||
var s = document.getElementsByTagName('head')[0];
|
||||
s.appendChild(li, s);
|
||||
}
|
||||
}
|
||||
getStylesheet()
|
||||
</script>
|
||||
@endauth
|
||||
@yield('extras')
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -17,21 +17,36 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
|
||||
@auth
|
||||
@switch (Auth::user()->settings->theme)
|
||||
@case(3)
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/appdark.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@break
|
||||
@case(2)
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/2018.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@break
|
||||
@switch (Auth::user()->settings->theme)
|
||||
@case(3)
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/appdark.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@break
|
||||
@case(2)
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/2018.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@break
|
||||
|
||||
@default
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@endswitch
|
||||
@default
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
@endswitch
|
||||
@else
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
|
||||
<script>
|
||||
function getStylesheet() {
|
||||
var currentTime = new Date().getHours();
|
||||
if (7 >= currentTime && currentTime > 18) {} else {
|
||||
var li = document.createElement('link');
|
||||
var href = "{{ asset('css/appdark.css?id='.Str::random(8)) }}";
|
||||
var rel = 'stylesheet';
|
||||
li.setAttribute('href', href);
|
||||
li.setAttribute('rel', rel);
|
||||
var s = document.getElementsByTagName('head')[0];
|
||||
s.appendChild(li, s);
|
||||
}
|
||||
}
|
||||
getStylesheet()
|
||||
</script>
|
||||
@endauth
|
||||
@yield('extras')
|
||||
</head>
|
||||
|
|
@ -39,17 +54,18 @@
|
|||
<body>
|
||||
<br>
|
||||
<div id="logo_signup">
|
||||
<a href="{{ route('index') }}"><img alt="ARCHBLOX Logo" src="{{ asset('img/ARCHBLOXarched.png') }}"
|
||||
width="200" height="40" /></a>
|
||||
<a href="{{ route('index') }}"><img alt="ARCHBLOX Logo" src="{{ asset('img/ARCHBLOXarched.png') }}" width="200"
|
||||
height="40" /></a>
|
||||
<p id="morbin">We're Still Morbin'</p>
|
||||
</div>
|
||||
<div class="content_signup">
|
||||
@yield('contentloggedout')
|
||||
</div>
|
||||
<div id="footer_signup">
|
||||
<p>ARCHBLOX is not affiliated with Roblox Corp, Lego, Sony, SEGA, Microsoft, Nintendo or any other company. We're still Morbin'!</p>
|
||||
<p>ARCHBLOX is not affiliated with Roblox Corp, Lego, Sony, SEGA, Microsoft, Nintendo or any other company.
|
||||
We're still Morbin'!</p>
|
||||
<p><a href="{{ route('privacy') }}">Privacy Policy</a> <a href="{{ route('tos') }}">Terms of Service</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Loading…
Reference in New Issue