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) { if (localStorage) {
var theme = localStorage.getItem('theme'); var theme = localStorage.getItem('theme');
if (theme != null) { if (theme != null) {
...@@ -6,8 +6,7 @@ $(document).ready(function () { ...@@ -6,8 +6,7 @@ $(document).ready(function () {
localStorage.removeItem('theme'); localStorage.removeItem('theme');
} else { } else {
theme = theme.split(','); 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 @@ ...@@ -318,7 +318,7 @@
</li> </li>
@endif @endif
</ul> </ul>
<script src="{{ elixir('js/scriptStartPage.js') }}"></script> <script src="{{ elixir('js/scriptStartPage.js') }}"></script>
@endsection @endsection
@section('optionalContent') @section('optionalContent')
......
...@@ -18,6 +18,7 @@ ...@@ -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="/font-awesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="{{ elixir('css/themes/default.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" /> <link id="theme" type="text/css" rel="stylesheet" href="/css/theme.css.php" />
<script src="{{ elixir('js/scriptSubPages.js') }}"></script>
@if (isset($css)) @if (isset($css))
@if(is_array($css)) @if(is_array($css))
@foreach($css as $el) @foreach($css as $el)
...@@ -220,5 +221,4 @@ ...@@ -220,5 +221,4 @@
<img src="{{ action('ImageController@generateImage')}}?site={{ urlencode(url()->current()) }}" class="hidden" /> <img src="{{ action('ImageController@generateImage')}}?site={{ urlencode(url()->current()) }}" class="hidden" />
</div> </div>
</body> </body>
<script src="{{ elixir('js/scriptSubPages.js') }}"></script>
</html> </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