From e2e2e284616a30f5d1c253374584a2033685de51 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 22 Apr 2023 03:03:14 +0200 Subject: [PATCH] split into multiple files --- templates/blog/footer.html | 45 ++++-------------------------- templates/blog/head.html | 18 ++---------- templates/libs/hljs_footer.html | 4 +++ templates/libs/hljs_head.html | 4 +++ templates/libs/katex_footer.html | 27 ++++++++++++++++++ templates/libs/katex_head.html | 6 ++++ templates/libs/mermaid_footer.html | 7 +++++ 7 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 templates/libs/hljs_footer.html create mode 100644 templates/libs/hljs_head.html create mode 100644 templates/libs/katex_footer.html create mode 100644 templates/libs/katex_head.html create mode 100644 templates/libs/mermaid_footer.html diff --git a/templates/blog/footer.html b/templates/blog/footer.html index ac69c96..1b087cd 100644 --- a/templates/blog/footer.html +++ b/templates/blog/footer.html @@ -2,43 +2,8 @@ Retour à la liste des posts -{{#data}} {{#post}} {{#metadata}} {{#math}} - - - - -{{/math}} {{#mermaid}} - - -{{/mermaid}} {{#syntax_highlight}} - - - -{{/syntax_highlight}} {{/metadata}} {{/post}} {{/data}} +{{#data}} {{#post}} {{#metadata}} +{{#mermaid}}{{>libs/mermaid_footer.html}}{{/mermaid}} +{{#math}}{{>libs/katex_footer.html}}{{/math}} +{{#syntax_highlight}}{{>libs/hljs_footer.html}}{{/syntax_highlight}} +{{/metadata}} {{/post}} {{/data}} diff --git a/templates/blog/head.html b/templates/blog/head.html index 5c024a3..720d3f3 100644 --- a/templates/blog/head.html +++ b/templates/blog/head.html @@ -39,19 +39,7 @@ - {{#data}} {{#post}} {{#metadata}} {{#math}} - - - {{/math}} {{#syntax_highlight}} - - - {{/syntax_highlight}} {{/metadata}} {{/post}} {{/data}} + {{#data}} {{#post}} {{#metadata}} {{#math}} {{>libs/katex_head.html}} + {{/math}} {{#syntax_highlight}} {{>libs/hljs_head.html}} {{/syntax_highlight}} + {{/metadata}} {{/post}} {{/data}} diff --git a/templates/libs/hljs_footer.html b/templates/libs/hljs_footer.html new file mode 100644 index 0000000..b630983 --- /dev/null +++ b/templates/libs/hljs_footer.html @@ -0,0 +1,4 @@ + + diff --git a/templates/libs/hljs_head.html b/templates/libs/hljs_head.html new file mode 100644 index 0000000..93e9bc0 --- /dev/null +++ b/templates/libs/hljs_head.html @@ -0,0 +1,4 @@ + diff --git a/templates/libs/katex_footer.html b/templates/libs/katex_footer.html new file mode 100644 index 0000000..e2eec7a --- /dev/null +++ b/templates/libs/katex_footer.html @@ -0,0 +1,27 @@ + + + diff --git a/templates/libs/katex_head.html b/templates/libs/katex_head.html new file mode 100644 index 0000000..dd361a4 --- /dev/null +++ b/templates/libs/katex_head.html @@ -0,0 +1,6 @@ + diff --git a/templates/libs/mermaid_footer.html b/templates/libs/mermaid_footer.html new file mode 100644 index 0000000..c1cb642 --- /dev/null +++ b/templates/libs/mermaid_footer.html @@ -0,0 +1,7 @@ +