Skip to content

Commit 12f4818

Browse files
Tutorial Website Redesign (#128)
* Updated tutorial index html structure, temporary change of download links in workflow * Temporary worklfow change to trigger page build in fork * Re-added liquid header * Added container for centering, logo for nav bar * Prevent line break before version number * Reverted wget to qutip repo files
1 parent bb27092 commit 12f4818

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.github/workflows/notebook_ci.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,21 @@ jobs:
133133
# Download resources from qutip.github.io repository
134134
mkdir css
135135
cd css
136-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/bootstrap.css
137136
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/site.css
138137
cd ..
139138
140139
mkdir _includes
141140
cd _includes
142-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
143-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/header.html
141+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/head.html
144142
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/navbar.html
143+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
144+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/scripts.html
145145
cd ..
146146
147147
mkdir images
148148
cd images
149149
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/images/favicon.ico
150+
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/images/logo_small.png
150151
cd ..
151152
152153
# build the website

website/create_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ def main():
150150
root_folder = pathlib.Path(__file__).parent.parent
151151

152152
if args.qutip_version == "v4":
153-
title = "Tutorials for QuTiP Version 4"
153+
title = "Tutorials for QuTiP Version 4"
154154
tutorials_folder = root_folder / "tutorials-v4"
155155
version_note = """
156156
These are the tutorials for QuTiP Version 4. You can
157157
find the tutorials for QuTiP Version 5
158158
<a href="./index.html">here</a>.
159159
""".strip()
160160
elif args.qutip_version == "v5":
161-
title = "Tutorials for QuTiP Version 5"
161+
title = "Tutorials for QuTiP Version&nbsp;5"
162162
tutorials_folder = root_folder / "tutorials-v5"
163163
version_note = """
164164
These are the tutorials for QuTiP Version 5. You can

website/index.html.jinja

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
---
22
title: QuTiP Tutorials
33
---
4-
{% raw %}
5-
{% include header.html %}
6-
{% include navbar.html %}
7-
{% endraw %}
84

5+
<!DOCTYPE html>
6+
<html lang="en">
7+
8+
{% raw %} {% include head.html %} {% endraw %}
9+
10+
<body>
11+
<header> {% raw %} {% include navbar.html %} {% endraw %} </header>
12+
13+
<main class="my-content">
914
<div class="row">
1015
<div class="col-md-12">
1116
<h1>{{ title }}</h1><br>
@@ -182,7 +187,12 @@ a complete archive of older versions of the tutorials is maintained there.
182187

183188
</div>
184189
</div>
190+
</main>
185191

186192
{% raw %}
187-
{% include footer.html %}
193+
<footer>{% include footer.html %}</footer>
194+
{% include scripts.html %}
188195
{% endraw %}
196+
197+
</body>
198+
</html>

0 commit comments

Comments
 (0)