better support for javascript disabled browsers
This commit is contained in:
parent
df5fc9890b
commit
d2a2d9459a
3 changed files with 13 additions and 3 deletions
|
@ -118,4 +118,12 @@ input#search::placeholder{
|
||||||
.footer{
|
.footer{
|
||||||
margin-top: 4rem;
|
margin-top: 4rem;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-previous, .pagination-next {
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-select-container{
|
||||||
|
margin-left:auto;
|
||||||
}
|
}
|
|
@ -16,6 +16,7 @@ function changeTheme(themeName) {
|
||||||
document.querySelectorAll('link.stylesheet').forEach(element => {
|
document.querySelectorAll('link.stylesheet').forEach(element => {
|
||||||
if (element.id === themeName) {
|
if (element.id === themeName) {
|
||||||
element.disabled = false;
|
element.disabled = false;
|
||||||
|
element.media = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alternates.push(element);
|
alternates.push(element);
|
||||||
|
@ -24,6 +25,7 @@ function changeTheme(themeName) {
|
||||||
|
|
||||||
alternates.forEach(element => {
|
alternates.forEach(element => {
|
||||||
element.disabled = true;
|
element.disabled = true;
|
||||||
|
element.media = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
saveTheme(themeName);
|
saveTheme(themeName);
|
||||||
|
|
|
@ -99,8 +99,8 @@
|
||||||
<footer class="footer js-only">
|
<footer class="footer js-only">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="content">
|
<div class="content is-flex">
|
||||||
<div class="is-pulled-right">
|
<div class="theme-select-container">
|
||||||
Theme:
|
Theme:
|
||||||
<select id="theme-select">
|
<select id="theme-select">
|
||||||
{% for theme in config.extra.zulma_themes %}
|
{% for theme in config.extra.zulma_themes %}
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
<link id="{{theme}}" class="stylesheet" rel="stylesheet"
|
<link id="{{theme}}" class="stylesheet" rel="stylesheet"
|
||||||
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<link id="{{theme}}" class="alternate stylesheet" disabled rel="stylesheet"
|
<link id="{{theme}}" class="alternate stylesheet" media="none" rel="stylesheet"
|
||||||
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue