Commit c130539c authored by Aria Givi's avatar Aria Givi
Browse files

laden des themes ohne jquery, stylesheet link wird nun direkt angepasst bevor die seite geladen ist

parent 51d7f048
$(document).ready(function () {
if (localStorage) {
var theme = localStorage.getItem('theme');
if (theme != null) {
......@@ -6,8 +6,7 @@ $(document).ready(function () {
localStorage.removeItem('theme');
} else {
theme = theme.split(',');
$('#theme').attr('href', '/css/theme.css.php?r=' + theme[0] + '&g=' + theme[1] + '&b=' + theme[2] + '&a=' + theme[3]);
document.getElementById('theme').setAttribute('href', '/css/theme.css.php?r=' + theme[0] + '&g=' + theme[1] + '&b=' + theme[2] + '&a=' + theme[3]);
}
}
}
});
\ No newline at end of file
......@@ -318,7 +318,7 @@
</li>
@endif
</ul>
<script src="{{ elixir('js/scriptStartPage.js') }}"></script>
<script src="{{ elixir('js/scriptStartPage.js') }}"></script>
@endsection
@section('optionalContent')
......
......@@ -18,6 +18,7 @@
<link type="text/css" rel="stylesheet" href="/font-awesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="{{ elixir('css/themes/default.css') }}" />
<link id="theme" type="text/css" rel="stylesheet" href="/css/theme.css.php" />
<script src="{{ elixir('js/scriptSubPages.js') }}"></script>
@if (isset($css))
@if(is_array($css))
@foreach($css as $el)
......@@ -220,5 +221,4 @@
<img src="{{ action('ImageController@generateImage')}}?site={{ urlencode(url()->current()) }}" class="hidden" />
</div>
</body>
<script src="{{ elixir('js/scriptSubPages.js') }}"></script>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment