mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #21190 -- Added a new ePub theme for documentation.
This commit is contained in:
parent
9a4ee8ddb8
commit
59d9b26474
8 changed files with 121 additions and 2 deletions
10
docs/_theme/djangodocs-epub/epub-cover.html
vendored
Normal file
10
docs/_theme/djangodocs-epub/epub-cover.html
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{%- extends "epub/epub-cover.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="epub-cover">
|
||||
<h1>Django Documentation</h1>
|
||||
<h2><em>Release {{ release }}</em></h2>
|
||||
<h3>{{ copyright }}</h3>
|
||||
<p>{{ last_updated }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
1
docs/_theme/djangodocs-epub/static/docicons-behindscenes.png
vendored
Symbolic link
1
docs/_theme/djangodocs-epub/static/docicons-behindscenes.png
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../djangodocs/static/docicons-behindscenes.png
|
1
docs/_theme/djangodocs-epub/static/docicons-note.png
vendored
Symbolic link
1
docs/_theme/djangodocs-epub/static/docicons-note.png
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../djangodocs/static/docicons-note.png
|
1
docs/_theme/djangodocs-epub/static/docicons-philosophy.png
vendored
Symbolic link
1
docs/_theme/djangodocs-epub/static/docicons-philosophy.png
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../djangodocs/static/docicons-philosophy.png
|
1
docs/_theme/djangodocs-epub/static/docicons-warning.png
vendored
Symbolic link
1
docs/_theme/djangodocs-epub/static/docicons-warning.png
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../djangodocs/static/docicons-warning.png
|
67
docs/_theme/djangodocs-epub/static/epub.css
vendored
Normal file
67
docs/_theme/djangodocs-epub/static/epub.css
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
h1 { margin-top: 0; }
|
||||
|
||||
/* Keep lists a bit narrow to maximize page estate regarding width. */
|
||||
ol, ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 1.3em;
|
||||
}
|
||||
|
||||
/* Images should never exceed the width of the page. */
|
||||
img { max-width: 100%; }
|
||||
|
||||
/* Don't display URL after links, this is not print. */
|
||||
.link-target { display: none; }
|
||||
|
||||
/* This is the front cover page of the book. */
|
||||
.epub-cover { text-align: center; }
|
||||
.epub-cover h1 { margin: 4em 0 0 0; }
|
||||
.epub-cover h2 { margin: 1em 0; }
|
||||
.epub-cover h3 { margin: 3em 0 2em 0; }
|
||||
|
||||
/* Code examples should never exceed the width of the page, so wrap instead. */
|
||||
pre, span.pre { white-space: pre-wrap; }
|
||||
|
||||
pre {
|
||||
background-color: #f6f6f6;
|
||||
border: 0;
|
||||
padding: 0.5em;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* Header for some code blocks. */
|
||||
.snippet-filename {
|
||||
background-color: #393939;
|
||||
color: white;
|
||||
margin: 0;
|
||||
padding: 0.5em;
|
||||
font: bold 90% monospace;
|
||||
}
|
||||
.snippet-filename + .highlight > pre,
|
||||
.snippet-filename + pre {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
a:link, a:visited { color: #396623; }
|
||||
a:hover { color: #1d3311; }
|
||||
|
||||
/* Use special styled note boxes from the default theme, but with the left side
|
||||
fitted after the icon, to allow text resizing with breaking. */
|
||||
.note, .admonition {
|
||||
background-position: 9px 0.8em;
|
||||
background-repeat: no-repeat;
|
||||
padding: 0.8em 1em 0.8em 65px;
|
||||
margin: 1em 0;
|
||||
border: 0.01em solid black;
|
||||
}
|
||||
|
||||
.note, .admonition { background-image: url(docicons-note.png); }
|
||||
div.admonition-philosophy { background-image: url(docicons-philosophy.png); }
|
||||
div.admonition-behind-the-scenes { background-image: url(docicons-behindscenes.png); }
|
||||
.admonition.warning { background-image: url(docicons-warning.png); }
|
||||
|
||||
.admonition-title {
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.admonition .last { margin-bottom: 0; }
|
8
docs/_theme/djangodocs-epub/theme.conf
vendored
Normal file
8
docs/_theme/djangodocs-epub/theme.conf
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
[theme]
|
||||
inherit = epub
|
||||
stylesheet = epub.css
|
||||
pygments_style = trac
|
||||
|
||||
[options]
|
||||
relbar1 = false
|
||||
footer = false
|
Loading…
Add table
Add a link
Reference in a new issue