aboutsummaryrefslogtreecommitdiff
path: root/deps/inja/test/data/html-extend
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-11-15 12:51:46 +0100
committerToni Uhlig <matzeton@googlemail.com>2021-11-15 12:51:46 +0100
commitc6846d9c3a35145467c3276f35742e562d584b36 (patch)
tree8e1425fae4c5372bf2c3d122d7ef9c652dd00686 /deps/inja/test/data/html-extend
parentc2ef613b99d01e742127d894756e49f42b1f264d (diff)
parent662f5a771f3807bf7ebd5a3989230d5d0a26659d (diff)
Merge commit '662f5a771f3807bf7ebd5a3989230d5d0a26659d'
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'deps/inja/test/data/html-extend')
-rw-r--r--deps/inja/test/data/html-extend/base.txt11
-rw-r--r--deps/inja/test/data/html-extend/data.json12
-rw-r--r--deps/inja/test/data/html-extend/inter.txt3
-rw-r--r--deps/inja/test/data/html-extend/result.txt11
-rw-r--r--deps/inja/test/data/html-extend/template.txt7
5 files changed, 44 insertions, 0 deletions
diff --git a/deps/inja/test/data/html-extend/base.txt b/deps/inja/test/data/html-extend/base.txt
new file mode 100644
index 0000000..e301c7a
--- /dev/null
+++ b/deps/inja/test/data/html-extend/base.txt
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ {% block head -%}
+ <title>{% block title %}Default - {% endblock %}</title>
+ {%- endblock -%}
+</head>
+<body>
+ {% block body %}ignored{% endblock %}
+</body>
+</html>
diff --git a/deps/inja/test/data/html-extend/data.json b/deps/inja/test/data/html-extend/data.json
new file mode 100644
index 0000000..c5726a5
--- /dev/null
+++ b/deps/inja/test/data/html-extend/data.json
@@ -0,0 +1,12 @@
+{
+ "author": "Pantor",
+ "date": "23/12/2018",
+ "tags": [
+ "test",
+ "templates"
+ ],
+ "views": 123,
+ "title": "Inja works.",
+ "content": "Inja is the best and fastest template engine for C++. Period.",
+ "footer-text": "This is the footer."
+}
diff --git a/deps/inja/test/data/html-extend/inter.txt b/deps/inja/test/data/html-extend/inter.txt
new file mode 100644
index 0000000..d20d97b
--- /dev/null
+++ b/deps/inja/test/data/html-extend/inter.txt
@@ -0,0 +1,3 @@
+{% extends "base.txt" %}
+{% block title %}Inter {{ author }}{% endblock %}
+{% block body %}<main>Intermediate Content</main>{% endblock %} \ No newline at end of file
diff --git a/deps/inja/test/data/html-extend/result.txt b/deps/inja/test/data/html-extend/result.txt
new file mode 100644
index 0000000..6d99e29
--- /dev/null
+++ b/deps/inja/test/data/html-extend/result.txt
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Default - Inter Pantor: Inja works.</title>
+
+ <style type="text/css">.important { color: #336699; }</style>
+</head>
+<body>
+ <main>Inja is the best and fastest template engine for C++. Period.</main>
+</body>
+</html>
diff --git a/deps/inja/test/data/html-extend/template.txt b/deps/inja/test/data/html-extend/template.txt
new file mode 100644
index 0000000..18eeb5d
--- /dev/null
+++ b/deps/inja/test/data/html-extend/template.txt
@@ -0,0 +1,7 @@
+{% extends "inter.txt" %}
+{% block head -%}
+ {{ super(2) }}
+ <style type="text/css">.important { color: #336699; }</style>
+{%- endblock %}
+{% block title %}{{ super(2) }}{{ super() }}: {{ title }}{% endblock %}
+{% block body %}<main>{{ content }}</main>{% endblock %}