diff --git a/instance/cfg.py b/instance/cfg.py new file mode 100644 index 0000000..5c2b9e5 --- /dev/null +++ b/instance/cfg.py @@ -0,0 +1,14 @@ +import os +from envs import env + +pages_root = 'data' +static_root = 'static' +default_template = 'page.html' +URL_PREFIX = "/" +FLATPAGES_EXTENSION = ".md" +FLATPAGES_AUTO_RELOAD = True +DEBUG = True +FLATPAGES_ROOT = os.path.abspath(pages_root) +DEFAULT_TEMPLATE = 'page.html' +PAGES_ROOT='data' +STATIC_ROOT='static' \ No newline at end of file diff --git a/instance/templates/layout.html b/instance/templates/layout.html new file mode 100644 index 0000000..e2ecacf --- /dev/null +++ b/instance/templates/layout.html @@ -0,0 +1,25 @@ +{# -*-jinja2-*- #} + + + + +
+
+
+ + + {% block content %} + {% endblock %} + + +
+
+
+ + + diff --git a/instance/templates/page.html b/instance/templates/page.html new file mode 100644 index 0000000..6f119a2 --- /dev/null +++ b/instance/templates/page.html @@ -0,0 +1,67 @@ +{# -*-jinja2-*- #} +{% extends "layout.html" %} + +{% block content %} + +

{{post.title}}

+{{post.date}} +{% if post.links["subindexpages"] | length > 0 %} +
+ Unterseiten: + +{% endif %} + +{{ post.html|safe }} + + +{% if post.links["subpages"] |length > 0 %} + +{% endif %} + +{% if post.links["files"] |length > 0 %} + +
+ +Files: + +{% endif %} + +{% if post.links["images"] |length > 0 %} + +
+ +Images: + +{% endif %} + +{% endblock %} diff --git a/instance/templates/page_plain.html b/instance/templates/page_plain.html new file mode 100644 index 0000000..b728cbb --- /dev/null +++ b/instance/templates/page_plain.html @@ -0,0 +1,68 @@ +{# -*-jinja2-*- #} +{% extends "layout.html" %} + +{% block content %} + +

{{post.title}}

+{{post.date}} +{% if post.links["subindexpages"] | length > 0 %} +
+ Unterseiten: + +{% endif %} + +{{ post.html|safe }} + + +{% if post.links.subpages |length > 0 %} +hi + +{% endif %} + +{% if post.links["files"] |length > 0 %} + +
+ +Files: + +{% endif %} + +{% if post.links["images"] |length > 0 %} + +
+ +Images: + +{% endif %} + +{% endblock %} diff --git a/instance/templates/title.html b/instance/templates/title.html new file mode 100644 index 0000000..6f119a2 --- /dev/null +++ b/instance/templates/title.html @@ -0,0 +1,67 @@ +{# -*-jinja2-*- #} +{% extends "layout.html" %} + +{% block content %} + +

{{post.title}}

+{{post.date}} +{% if post.links["subindexpages"] | length > 0 %} +
+ Unterseiten: + +{% endif %} + +{{ post.html|safe }} + + +{% if post.links["subpages"] |length > 0 %} + +{% endif %} + +{% if post.links["files"] |length > 0 %} + +
+ +Files: + +{% endif %} + +{% if post.links["images"] |length > 0 %} + +
+ +Images: + +{% endif %} + +{% endblock %}