Skip to content

Website Redesign #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/notebook_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
publish:
needs: pytests
runs-on: ubuntu-latest
if: ${{ github.repository == 'qutip/qutip-tutorials' && github.ref == 'refs/heads/main' }}
# if: ${{ github.repository == 'qutip/qutip-tutorials' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand All @@ -133,20 +133,27 @@ jobs:
# Download resources from qutip.github.io repository
mkdir css
cd css
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/bootstrap.css
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/site.css
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/bootstrap.css
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/site.css
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/css/site.css
cd ..

mkdir _includes
cd _includes
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/header.html
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/navbar.html
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/head.html
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/navbar.html
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
# wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/scripts.html
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/_includes/head.html
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/_includes/navbar.html
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/_includes/footer.html
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/_includes/scripts.html
cd ..

mkdir images
cd images
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/images/favicon.ico
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/images/logo_small.png
cd ..

# build the website
Expand Down
4 changes: 2 additions & 2 deletions website/create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ def main():
root_folder = pathlib.Path(__file__).parent.parent

if args.qutip_version == "v4":
title = "Tutorials for QuTiP Version 4"
title = "Tutorials for QuTiP Version 4"
tutorials_folder = root_folder / "tutorials-v4"
version_note = """
These are the tutorials for QuTiP Version 4. You can
find the tutorials for QuTiP Version 5
<a href="./index.html">here</a>.
""".strip()
elif args.qutip_version == "v5":
title = "Tutorials for QuTiP Version 5"
title = "Tutorials for QuTiP Version&nbsp;5"
tutorials_folder = root_folder / "tutorials-v5"
version_note = """
These are the tutorials for QuTiP Version 5. You can
Expand Down
20 changes: 15 additions & 5 deletions website/index.html.jinja
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: QuTiP Tutorials
---
{% raw %}
{% include header.html %}
{% include navbar.html %}
{% endraw %}

<!DOCTYPE html>
<html lang="en">

{% raw %} {% include head.html %} {% endraw %}

<body>
<header> {% raw %} {% include navbar.html %} {% endraw %} </header>

<main class="my-content">
<div class="row">
<div class="col-md-12">
<h1>{{ title }}</h1><br>
Expand Down Expand Up @@ -182,7 +187,12 @@ a complete archive of older versions of the tutorials is maintained there.

</div>
</div>
</main>

{% raw %}
{% include footer.html %}
<footer>{% include footer.html %}</footer>
{% include scripts.html %}
{% endraw %}

</body>
</html>
Loading