From 028f23e96dd4c6a86465cb616be84480ac3a7a1e Mon Sep 17 00:00:00 2001 From: Ahmed M Alaa Date: Sat, 3 Dec 2022 21:01:01 +0200 Subject: init: just ported the theme --- templates/404.html | 5 +++ templates/base.html | 99 ++++++++++++++++++++++++++++++++++++++++++ templates/index.html | 25 +++++++++++ templates/page.html | 32 ++++++++++++++ templates/section.html | 28 ++++++++++++ templates/shortcodes/hr.html | 1 + templates/shortcodes/iimg.html | 1 + templates/taxonomy_list.html | 17 ++++++++ templates/taxonomy_single.html | 27 ++++++++++++ 9 files changed, 235 insertions(+) create mode 100644 templates/404.html create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/section.html create mode 100644 templates/shortcodes/hr.html create mode 100644 templates/shortcodes/iimg.html create mode 100644 templates/taxonomy_list.html create mode 100644 templates/taxonomy_single.html (limited to 'templates') 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 @@ + + + + + + + + + {% 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 }}{% endif %} + {% block metatags %} + {% if title %}{% endif %} + {% if author %}{% endif %} + {% if description %}{% endif %} + + + + + {% if title %}{% endif %} + {% if title %}{% endif %} + {% if description %}{% endif %} + {% if image %}{% endif %} + + + + {% if title %}{% endif %} + {% if description %}{% endif %} + {% if image %}{% endif %} + + + {% if image %}{% endif %} + + {% endblock metatags %} + {% if config.generate_feed %} + {% block feed %} + + {% endblock feed %} + {% endif %} + {% block css %} + + {% endblock css %} + + +
+
+ {% block header %}{% if title %}

{{ config.title }}

{% endif %}{% endblock header %} +
+
+ {% block content %}{% endblock content %} +
+
+ {% block footer %}{% endblock footer %} +
+
+ + + \ 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 %} + +{% if paginator %} +

{% if paginator.previous %}<< First < Previous{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}Next > Last >>{% endif %}

+{% 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 %} +

../{{ page.slug }}

+

+

{{ page.title }}

+{% endblock header %} + +{% block content %} + +{% if page.toc and page.extra.add_toc %} +Table of contents + +{% 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 %} +

..{{ section.path }}

+ +

{{ section.title }}

+{% endblock header %} + +{% block content %} +{{ section.content | safe }} +{% if paginator %} +{% set pages = paginator.pages %} +{% else %} +{% set pages = section.pages %} +{% endif %} + +{% if paginator %} +

{% if paginator.previous %}<< First < Previous{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}Next > Last >>{% endif %}

+{% 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 @@ +
\ 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 @@ + \ 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 %} +

..{{ current_path }}

+ +

{{ taxonomy.name }}

+{% endblock header %} + +{% block content %} + +{% 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 %} +

../{{ term.slug }}/

+ +

{{ term.name }}

+{% endblock header %} + +{% block content %} +{% if paginator %} +{% set pages = paginator.pages %} +{% else %} +{% set pages = term.pages %} +{% endif %} + +{% if paginator %} +

{% if paginator.previous %}<< First < Previous{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}Next > Last >>{% endif %}

+{% endif %} +{% endblock content %} \ No newline at end of file -- cgit v1.2.3