aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAhmed M Alaa <aa@4b.cx>2022-12-03 21:01:01 +0200
committerAhmed M Alaa <aa@4b.cx>2022-12-03 21:01:01 +0200
commit028f23e96dd4c6a86465cb616be84480ac3a7a1e (patch)
treecaffe481ff29aab5111e69b242cfc072a84912b6 /templates
init: just ported the theme
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html5
-rw-r--r--templates/base.html99
-rw-r--r--templates/index.html25
-rw-r--r--templates/page.html32
-rw-r--r--templates/section.html28
-rw-r--r--templates/shortcodes/hr.html1
-rw-r--r--templates/shortcodes/iimg.html1
-rw-r--r--templates/taxonomy_list.html17
-rw-r--r--templates/taxonomy_single.html27
9 files changed, 235 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
new file mode 100644
index 0000000..65919ff
--- /dev/null
+++ b/templates/404.html
@@ -0,0 +1,5 @@
+{% extends "base.html" %}
+
+{% block content %}
+ 404
+{% endblock content %} \ No newline at end of file
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..e50dc0a
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<html lang="{{ lang }}">
+ <head>
+ <meta charset="UTF-8">
+ <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+ <meta content="width=device-width, initial-scale=1" name="viewport"/>
+
+ {% if page.title %}
+ {% set title = page.title %}
+ {% else %}
+ {% set title = config.title %}
+ {% endif %}
+
+ {% if page.extra.author %}
+ {% set author = page.extra.author %}
+ {% else %}
+ {% set author = config.extra.author %}
+ {% endif %}
+
+ {% if page.description %}
+ {% set description = page.description | truncate(length=150) %}
+ {% else %}
+ {% set description = config.description | truncate(length=150) %}
+ {% endif %}
+
+ {% if page.extra.image %}
+ {% set image = get_url(path=page.extra.image, trailing_slash=false) %}
+ {% else %}
+ {% set image = get_url(path=config.extra.logo, trailing_slash=false) %}
+ {% endif %}
+
+ {% if page.permalink %}
+ {% set url = page.permalink %}
+ {% else %}
+ {% set url = config.base_url %}
+ {% endif %}
+
+ {% if title %}<title>{{ title }}</title>{% endif %}
+ {% block metatags %}
+ {% if title %}<meta name="title" content="{{ title }}">{% endif %}
+ {% if author %}<meta name="author" content="{{ author }}">{% endif %}
+ {% if description %}<meta name="description" content="{{ description }}">{% endif %}
+ <meta name="generator" content="Zola v0.16.1">
+
+ <meta property="og:type" content="website">
+ <meta property="og:url" content="{{ url | safe }}">
+ {% if title %}<meta property="og:site_name" content="{{ config.title }}">{% endif %}
+ {% if title %}<meta property="og:title" content="{{ title }}">{% endif %}
+ {% if description %}<meta property="og:description" content="{{ description }}">{% endif %}
+ {% if image %}<meta property="og:image" content="{{ image }}">{% endif %}
+
+ <meta property="twitter:card" content="summary_large_image">
+ <meta property="twitter:url" content="{{ url | safe }}">
+ {% if title %}<meta property="twitter:title" content="{{ title }}">{% endif %}
+ {% if description %}<meta property="twitter:description" content="{{ description }}">{% endif %}
+ {% if image %}<meta property="twitter:image" content="{{ image }}">{% endif %}
+
+ <link rel="canonical" href="{{ url | safe }}">
+ {% if image %}<link rel="shortcut icon" type="image/x-icon" href="{{ get_url(path=config.extra.logo, trailing_slash=false) }}">{% endif %}
+ <script type="application/ld+json">
+ {
+ {% if description %}"description":"{{ description | safe }}",{% endif %}
+ "url":"{{ url | safe }}",
+ "@type":"WebSite",
+ {% if title %}"headline":"{{ title | safe }}",{% endif %}
+ {% if title %}"name":"{{ title | safe }}",{% endif %}
+ {% if author %}"author":{
+ "@type":"Person",
+ "name":"{{ author | safe }}"
+ },{% endif %}
+ "@context":"https://schema.org"
+ }
+ </script>
+ {% endblock metatags %}
+ {% if config.generate_feed %}
+ {% block feed %}
+ <link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
+ {% endblock feed %}
+ {% endif %}
+ {% block css %}
+ <link rel="stylesheet" href="{{ get_url(path='style.css', trailing_slash=false) | safe }}"/>
+ {% endblock css %}
+ </head>
+ <body theme="auto">
+ <div class="w">
+ <header>
+ {% block header %}{% if title %}<h1>{{ config.title }}</h1>{% endif %}{% endblock header %}
+ </header>
+ <main class="page-content" aria-label="Content">
+ {% block content %}{% endblock content %}
+ </main>
+ <footer>
+ {% block footer %}{% endblock footer %}
+ </footer>
+ </div>
+ </body>
+</html>
+ \ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..146df3b
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+
+{% block content %}
+{{ section.content | safe }}
+
+{% if section.extra.list_pages %}
+{% if paginator %}
+{% set pages = paginator.pages %}
+{% else %}
+{% set pages = section.pages %}
+{% endif %}
+<ul>
+{% for page in pages %}
+ <li>
+ <a href="{{ page.permalink | safe }}">{{ page.date }} - {{ page.title }}</a>
+ <br />
+ {{ page.description }}
+ </li>
+{% endfor %}
+</ul>
+{% if paginator %}
+<p>{% if paginator.previous %}<a href="{{ paginator.first }}">&lt;&lt; First</a> <a href="{{ paginator.previous }}">&lt; Previous</a>{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}<a href="{{ paginator.next }}">Next &gt;</a> <a href="{{ paginator.last }}">Last &gt;&gt;</a>{% endif %}</p>
+{% endif %}
+{% endif %}
+{% endblock content %} \ No newline at end of file
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..1e395e3
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,32 @@
+{% extends "base.html" %}
+
+{% block header %}
+<p><a href="..">..</a>/{{ page.slug }}</p>
+<p class="post-meta"><time datetime="{{ page.date }}">{{ page.date }}</time></p>
+<h1>{{ page.title }}</h1>
+{% endblock header %}
+
+{% block content %}
+
+{% if page.toc and page.extra.add_toc %}
+Table of contents
+<ul>
+{% for h1 in page.toc %}
+ <li>
+ <a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
+ {% if h1.children %}
+ <ul>
+ {% for h2 in h1.children %}
+ <li>
+ <a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </li>
+{% endfor %}
+</ul>
+{% endif %}
+
+{{ page.content | safe }}
+{% endblock content %} \ No newline at end of file
diff --git a/templates/section.html b/templates/section.html
new file mode 100644
index 0000000..cd509fa
--- /dev/null
+++ b/templates/section.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+
+{% block header %}
+<p><a href="{{ section.path }}..">..</a>{{ section.path }}</p>
+
+<h1>{{ section.title }}</h1>
+{% endblock header %}
+
+{% block content %}
+{{ section.content | safe }}
+{% if paginator %}
+{% set pages = paginator.pages %}
+{% else %}
+{% set pages = section.pages %}
+{% endif %}
+<ul>
+{% for page in pages %}
+ <li>
+ <a href="{{ page.permalink | safe }}">{{ page.date }} - {{ page.title }}</a>
+ <br />
+ {{ page.description }}
+ </li>
+{% endfor %}
+</ul>
+{% if paginator %}
+<p>{% if paginator.previous %}<a href="{{ paginator.first }}">&lt;&lt; First</a> <a href="{{ paginator.previous }}">&lt; Previous</a>{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}<a href="{{ paginator.next }}">Next &gt;</a> <a href="{{ paginator.last }}">Last &gt;&gt;</a>{% endif %}</p>
+{% endif %}
+{% endblock content %} \ No newline at end of file
diff --git a/templates/shortcodes/hr.html b/templates/shortcodes/hr.html
new file mode 100644
index 0000000..732aa3b
--- /dev/null
+++ b/templates/shortcodes/hr.html
@@ -0,0 +1 @@
+<hr data-content="{% if data_content %}{{ data_content }}{% endif %}" \> \ No newline at end of file
diff --git a/templates/shortcodes/iimg.html b/templates/shortcodes/iimg.html
new file mode 100644
index 0000000..4e0a8d0
--- /dev/null
+++ b/templates/shortcodes/iimg.html
@@ -0,0 +1 @@
+<img class="invertable" {% if src %}src="{{ src }}"{% endif %} {% if alt %}alt="{{ alt }}"{% endif %} /> \ No newline at end of file
diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html
new file mode 100644
index 0000000..e27d135
--- /dev/null
+++ b/templates/taxonomy_list.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% block header %}
+<p><a href="{{ current_path }}..">..</a>{{ current_path }}</p>
+
+<h1>{{ taxonomy.name }}</h1>
+{% endblock header %}
+
+{% block content %}
+<ul>
+{% for term in terms %}
+ <li>
+ <a href="{{ term.permalink | safe }}">{{ term.name }}</a>
+ </li>
+{% endfor %}
+</ul>
+{% endblock content %} \ No newline at end of file
diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html
new file mode 100644
index 0000000..934cea5
--- /dev/null
+++ b/templates/taxonomy_single.html
@@ -0,0 +1,27 @@
+{% extends "base.html" %}
+
+{% block header %}
+<p><a href="{{ current_path }}">..</a>/{{ term.slug }}/</p>
+
+<h1>{{ term.name }}</h1>
+{% endblock header %}
+
+{% block content %}
+{% if paginator %}
+{% set pages = paginator.pages %}
+{% else %}
+{% set pages = term.pages %}
+{% endif %}
+<ul>
+{% for page in pages %}
+ <li>
+ <a href="{{ page.permalink | safe }}">{{ page.date }} - {{ page.title }}</a>
+ <br />
+ {{ page.description }}
+ </li>
+{% endfor %}
+</ul>
+{% if paginator %}
+<p>{% if paginator.previous %}<a href="{{ paginator.first }}">&lt;&lt; First</a> <a href="{{ paginator.previous }}">&lt; Previous</a>{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}<a href="{{ paginator.next }}">Next &gt;</a> <a href="{{ paginator.last }}">Last &gt;&gt;</a>{% endif %}</p>
+{% endif %}
+{% endblock content %} \ No newline at end of file