Skip to content

Commit cef830b

Browse files
author
Geoffroy Schmitlin
committed
Added a custom sphinx theme based on default. Added menu to sidebar. Other small css fixes.
1 parent cbe3ad0 commit cef830b

File tree

6 files changed

+230
-87
lines changed

6 files changed

+230
-87
lines changed

conf.py

100644100755
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@
107107

108108
# The theme to use for HTML and HTML Help pages. See the documentation for
109109
# a list of builtin themes.
110-
html_theme = 'default'
110+
html_theme = 'hyperboria-theme'
111+
html_theme_path = ["."]
111112

112113
# Theme options are theme-specific and customize the look and feel of a theme
113114
# further. For a list of options available for each theme, see the
@@ -136,7 +137,7 @@
136137
# Add any paths that contain custom static files (such as style sheets) here,
137138
# relative to this directory. They are copied after the builtin static files,
138139
# so a file named "default.css" will overwrite the builtin "default.css".
139-
html_static_path = ['_static']
140+
# html_static_path = ['_static']
140141

141142
# Add any extra paths that contain custom files (such as robots.txt or
142143
# .htaccess) here, relative to this directory. These files are copied

css/main.css

Lines changed: 0 additions & 23 deletions
This file was deleted.

hyperboria-theme/layout.html

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{#
2+
hyperboria-theme/layout.html
3+
~~~~~~~~~~~~~~~~~~~
4+
5+
Sphinx layout template for the default theme.
6+
7+
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
8+
:license: BSD, see LICENSE for details.
9+
#}
10+
11+
{%- extends "basic/layout.html" %}
12+
13+
{%- block sidebartoc %}
14+
15+
16+
17+
{% set sidebar_menu = [
18+
('title', 'About Hyperboria'),
19+
('Asking Questions *TODO*', 'todo'),
20+
('Peering', 'faq/peering'),
21+
('Security', 'faq/security'),
22+
('Meshlocals', 'meshlocals/intro',
23+
[('Meshlocals around the world', 'meshlocals/existing/index'),
24+
('Starting a Meshlocal', 'meshlocals/diy')]),
25+
('FAQ', 'faq/general'),
26+
('Achievements', 'achievements'),
27+
('Glossary', 'faq/glossary'),
28+
29+
('title', 'The cjdns routing protocol'),
30+
('About', '', [
31+
('Goals', 'project-goals'),
32+
('Goals (russian)', 'project-goals-ru'),
33+
('Original whitepaper', 'Whitepaper'),
34+
('Brief intro', 'intro'),
35+
('Security Specification', 'security-specifications'),
36+
]),
37+
('Installation', '', [
38+
('Most Linuxes *TODO*', 'todo'),
39+
('OpenWrt', 'install/openwrt'),
40+
('Android *TODO*', 'todo'),
41+
('Firefox OS *TODO*', 'todo'),
42+
('OS X', 'install/osx'),
43+
('Debian Wheezy', 'install/debian-wheezy'),
44+
('Debian Jessie', 'install/debian-jessie'),
45+
('Arch', 'install/arch'),
46+
('Fedora', 'install/fedora'),
47+
('FreeBSD *TODO*', 'todo'),
48+
('OpenBSD *TODO*', 'todo'),
49+
('Windows', 'install/windows'),
50+
('Building *on* Windows', 'install/build-on-windows'),
51+
('Securing your Windows system', 'config/windows-firewall'),
52+
]),
53+
('Usage', '', [
54+
('Setup', 'config/configure'),
55+
('Operator guidelines', 'cjdns/operator-guidelines'),
56+
('Securing your system', 'config/network-services'),
57+
('Tools *TODO*', 'todo'),
58+
('Third party tools', 'ctrls'),
59+
('Admin API', 'cjdns/admin-api'),
60+
]),
61+
('Working with cjdns', '', [
62+
('Anatomy of cjdroute', 'cjdns/anatomy'),
63+
('Peering over UDP', 'cjdns/peering-over-UDP-IP'),
64+
('nodeinfo.json', 'cjdns/nodeinfo-json'),
65+
('Changelog', 'cjdns/changelog'),
66+
]),
67+
('HowTo', '', [
68+
('Using cjdns as a VPN', 'config/tunnel'),
69+
('Shorewall and VPN gateway', 'config/shorewall-and-vpn-gateway-howto'),
70+
('NAT gateway for non-cjdns nodes', 'config/nat-gateway'),
71+
('Autostart at login', 'config/autostart-at-login'),
72+
('Run as non-root user', 'config/non-root-user'),
73+
]),
74+
('Troubleshooting', '', [
75+
('Read this first', 'bugs/policy'),
76+
('Memory leaks', 'bugs/debugging-memory-leaks'),
77+
('SecComp', 'bugs/Seccomp'),
78+
('Analyzing network IO', 'traffic-analysis'),
79+
]),
80+
('Known issues', '', [
81+
('Horizon', 'bugs/horizon'),
82+
('Black Hole', 'bugs/black-hole'),
83+
('Secret Santa', 'bugs/santa'),
84+
]),
85+
('Configurator timeout', '', [
86+
('Firewall on localhost', 'bugs/configurator-timeout'),
87+
('UDP overflow', 'bugs/connectTo-overflow'),
88+
('Hidden Peers', 'bugs/hidden-peers'),
89+
]),
90+
('OS/distro-specific quirks', 'bugs/distro-quirks'),
91+
('Reporting bugs', 'bugs/reporting')
92+
93+
]%}
94+
95+
96+
97+
{%- include "localtoc.html" %}
98+
<h3><a href="{{ pathto('index') }}">Menu</a></h3>
99+
<ul class="sidebar_menu">
100+
{% for link in sidebar_menu %}
101+
{% if link[0] == 'title' %}
102+
<h4>{{ link[1] }}</h4>
103+
{% else %}
104+
{% if link[1] == '' %}
105+
<li class="subtitle">{{ link[0] }}</li>
106+
{% elif link[1] == 'todo' %}
107+
<li class='todo'>{{ link[0] }}</li>
108+
{% else %}
109+
<li><a href="{{ pathto(link[1]) }}">{{ link[0] }}</a></li>
110+
{% endif %}
111+
{% if link[2] %}
112+
<ul>
113+
114+
{% for sublink in link[2] %}
115+
{% if sublink[1] == 'todo' %}
116+
<li class='todo'>{{ sublink[0] }}</li>
117+
{% else %}
118+
<li><a href="{{ pathto(sublink[1]) }}">{{ sublink[0] }}</a></li>
119+
{% endif %}
120+
{% endfor %}
121+
</ul>
122+
{% endif %}
123+
124+
{% endif %}
125+
{% endfor %}
126+
</ul>
127+
128+
129+
130+
{%- endblock %}
131+

hyperboria-theme/static/main.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@import url("default.css");
2+
3+
4+
html, body{
5+
font-family: Helvetica-neue, Sans-Serif;
6+
height: 100%;
7+
}
8+
9+
.body {
10+
min-height: 1500px;
11+
}
12+
13+
14+
.document .sphinxsidebar li {
15+
text-overflow: ellipsis;
16+
list-style-position:inside;
17+
overflow: hidden;
18+
}
19+
20+
.document .sphinxsidebar ul {
21+
margin-right: 0;
22+
}
23+
24+
.todo {
25+
color: #ccc;
26+
}
27+
28+
.content {
29+
width: 90%;
30+
}
31+

hyperboria-theme/theme.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[theme]
2+
inherit = default
3+
stylesheet = main.css

index.md

100644100755
Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -17,86 +17,86 @@ You can contribute to its documentaion: https://github.com/hyperboria/docs
1717

1818
## About Hyperboria
1919

20-
- [Asking Questions](wtfm.md) *TODO*
21-
- [Peering](faq/peering.md)
22-
- [Security](faq/security.md)
23-
- [Meshlocals](meshlocals/intro.md)
24-
- [Meshlocals around the world](meshlocals/existing/index.md)
25-
- [Starting a Meshlocal](meshlocals/diy.md)
26-
- [FAQ](faq/general.md)
27-
- [Achievements](achievements.md)
28-
- [Glossary](faq/glossary.md)
20+
- [Asking Questions](wtfm.html) *TODO*
21+
- [Peering](faq/peering.html)
22+
- [Security](faq/security.html)
23+
- [Meshlocals](meshlocals/intro.html)
24+
- [Meshlocals around the world](meshlocals/existing/index.html)
25+
- [Starting a Meshlocal](meshlocals/diy.html)
26+
- [FAQ](faq/general.html)
27+
- [Achievements](achievements.html)
28+
- [Glossary](faq/glossary.html)
2929

3030

3131
## The cjdns routing protocol
3232

3333
- About
34-
- [Goals](project-goals.md) ([russian](project-goals-ru.md))
35-
- [Original whitepaper](Whitepaper.md)
36-
- [Brief intro](intro.md)
37-
- [Security Specification](security-specifications.md)
34+
- [Goals](project-goals.html) ([russian](project-goals-ru.html))
35+
- [Original whitepaper](Whitepaper.html)
36+
- [Brief intro](intro.html)
37+
- [Security Specification](security-specifications.html)
3838
- Installation
39-
- [Most Linuxes](install/linux.md) *TODO*
40-
- [OpenWrt](install/openwrt.md)
41-
- [Android](install/android.md) *TODO*
42-
- [Firefox OS](install/firefoxos.md) *TODO*
43-
- [OS X](install/osx.md)
44-
- [Debian Wheezy](install/debian-wheezy.md)
45-
- [Debian Jessie](install/debian-jessie.md)
46-
- [Arch](install/arch.md)
47-
- [Fedora](install/fedora.md)
48-
- [FreeBSD](install/freebsd.md) *TODO*
49-
- [OpenBSD](install/openbsd.md) *TODO*
50-
- [Windows](install/windows.md)
51-
- [Building *on* Windows](install/build-on-windows.md)
52-
- [Securing your Windows system](config/windows-firewall.md)
39+
- [Most Linuxes](install/linux.html) *TODO*
40+
- [OpenWrt](install/openwrt.html)
41+
- [Android](install/android.html) *TODO*
42+
- [Firefox OS](install/firefoxos.html) *TODO*
43+
- [OS X](install/osx.html)
44+
- [Debian Wheezy](install/debian-wheezy.html)
45+
- [Debian Jessie](install/debian-jessie.html)
46+
- [Arch](install/arch.html)
47+
- [Fedora](install/fedora.html)
48+
- [FreeBSD](install/freebsd.html) *TODO*
49+
- [OpenBSD](install/openbsd.html) *TODO*
50+
- [Windows](install/windows.html)
51+
- [Building *on* Windows](install/build-on-windows.html)
52+
- [Securing your Windows system](config/windows-firewall.html)
5353
- Usage
54-
- [Setup](config/configure.md)
55-
- [Operator guidelines](cjdns/operator-guidelines.md)
56-
- [Securing your system](config/network-services.md)
57-
- [Tools](tools/index.md) *TODO*
58-
- [Third party tools](ctrls.md)
59-
- [Admin API](cjdns/admin-api.md)
54+
- [Setup](config/configure.html)
55+
- [Operator guidelines](cjdns/operator-guidelines.html)
56+
- [Securing your system](config/network-services.html)
57+
- [Tools](tools/index.html) *TODO*
58+
- [Third party tools](ctrls.html)
59+
- [Admin API](cjdns/admin-api.html)
6060
- Working with cjdns
61-
- [Anatomy of cjdroute](cjdns/anatomy.md)
62-
- [Peering over UDP](cjdns/peering-over-UDP-IP.md)
63-
- [nodeinfo.json](cjdns/nodeinfo-json.md)
64-
- [Changelog](cjdns/changelog.md)
61+
- [Anatomy of cjdroute](cjdns/anatomy.html)
62+
- [Peering over UDP](cjdns/peering-over-UDP-IP.html)
63+
- [nodeinfo.json](cjdns/nodeinfo-json.html)
64+
- [Changelog](cjdns/changelog.html)
6565
- HowTo
66-
- [Using cjdns as a VPN](config/tunnel.md)
67-
- [Shorewall and VPN gateway](config/shorewall-and-vpn-gateway-howto.md)
68-
- [NAT gateway for non-cjdns nodes](config/nat-gateway.md)
69-
- [Autostart at login](config/autostart-at-login.md)
70-
- [Run as non-root user](config/non-root-user.md)
66+
- [Using cjdns as a VPN](config/tunnel.html)
67+
- [Shorewall and VPN gateway](config/shorewall-and-vpn-gateway-howto.html)
68+
- [NAT gateway for non-cjdns nodes](config/nat-gateway.html)
69+
- [Autostart at login](config/autostart-at-login.html)
70+
- [Run as non-root user](config/non-root-user.html)
7171
- Troubleshooting
72-
- [Read this first](bugs/policy.md)
73-
- [Memory leaks](bugs/debugging-memory-leaks.md)
74-
- [SecComp](bugs/Seccomp.md)
75-
- [Analyzing network IO](traffic-analysis.md)
72+
- [Read this first](bugs/policy.html)
73+
- [Memory leaks](bugs/debugging-memory-leaks.html)
74+
- [SecComp](bugs/Seccomp.html)
75+
- [Analyzing network IO](traffic-analysis.html)
7676
- Known issues
77-
- [Horizon](bugs/horizon.md)
78-
- [Black Hole](bugs/black-hole.md)
79-
- [Secret Santa](bugs/santa.md)
77+
- [Horizon](bugs/horizon.html)
78+
- [Black Hole](bugs/black-hole.html)
79+
- [Secret Santa](bugs/santa.html)
8080
- Configurator timeout
81-
- [Firewall on localhost](bugs/configurator-timeout.md)
82-
- [UDP overflow](bugs/connectTo-overflow.md)
83-
- ~~[Hidden Peers](bugs/hidden-peers.md)~~
84-
- [OS/distro-specific quirks](bugs/distro-quirks.md)
85-
- [Reporting bugs](bugs/reporting.md)
81+
- [Firewall on localhost](bugs/configurator-timeout.html)
82+
- [UDP overflow](bugs/connectTo-overflow.html)
83+
- ~~[Hidden Peers](bugs/hidden-peers.html)~~
84+
- [OS/distro-specific quirks](bugs/distro-quirks.html)
85+
- [Reporting bugs](bugs/reporting.html)
8686

8787

8888
## Random notes, work-in-progress, inbox
8989

9090
These notes are unstructured, and most of them likely outdated.
9191

92-
* [Interesting links](notes/links.md)
93-
* [ansuz' Q&A with Arceliar](notes/arc-workings.md)
94-
* [cjdns-core](notes/cjdns-core.md)
95-
* [cryptography](notes/cryptography.md)
96-
* [cjdroute.conf](notes/cjdroute-conf.md)
97-
* [./do](notes/do.md)
98-
* [DNS ideas](notes/dns.md)
99-
* [DJC layer model](djc-layer-model.md)
92+
* [Interesting links](notes/links.html)
93+
* [ansuz' Q&A with Arceliar](notes/arc-workings.html)
94+
* [cjdns-core](notes/cjdns-core.html)
95+
* [cryptography](notes/cryptography.html)
96+
* [cjdroute.conf](notes/cjdroute-conf.html)
97+
* [./do](notes/do.html)
98+
* [DNS ideas](notes/dns.html)
99+
* [DJC layer model](djc-layer-model.html)
100100
* [Benchmarks](benchmark.txt)
101101
* [Fun with the switch](switchfun.txt)
102102

0 commit comments

Comments
 (0)