1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 16:51:46 -07:00

Control project selection via the environment.

MMRef uses own layout, not scrolls layout.
Put title at the top and improve formatting.
Don't generate next/prev links to different directories.

Copied from Perforce
 Change: 186257
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-05-22 22:10:29 +01:00
parent 2dd5cc0e7b
commit 3c037431ed
3 changed files with 82 additions and 19 deletions

View file

@ -25,9 +25,16 @@ sys.path.insert(0, os.path.abspath('.'))
# -- Project configuration -----------------------------------------------------
# The same set of sources builds the Memory Pool System documentation
# and the Memory Management Reference.
# and the Memory Management Reference, depending on whether the MMREF
# environment variable is set.
if True:
if os.environ.get('MMREF'):
project = u'Memory Management Reference'
master_doc = 'index'
html_theme = 'mmref'
version = '4'
release = '4.0'
else:
project = u'Memory Pool System'
master_doc = 'index'
html_theme = 'mps'
@ -41,12 +48,6 @@ if True:
if m:
release, version = m.groups()
break
else:
project = u'Memory Management Reference'
master_doc = 'index'
html_theme = 'mmref'
version = '4'
release = '4.0'
# -- General configuration -----------------------------------------------------

View file

@ -0,0 +1,42 @@
{#
scrolls/layout.html
~~~~~~~~~~~~~~~~~~~
Sphinx layout template for the scrolls theme, originally written
by Armin Ronacher.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
{% set script_files = script_files + ['_static/theme_extras.js'] %}
{% set css_files = css_files + ['_static/print.css'] %}
{# do not display relbars #}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block content %}
<div id="content">
<div class="header">
<h1 class="heading"><a href="{{ pathto('index') }}"
title="Memory Management Reference"><span>Memory Management Reference</span></a></h1>
</div>
<div class="relnav">
{%- if prev and '../' not in prev.link %}
<a href="{{ prev.link|e }}">&laquo; {{ prev.title }}</a> |
{%- endif %}
<a href="{{ pathto(current_page_name) if current_page_name else '#' }}">{{ title }}</a>
{%- if next and '../' not in next.link %}
| <a href="{{ next.link|e }}">{{ next.title }} &raquo;</a>
{%- endif %}
</div>
<div id="contentwrapper">
{%- if display_toc %}
<div id="toc">
<h3>{{ _('Table Of Contents') }}</h3>
{{ toc }}
</div>
{%- endif %}
{% block body %}{% endblock %}
</div>
</div>
{% endblock %}

View file

@ -2,28 +2,38 @@
@import url('scrolls.css');
h1, h2, h3, h4, h5, h6, dl.glossary dt {
h2, h3, h4, h5, h6, dl.glossary dt {
font-family: {{ theme_headfont }};
}
dl.glossary dt {
font-size: 120%;
}
div.header {
background-image: none;
background-color: {{ theme_headerbg }};
border-top: none;
}
h1.heading {
height: auto;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
}
h1.heading:hover {
background: #73626E;
}
h1.heading a {
background-image: url(logo.png);
background-size: auto 100%;
background-position: center;
background-repeat: no-repeat;
background-image: none;
display: block;
width: 100%;
height: 80px;
height: auto;
font-size: 150%;
}
h1.heading span {
display: block;
color: {{ theme_textcolor }};
}
a, a:visited, a.reference.internal {
@ -75,4 +85,14 @@ img.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
}
dl.glossary dt {
font-size: 120%;
margin-top: 1em;
}
p.glossary-alphabet {
font-weight: bold;
text-align: center;
}