extra config option to allow users to select their own style
This commit is contained in:
parent
e5b09a5d60
commit
bb48d3da34
10 changed files with 153 additions and 61 deletions
|
@ -76,6 +76,7 @@
|
|||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if config.build_search_index %}
|
||||
<div class="navbar-item search-container js-only">
|
||||
<input class="input is-primary" id="search" type="search" placeholder="Search">
|
||||
|
@ -91,4 +92,57 @@
|
|||
</nav>
|
||||
</header>
|
||||
{% endif %}
|
||||
{% endmacro navbar %}
|
||||
{% endmacro navbar %}
|
||||
|
||||
{% macro footer() %}
|
||||
{% if config.extra.zulma_allow_theme_selection %}
|
||||
<footer class="footer js-only">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="content">
|
||||
<div class="is-pulled-right">
|
||||
Theme:
|
||||
<select id="theme-select">
|
||||
{% for theme in config.extra.zulma_themes %}
|
||||
{% if config.extra.zulma_theme %}
|
||||
{% set default_theme = config.extra.zulma_theme %}
|
||||
{% else %}
|
||||
{% set default_theme = "default" %}
|
||||
{% endif %}
|
||||
{% if default_theme == theme %}
|
||||
<option selected="selected" value="{{ theme }}">{{ theme }}</option>
|
||||
{% else %}
|
||||
<option value="{{ theme }}">{{ theme }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
{% endmacro footer %}
|
||||
|
||||
{% macro css() %}
|
||||
{% if config.extra.zulma_allow_theme_selection %}
|
||||
{% for theme in config.extra.zulma_themes %}
|
||||
{% if config.extra.zulma_theme %}
|
||||
{% set default_theme = config.extra.zulma_theme %}
|
||||
{% else %}
|
||||
{% set default_theme = "default" %}
|
||||
{% endif %}
|
||||
{% if default_theme == theme %}
|
||||
<link id="{{theme}}" class="stylesheet" rel="stylesheet"
|
||||
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% else %}
|
||||
<link id="{{theme}}" class="stylesheet" media="none" rel="stylesheet"
|
||||
href="{{ get_url(path=theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elif config.extra.zulma_theme %}
|
||||
<link rel="stylesheet" href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ get_url(path="default.css", trailing_slash=false) }}" />
|
||||
{% endif %}
|
||||
{% endmacro css %}
|
Loading…
Add table
Add a link
Reference in a new issue