summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-05-30 20:07:21 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-05-30 20:07:21 +0200
commit164c306795577ec7667d338c28a7544bbb8c241b (patch)
tree3607fdeaeeee57505fa547041a4cfd33a827abca /templates
downloadrabalderz-164c306795577ec7667d338c28a7544bbb8c241b.tar.gz
rabalderz-164c306795577ec7667d338c28a7544bbb8c241b.tar.bz2
rabalderz-164c306795577ec7667d338c28a7544bbb8c241b.zip
et up baseic structure for homepage/blog with Zola
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html30
-rw-r--r--templates/index.html81
-rw-r--r--templates/page.html16
-rw-r--r--templates/shortcodes/figure.html6
-rw-r--r--templates/tags/list.html5
-rw-r--r--templates/tags/single.html1
6 files changed, 139 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..a921ed6
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width initial-scale=1" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %}</title>
+ <meta name="description" content="{{ config.description }}">
+
+ <link rel="stylesheet" type="text/css" href="/styles.css">
+ {# <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}"> #}
+ </head>
+
+ <body>
+
+ {#% include header.html %#}
+
+ <div class="page-content">
+ <div class="wrapper">
+ {% block content %}
+ {% endblock content %}
+ </div>
+ </div>
+
+ {#% include footer.html %#}
+
+ </body>
+
+</html>
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..d883a57
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,81 @@
+{% extends "base.html" %}
+{% block content %}
+
+<div class="home">
+ <section id="home-blurb">
+ {{ section.content | safe }}
+ </section>
+
+ <ul class="subsections">
+ {% for sub in section.subsections %}
+ {% set s = get_section(path=sub) %}
+ <li><a href="{{s.permalink | safe}}">{{ s.title }}</a></li>
+ <ul class="post-list">
+ {% for post in s.pages %}
+ <article>
+ <header class="post-header">
+ <h1 class="post-title">
+ <a href="{{ post.permalink | safe }}">
+ {{ post.title }}
+ </a>
+ </h1>
+ <div class="post-meta">
+ {{ post.date }}
+ {% if post.taxonomies["tags"] | length > 0 %}
+ <ul class="post-tags">
+ {% for tag in post.taxonomies["tags"] %}
+ <li class="tag">{{ tag }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+ </header>
+ <section class="post-summary">
+ {{ post.summary | safe }}
+ </section>
+ <footer>
+ {% if post.content | length > post.summary | length %}
+ <a href="{{ post.permalink }}">
+ {% if post.lang == 'en' %}More...{% else %}Les mer...{% endif %}
+ </a>
+ {% endif %}
+ </footer>
+ </article>
+ {% endfor %}
+ </ul>
+ {% endfor %}
+ </ul>
+ <section id="stream">
+ <ul class="post-list">
+ {% for post in section.pages %}
+ <article>
+ <header class="post-header">
+ <h1 class="post-title"><a href="{{ post.permalink }}">{{ post.title }}</a></h1>
+ <div class="post-meta">
+ {{ post.date }}
+ {% if post.taxonomies["tags"] | length > 0 %}
+ <ul class="post-tags">
+ {% for tag in post.taxonomies["tags"] %}
+ <li class="tag">{{ tag }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+ </header>
+ <section class="post-summary">
+ {{ post.summary | safe }}
+ </section>
+ <footer>
+ {% if post.content | length > post.summary | length %}
+ <a href="{{ post.permalink }}">
+ {% if post.lang == 'en' %}More...{% else %}Les mer...{% endif %}
+ </a>
+ {% endif %}
+ </footer>
+ </article>
+ {% endfor %}
+ </ul>
+ </section>
+
+</div>
+{% endblock content %}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..56317a7
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% block content %}
+<article class="post">
+ <h1>{{ page.title }}</h1>
+ <div class="meta">
+ <span class="meta-publish">
+ Publisert: {{ page.date }}
+ {% if page.author %}av {{ page.author }}{% endif %}
+ </span>
+ <span class="meta-tags">
+ Merket: {{ page.taxonomies['tags'] | join(sep=", ") }}
+ </span>
+ </div>
+ {{ page.content | safe }}
+</article>
+{% endblock content %}
diff --git a/templates/shortcodes/figure.html b/templates/shortcodes/figure.html
new file mode 100644
index 0000000..7fb4123
--- /dev/null
+++ b/templates/shortcodes/figure.html
@@ -0,0 +1,6 @@
+<div class="figure">
+ <img src="/{{ page.path | safe }}{{ img }}">
+ <div class="caption">
+ {{ body }}
+ </div>
+</div>
diff --git a/templates/tags/list.html b/templates/tags/list.html
new file mode 100644
index 0000000..e9eac41
--- /dev/null
+++ b/templates/tags/list.html
@@ -0,0 +1,5 @@
+<ul class="taglist">
+ {% for t in terms %}
+ <li class="tag">{{ t.name }}</li>
+ {% endfor %}
+</ul>
diff --git a/templates/tags/single.html b/templates/tags/single.html
new file mode 100644
index 0000000..1e00fa6
--- /dev/null
+++ b/templates/tags/single.html
@@ -0,0 +1 @@
+<span class="tag">{{ term.name }}</span>