more changes to css theming; it should now be much more responsive, have less FOUC's and not load a bunch of unused css when it isn't in use.
This commit is contained in:
parent
1e88a4bdcf
commit
09c17330d6
4 changed files with 104 additions and 81 deletions
|
@ -125,24 +125,10 @@
|
|||
{% 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 %}
|
||||
<link id="{{config.extra.zulma_theme}}" class="stylesheet" rel="stylesheet"
|
||||
href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% 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="alternate 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) }}" />
|
||||
<link id="default" class="stylesheet" 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