Skip to content

Commit da3e969

Browse files
committed
First version
Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
1 parent f3b81d2 commit da3e969

24 files changed

Lines changed: 1220 additions & 675 deletions

LICENSE

Lines changed: 201 additions & 674 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
ifeq ($(VERBOSE),1)
5+
Q =
6+
else
7+
Q = @
8+
endif
9+
10+
# You can set these variables from the command line.
11+
SPHINXOPTS ?=
12+
SPHINXBUILD = sphinx-build
13+
SPHINXPROJ = "EasyNavigation Documentation"
14+
SOURCEDIR = .
15+
BUILDDIR = _build
16+
17+
DOC_TAG ?= development
18+
RELEASE ?= latest
19+
PUBLISHDIR = /tmp/EasyNav
20+
21+
# Put it first so that "make" without argument is like "make help".
22+
help:
23+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
24+
@echo ""
25+
@echo "make publish"
26+
@echo " publish generated html to thesofproject.github.io site:"
27+
@echo " specify RELEASE=name to publish as a tagged release version"
28+
@echo " and placed in a version subfolder. Requires repo merge permission."
29+
30+
.PHONY: help Makefile
31+
32+
# Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
33+
# api folder for publishing along with the Sphinx-generated API docs.
34+
35+
html:
36+
$(Q)$(SPHINXBUILD) -t $(DOC_TAG) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O)
37+
38+
# Remove generated content (Sphinx and doxygen)
39+
40+
clean:
41+
rm -fr $(BUILDDIR)
42+
43+
# Copy material over to the GitHub pages staging repo
44+
# along with a README
45+
46+
publish:
47+
git clone --reference . https://github.com/EasyNavigation/EasyNavigation.github.io.git $(PUBLISHDIR)
48+
cd $(PUBLISHDIR) && \
49+
git checkout gh-pages && \
50+
git config user.email "fmrico@gmail.com" && \
51+
git config user.name "fmrico"
52+
rm -fr $(PUBLISHDIR)/*
53+
cp -r $(BUILDDIR)/html/* $(PUBLISHDIR)
54+
cp scripts/.nojekyll $(PUBLISHDIR)/.nojekyll
55+
# cp scripts/CNAME $(PUBLISHDIR)/CNAME
56+
cd $(PUBLISHDIR) && \
57+
git add -A && \
58+
git diff-index --quiet HEAD || \
59+
(git commit -s -m "[skip ci] publish $(RELEASE)" && git push origin)
60+
61+
62+
# Catch-all target: route all unknown targets to Sphinx using the new
63+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
64+
%: Makefile doxy
65+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
# EasyNavigation.github.io
1+
# /EasyNavigation.github.io
2+
3+
https://github.com/EasyNavigation/EasyNavigation.github.io
4+
5+
This folder holds the source and configuration files used to generate the
6+
[EasyNav documentation](https://github.com/EasyNavigation/EasyNavigation.git) web site.
7+
8+
Dependencies for Build:
9+
10+
``` bash
11+
sudo apt install python3-pip
12+
pip3 install -r requirements.txt
13+
```
14+
15+
Build the docs locally with `make html` and you'll find the built docs entry point in `_build/html/index.html`.
16+

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-slate
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{% extends "sphinx_rtd_theme/layout.html" %}
2+
3+
{% block extrahead %}
4+
5+
<link rel="stylesheet" href="{{ pathto('_static/tcs_theme.css', 1) }}" type="text/css" />
6+
7+
{% endblock %}
8+
9+
{% block content %}
10+
11+
<span style="float: right;" >
12+
<a class="github-button" href="https://github.com/EasyNavigation/EasyNavigation.github.io" data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large" aria-label="Edit IntelligentRoboticsLabs/EasyNav.github.io on GitHub" ">Edit</a>
13+
</span>
14+
15+
{{ super() }}
16+
17+
{% endblock %}
18+
19+
{% block footer %}
20+
21+
<script type="text/javascript" src="{{ pathto('_static/tcs_theme.js', 1) }}"></script>
22+
<script async defer src="https://buttons.github.io/buttons.js"></script>
23+
24+
{% endblock %}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
OTC-TCS Sphinx Theme
2+
####################
3+
4+
Built on top of the popular Read the Docs Sphinx theme, this theme
5+
has a few small formatting/color improvements and implements collapsible
6+
sections. It is in active development in order to support OTC and other
7+
Intel organizations to publish high quality, consistent documentation
8+
for open source projects.
9+
10+
How to use it
11+
*************
12+
13+
#. Download or clone the repository
14+
#. Create a ``_themes`` directory in main directory of your sphinx
15+
documentation
16+
#. Install sphinx_rtd_theme using pip: ``pip3 install sphinx_rtd_theme``
17+
#. copy ``otc_tcs_sphinx_theme`` directory into the new ``_themes`` directory
18+
#. Add the following to your ``conf.py``:
19+
20+
.. code-block:: python
21+
22+
html_theme = 'otc_tcs_sphinx_theme'
23+
html_theme_path = ['_themes']
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
/* -- Extra CSS styles for content (RTD theme) ----------------------- */
2+
3+
/* make the page width fill the window */
4+
.wy-nav-content {
5+
max-width: 1080px;
6+
}
7+
8+
/* increase the size of the side bar from 300px default to 320px */
9+
.wy-nav-side {
10+
width: 320px;
11+
}
12+
13+
.wy-side-scroll {
14+
width: 340px;
15+
}
16+
17+
.wy-side-nav-search {
18+
width: 320px;
19+
}
20+
21+
.wy-menu-vertical {
22+
width: 320px;
23+
}
24+
25+
/* (temporarily) add an under development tagline to the bread crumb
26+
.wy-breadcrumbs::after {
27+
content: " (Content under development)";
28+
background-color: #FFFACD;
29+
color: red;
30+
font-weight: bold;
31+
}
32+
*/
33+
34+
/* code block highlight color in rtd changed to lime green, no no no */
35+
36+
.rst-content tt.literal, .rst-content code.literal, .highlight {
37+
background: #f0f0f0;
38+
}
39+
.rst-content tt.literal, .rst-content code.literal {
40+
color: #000000;
41+
}
42+
43+
/* Make the version number more visible */
44+
.wy-side-nav-search>div.version {
45+
color: rgba(255,255,255,1);
46+
}
47+
48+
/* squish the space between a paragraph before a list */
49+
div > p + ul, div > p + ol {
50+
margin-top: -20px;
51+
}
52+
53+
/* add some space before the figure caption */
54+
p.caption {
55+
border-top: 1px solid;
56+
margin-top: 1em;
57+
}
58+
59+
/* add a colon after the figure/table number (before the caption) */
60+
span.caption-number::after {
61+
content: ": ";
62+
}
63+
64+
p.extrafooter {
65+
text-align: right;
66+
margin-top: -36px;
67+
}
68+
69+
table.align-center {
70+
display: table !important;
71+
}
72+
73+
74+
.code-block-caption {
75+
color: #000;
76+
font: italic 85%/1 arial,sans-serif;
77+
padding: 1em 0;
78+
text-align: center;
79+
}
80+
81+
/* make .. hlist:: tables fill the page */
82+
table.hlist {
83+
width: 95% !important;
84+
}
85+
86+
/* override rtd theme white-space no-wrap in table heading and content */
87+
th,td {
88+
white-space: normal !important;
89+
}
90+
91+
/* tweak for doxygen-generated API headings (for RTD theme) */
92+
.rst-content dl.group>dt, .rst-content dl.group>dd>p {
93+
display:none !important;
94+
}
95+
.rst-content dl.group {
96+
margin: 0 0 12px 0px;
97+
}
98+
.rst-content dl.group>dd {
99+
margin-left: 0 !important;
100+
}
101+
.rst-content p.breathe-sectiondef-title {
102+
text-decoration: underline; /* for API sub-headings */
103+
font-size: 1.25rem;
104+
font-weight: bold;
105+
margin-bottom: 12px;
106+
}
107+
108+
.rst-content div.breathe-sectiondef {
109+
padding-left: 0 !important;
110+
}
111+
112+
.clps1 {
113+
font-size: 175%;
114+
}
115+
116+
.clps2 {
117+
font-size: 150%;
118+
}
119+
120+
.clps3 {
121+
font-size: 125%;
122+
}
123+
124+
.clps4 {
125+
font-size: 115%;
126+
}
127+
128+
.clps5 {
129+
font-size: 110%;
130+
}
131+
132+
.clps6 {
133+
font-size: 100%;
134+
}
135+
136+
.collapsible {
137+
margin-left: -10px;
138+
background-color: #f1f1f1;
139+
cursor: pointer;
140+
padding: 18px 18px 18px 10px;
141+
width: 100%;
142+
border: none;
143+
text-align: left;
144+
outline: none;
145+
font-weight: 700;
146+
font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif;
147+
}
148+
149+
.collapsible:hover {
150+
background-color: #d8d8d8;
151+
}
152+
153+
.collapsible:after {
154+
content: '\002B';
155+
font-weight: bold;
156+
float: right;
157+
margin-left: 5px;
158+
}
159+
160+
.active:after {
161+
content: "\2212";
162+
}
163+
164+
.content-collapse {
165+
overflow: hidden;
166+
transition: max-height 0.2s ease-out;
167+
}
168+
169+
.header__menu_list li {
170+
display: inline;
171+
margin-left: 20px;
172+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
var i;
2+
var contents = document.getElementsByClassName("content-collapse section");
3+
4+
for (i = 0; i < contents.length; i++) {
5+
6+
//Make sure the "content-collapse section" class is occurring in <div>
7+
if (contents[i].tagName.toLowerCase() == 'div') {
8+
var element = contents[i].children[0];
9+
var element_type = element.tagName.toLowerCase();
10+
var span_id;
11+
var spanElement;
12+
13+
//if the next element is a span grab the id and skip to the header
14+
if (element_type == 'span') {
15+
span_id = element.id;
16+
element.id = "";
17+
element = contents[i].children[1];
18+
element_type = element.tagName.toLowerCase();
19+
}
20+
21+
var btn = document.createElement("BUTTON");
22+
//If it is a header capture which level and pass on to button
23+
if (element_type.length == 2 && element_type[0] == 'h') {
24+
var newClass = 'clps' + element_type[1];
25+
//collapses the section by default only if javascript is working
26+
contents[i].style.maxHeight = 0;
27+
//Build the button and define behavior
28+
btn.className += " " + newClass;
29+
btn.innerHTML = element.innerHTML;
30+
btn.className += " collapsible";
31+
btn.id = span_id;
32+
btn.addEventListener("click", function() {
33+
this.classList.toggle("active");
34+
var content = this.nextElementSibling;
35+
if (content.style.maxHeight != "0px"){
36+
content.style.maxHeight = 0;
37+
} else {
38+
content.style.maxHeight = content.scrollHeight + "px";
39+
}
40+
});
41+
42+
//Add the button to the page and remove the header
43+
contents[i].parentNode.insertBefore(btn, contents[i]);
44+
contents[i].removeChild(element);
45+
}else{
46+
//reset span id if it isn't followed by Hx element
47+
spanElement.id = span_id;
48+
}
49+
}
50+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[theme]
2+
inherit = sphinx_rtd_theme

0 commit comments

Comments
 (0)