diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 43 | ||||
-rw-r--r-- | templates/categories/list.html | 18 | ||||
-rw-r--r-- | templates/categories/single.html | 21 | ||||
-rw-r--r-- | templates/index.html | 36 | ||||
-rw-r--r-- | templates/post-page.html | 44 | ||||
-rw-r--r-- | templates/tags/list.html | 18 | ||||
-rw-r--r-- | templates/tags/single.html | 21 |
7 files changed, 201 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..590d592 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + {% block title %} + <title>{{ config.title }}</title> + {% endblock %} + + <link rel="shortcut icon" type="image/png" href="{{ config.extra.favicon }}"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + + <link id="stylesheet" rel="stylesheet" type="text/css" href="/dark.css"> + + <script type="text/javascript" src="/js/theme.js"></script> + +</head> + +<div class="header"> + <div class="site_title"> + <p><a href="/"><img src="{{ config.base_url }}{{ config.extra.icon }}" alt="{{ config.title }}" + width="{{ config.extra.iconsize }}" height=auto></a></p> + <p><a href="/"> {{ config.title }}</a></p> + </div> + <div class="menu"> + <!-- <a href="/tags">tags</a> + --><a href="/categories">categories</a> + </div> +</div> + +<body onload="getTheme()"> + <section class="section"> + <div class="container"> + {% block content %} {% endblock %} + </div> + </section> +</body> + +<div class="footer"> +  © {{ config.extra.author }} +</div> + +</html> diff --git a/templates/categories/list.html b/templates/categories/list.html new file mode 100644 index 0000000..b6d98c2 --- /dev/null +++ b/templates/categories/list.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %} +<title>Categories</title> +{% endblock %} + +{% block content %} +<p class="archive_title">[Categories]</p> + +<ul> + {% for term in terms %} + <li> + <a href="{{ term.permalink }}">/{{ term.name }}</a> + ({{ term.pages | length }}) + </li> + {% endfor %} +</ul> +{% endblock content %}
\ No newline at end of file diff --git a/templates/categories/single.html b/templates/categories/single.html new file mode 100644 index 0000000..b02797e --- /dev/null +++ b/templates/categories/single.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %} +<title>{{ term.name }} | {{ config.title }}</title> +{% endblock %} + +{% block content %} +<p class="archive_title">[Category: {{ term.name }}]</p> + +{% for page in term.pages %} +<p> + <div class="date"> + {{ page.date }} + </div> + <div class="archive_title"> + <a href="{{ page.permalink | safe }}">{{ page.title }}</a> + </div> +</p> +{% endfor %} + +{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..64ac3cd --- /dev/null +++ b/templates/index.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% block content %} + +{% set section = get_section(path="post/_index.md") %} +{% for year, pages in section.pages | group_by(attribute="year") %} + <h3>{{ year}} </h3> + + {% for page in pages %} + <p> + <div class="date"> + {{ page.date }} + </div> + + <div class="title"> + <a href="{{ page.permalink | safe }}">{{ page.title }}</a> + </div> + + <div class="taxonomies_index"> + {% if page.taxonomies.categories %} + {% for category in page.taxonomies.categories %} +  <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a> + {% endfor %} + {% endif %} + + {% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} +  <a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a> + {% endfor %} + {% endif %} + </div> + </p> + {% endfor %} +{% endfor %} + +{% endblock content %} diff --git a/templates/post-page.html b/templates/post-page.html new file mode 100644 index 0000000..894a27d --- /dev/null +++ b/templates/post-page.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} + +{% block title %} +<title>{{ page.title }} | {{ config.title }}</title> +{% endblock %} + +{% block content %} +<p> + <div class="title_postpage">{{ page.title }}</div> +</p> +<p> + <div class="date_postpage">{{ page.date }}</div> + <div class="taxonomies_postpage"> + {% if page.taxonomies.categories %} + {% for category in page.taxonomies.categories %} + <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a> + {% endfor %} + {% endif %} + {% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} +  <a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a> + {% endfor %} + {% endif %} + </div> +</p> + +<p> + {{ page.content | safe }} +</p> + +{% if page.extra.math %} +<script> + MathJax = { + tex: { + inlineMath: [['$', '$'], ['\\(', '\\)']] + } + }; +</script> +<script type="text/javascript" async + src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"> +</script> +{% endif %} + +{% endblock content %} diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..2b5a16c --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %} +<title>Tags</title> +{% endblock %} + +{% block content %} +<p class="archive_title">[Tags]</p> + +<ul> + {% for term in terms %} + <li> + <a href="{{ term.permalink }}">#{{ term.name }}</a> + ({{ term.pages | length }}) + </li> + {% endfor %} +</ul> +{% endblock content %}
\ No newline at end of file diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..0549304 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %} +<title>{{ term.name }} | {{ config.title }}</title> +{% endblock %} + +{% block content %} +<p class="archive_title">[Tag: {{ term.name }}]</p> + +{% for page in term.pages %} +<p> + <div class="date"> + {{ page.date }} + </div> + <div class="archive_title"> + <a href="{{ page.permalink | safe }}">{{ page.title }}</a> + </div> +</p> +{% endfor %} + +{% endblock content %}
\ No newline at end of file |