Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
c130539c
Commit
c130539c
authored
Sep 06, 2017
by
Aria Givi
Browse files
laden des themes ohne jquery, stylesheet link wird nun direkt angepasst bevor die seite geladen ist
parent
51d7f048
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/js/scriptSubPages.js
View file @
c130539c
$
(
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
resources/views/index.blade.php
View file @
c130539c
...
...
@@ -318,7 +318,7 @@
</
li
>
@
endif
</
ul
>
<
script
src
=
"{{ elixir('js/scriptStartPage.js') }}"
></
script
>
<
script
src
=
"{{ elixir('js/scriptStartPage.js') }}"
></
script
>
@
endsection
@
section
(
'optionalContent'
)
...
...
resources/views/layouts/staticPages.blade.php
View file @
c130539c
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment