diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/404.html | 5 | ||||
-rw-r--r-- | templates/base.html | 89 | ||||
-rw-r--r-- | templates/blog.html | 13 | ||||
-rw-r--r-- | templates/index.html | 8 | ||||
-rw-r--r-- | templates/page.html | 11 |
5 files changed, 126 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..b931eeb --- /dev/null +++ b/templates/404.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} + <h2>Page not found</h2> +{% endblock content %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..b41a37c --- /dev/null +++ b/templates/base.html @@ -0,0 +1,89 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title> + {% if page.title %} + {{ page.title }} | + {% endif %} + {% if section.title %} + {{ section.title }} | + {% endif %} + {{ config.title }} + </title> + + <link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css") }} /> + </head> + + <body> + <header> + <h1 class="title">{{ config.title }}</h1> + <div class="navbar"> + <ul> + {% set current_path = current_path | default(value="/") %} + <li> + {% if current_path == "/" %} + <a href="/" class="navbar-selected">About</a> + {% else %} + <a href="/" class="navbar-unselected">About</a> + {% endif %} + </li> + <li> + {% if current_path is starting_with("/blog") %} + <a href="/blog/" class="navbar-selected">Blog</a> + {% else %} + <a href="/blog/" class="navbar-unselected">Blog</a> + {% endif %} + </li> + <li> + {% if current_path is starting_with("/publications") %} + <a href="/publications/" class="navbar-selected">Publications</a> + {% else %} + <a href="/publications/" class="navbar-unselected">Publications</a> + {% endif %} + </li> + <li> + {% if current_path is starting_with("/software") %} + <a href="/software/" class="navbar-selected">Software</a> + {% else %} + <a href="/software/" class="navbar-unselected">Software</a> + {% endif %} + </li> + <li> + {% if current_path is starting_with("/teaching") %} + <a href="/teaching/" class="navbar-selected">Teaching</a> + {% else %} + <a href="/teaching/" class="navbar-unselected">Teaching</a> + {% endif %} + </li> + </ul> + </div> + </header> + + <main> + {% block content %} + {% endblock content %} + </main> + + <footer> + <p> + Copyright (c) 2022 A.D.B. Jesus. + </p> + <p> + The contents of this website are licensed under the + <a rel="license" + href="https://creativecommons.org/licenses/by-sa/4.0">CC + BY-SA 4.0</a> license, except for the PDFs in the + <a href="/publications/">publications page</a> or if + otherwise explicitly noted. + </p> + <p> + The source code of this website is licensed under the MIT + license, and available in a + <a href="https://git.adbjesus.com/website">git repository</a>. + </p> + </footer> + </body> +</html> diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..147ac2b --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block content %} + <h2>{{ section.title }}</h2> + <div class="content"> + <p><a href="atom.xml">Feed</a></p> + {% for page in section.pages %} + <p> + {{ page.date }} <a href="{{ page.path }}" class>{{ page.title }}</a> + </p> + {% endfor %} + </div> +{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..effabc5 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} + <h2>{{ section.title }}</h2> + <div class="content"> + {{ section.content | safe }} + </div> +{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..f3a86d8 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + <h2>{{ page.title }}</h2> + <div class="content"> + {% if page.date %} + <span>{{ page.date }}</span> + {% endif %} + {{ page.content | safe }} + </div> +{% endblock content %} |