mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Rewrite and simplify stylesheet handling
Thanks to tk0miya's comment, I learnt one can add stuff to template blocks, that allows a much simpler stylesheet configuration, considering that changes at the template level will be more... well, low-level. Hopefully this is now acceptable.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{% extends "!layout.html" %}
|
||||
{% set css_files = css_files + ["_static/more_persistent.css", "_static/more_persistent2.css", "_static/more_default.css", "_static/more_alternate1.css", "_static/more_alternate2.css"] %}
|
||||
{% set _dummy = css_props.update(
|
||||
{"_static/more_default.css": {"title": "Default", "alternate": False},
|
||||
"_static/more_alternate1.css": {"title": "Alternate"},
|
||||
"_static/more_alternate2.css": {"alternate": True} }
|
||||
) %}
|
||||
{%- block csss %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="_static/more_persistent.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/more_default.css" type="text/css" title="Default" />
|
||||
<link rel="alternate stylesheet" href="_static/more_alternate1.css" type="text/css" title="Alternate" />
|
||||
<link rel="alternate stylesheet" href="_static/more_alternate2.css" type="text/css" />
|
||||
{%- endblock %}
|
||||
|
||||
Reference in New Issue
Block a user