mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #1767 from Jellby/master
Allow setting 'rel' and 'title' attributes for stylesheets.
This commit is contained in:
8
tests/roots/test-stylesheets/_templates/layout.html
Normal file
8
tests/roots/test-stylesheets/_templates/layout.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "!layout.html" %}
|
||||
{%- 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 %}
|
||||
12
tests/roots/test-stylesheets/conf.py
Normal file
12
tests/roots/test-stylesheets/conf.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
templates_path = ['_templates']
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet('persistent.css')
|
||||
app.add_stylesheet('default.css', title="Default")
|
||||
app.add_stylesheet('alternate1.css', title="Alternate", alternate=True)
|
||||
app.add_stylesheet('alternate2.css', alternate=True)
|
||||
|
||||
4
tests/roots/test-stylesheets/index.rst
Normal file
4
tests/roots/test-stylesheets/index.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
test-stylesheets
|
||||
================
|
||||
|
||||
Lorem ipsum dolor
|
||||
Reference in New Issue
Block a user