initial release - v0.1
This commit is contained in:
parent
e2abcbd27a
commit
d1fc86fd31
|
@ -0,0 +1,16 @@
|
|||
{% extends 'index.html' %}
|
||||
{% set current_path = '' %}
|
||||
|
||||
{% block title %}
|
||||
Page not found
|
||||
{% endblock %}
|
||||
|
||||
{# This overrides current_path checking since 404 pages don't have a fixed path #}
|
||||
{% block is_active %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
(╯°□°)╯︵ ┻━┻
|
||||
</h1>
|
||||
{% endblock %}
|
|
@ -0,0 +1,80 @@
|
|||
<!doctype html>
|
||||
<html lang="en-GB">
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{# Favicon #}{%- if config.extra.favicon_emoji %}
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ config.extra.favicon_emoji }}</text></svg>">
|
||||
{% endif -%}
|
||||
{# title #}
|
||||
<title>{% block title %}{{ section.title }}{% endblock %} - {{ config.extra.title }}</title>
|
||||
|
||||
{%- if section %}
|
||||
<meta name="description" content="{{ section.description }}" />
|
||||
{% elif page %}
|
||||
<meta name="description" content="{{ page.description }}" />
|
||||
{%- endif %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>
|
||||
<a href="{{ config.base_url }}">
|
||||
{{ config.extra.author }}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<nav>
|
||||
{%- set index = get_section(path="_index.md") %}
|
||||
{%- for s in index.subsections %}
|
||||
{%- set subsection = get_section(path=s) %}
|
||||
<a href="{{ subsection.permalink }}"
|
||||
{%- if current_path and current_path == subsection.path %} {# this weird if condition is needed to have a working 404 because 404 pages cannot have a current_path -#}
|
||||
class="active"
|
||||
{%- endif -%}
|
||||
>
|
||||
{{ subsection.title }}
|
||||
</a>
|
||||
{%- endfor %}
|
||||
</nav>
|
||||
|
||||
{% block categories_menu %} {% endblock %}
|
||||
|
||||
{#- ToDo : fix : submenu for categories should only appear when we are anywhere in blog section -#}
|
||||
{#
|
||||
{% if config.extra.show_categories_submenu and current_path %}
|
||||
<nav>
|
||||
{% for category in config.extra.categories %}
|
||||
<a href="{{ config.base_url }}/blog/{{ category.name }}"{% if current_path is starting_with("{{ category.name }}") %} class="active"{%endif%}>
|
||||
{{ category.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
#}
|
||||
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
{%- block page_comment %}
|
||||
{% endblock -%}
|
||||
|
||||
<!-- LICENSE -->
|
||||
{% if config.extra.license -%}
|
||||
<p>
|
||||
All work is licensed under <strong>{{ config.extra.license }}</strong> unless otherwise is stated.
|
||||
</p>
|
||||
{%- endif -%}
|
||||
{#- implement : Webring support -#}
|
||||
{% block Webring -%}
|
||||
{%- endblock %}
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
{% macro comment(comment_url) %}
|
||||
<hr style="border: none; border-top: 1px solid">
|
||||
<h2>Comments</h2>
|
||||
<p> Looking for comments?
|
||||
Reply on <a href="{{ comment_url }}">this thread</a> to comment. Comments won't appear here.
|
||||
</p>
|
||||
{% endmacro comment %}
|
||||
|
||||
{# ToDo #}
|
||||
{% macro category() %}
|
||||
{% endmacro category %}
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "index.html" %}
|
||||
{% import 'macros.html' as macro %}
|
||||
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
<p><strong>{{ page.date }}</strong></p>
|
||||
|
||||
{{ page.content | safe }}
|
||||
|
||||
{% if page.extra.comment is defined %}
|
||||
{{ macro::comment(comment_url=page.extra.comment) }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{# implement : comment section of sort #}
|
||||
{% block page_comment -%}
|
||||
{%- endblock %}
|
|
@ -0,0 +1,45 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ section.title }}{% endblock %}
|
||||
|
||||
{% if get_taxonomy(kind="categories") %}
|
||||
{% block categories_menu %}
|
||||
<h1>Categories</h1>
|
||||
<nav>
|
||||
{% set categories = get_taxonomy(kind="categories") %}
|
||||
{% for cat in categories.items %}
|
||||
<a href="{{ config.base_url }}/categories/{{ cat.name }}">{{ cat.name }}</a></li>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{%- block content -%}
|
||||
|
||||
{{ section.content | safe }}
|
||||
|
||||
{%- for page in section.pages %}
|
||||
<h2>
|
||||
<a href="{{ page.permalink | safe }}">
|
||||
{{ page.title }}
|
||||
</a>
|
||||
</h2>
|
||||
<strong>{{ page.date }}</strong>
|
||||
{%- endfor -%}
|
||||
|
||||
{# ToDo : implement : Pagination #}
|
||||
{%- if section.paginate_by is defined %}
|
||||
{% block pagination %}
|
||||
<nav class="pagination">
|
||||
{% if paginator.previous %}
|
||||
<a rel="prev" href="{{paginator.previous}}">← prev</a></span>
|
||||
{% endif %}
|
||||
|
||||
{% if paginator.next %}
|
||||
<a rel="next" href="{{paginator.next}}">next →</a></span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endblock pagination %}
|
||||
{% endif -%}
|
||||
|
||||
{%- endblock content -%}
|
|
@ -18,6 +18,11 @@ language = "en"
|
|||
# title can be author, site, company etc. name
|
||||
title = ""
|
||||
|
||||
### Favicon ###
|
||||
# only 1 of the below favicon options must be uncommented
|
||||
favicon_emoji = "😉"
|
||||
#favicon_image =
|
||||
|
||||
# items to be shown in the menu
|
||||
menu_items = [
|
||||
{ url = "https://example.com", name = "Example"}
|
||||
|
@ -30,7 +35,7 @@ show_categories_submenu = false
|
|||
license = "CC BY-SA 4.0"
|
||||
|
||||
# How many links per index page
|
||||
pagination = 10
|
||||
pagination = 25
|
||||
|
||||
# The theme author info: you!
|
||||
[author]
|
||||
|
|
Reference in New Issue