From fa9d7e9be081e0ab54d07342fb9a24196c7b3966 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sun, 2 Jul 2023 21:25:55 -0700 Subject: [PATCH] Add challenge content footer --- styles/sass/style.scss | 16 ++--- templates/copyright-years.html.tera | 1 + templates/index.html.tera | 103 +++++++++++++++------------- 3 files changed, 63 insertions(+), 57 deletions(-) create mode 100644 templates/copyright-years.html.tera diff --git a/styles/sass/style.scss b/styles/sass/style.scss index b927255..d6783da 100644 --- a/styles/sass/style.scss +++ b/styles/sass/style.scss @@ -108,6 +108,14 @@ input[type=number] { & > div { overflow: scroll; + display: flex; + flex-direction: column; + gap: 1em; + + footer { + margin-top: auto; + text-align: center; + } } #challenge { @@ -121,19 +129,11 @@ input[type=number] { #submissions { grid-area: submissions; - display: flex; - flex-direction: column; - gap: 1em; background: rgba(0, 0, 0, 0.125); $gap: 0.5em; padding: $gap; - footer { - margin-top: auto; - text-align: center; - } - & > div { width: 100%; column-count: 3; diff --git a/templates/copyright-years.html.tera b/templates/copyright-years.html.tera new file mode 100644 index 0000000..abc881b --- /dev/null +++ b/templates/copyright-years.html.tera @@ -0,0 +1 @@ +© {% set year = now() | date(format="%Y") | int %}{{ settings.copyright_start }}{% if year != settings.copyright_start %}–{{ year }}{% endif %} \ No newline at end of file diff --git a/templates/index.html.tera b/templates/index.html.tera index 128dd6a..3837301 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -65,57 +65,62 @@
-

Welcome to Tegaki Tuesday #{{ challenge }}!

- {% if content.japanese %} -
- - - {% for line in content.japanese %} - {% for subline in line %} -

- {%- for word in subline -%} - {%- if word.dictionary -%} - - {%- endif -%} - {% for segment in word.text -%} - {{ segment.kanji }}({{ segment.furigana | safe }}) +

+

Welcome to Tegaki Tuesday #{{ challenge }}!

+ {% if content.japanese %} +
+ + + {% for line in content.japanese %} + {% for subline in line %} +

+ {%- for word in subline -%} + {%- if word.dictionary -%} + + {%- endif -%} + {% for segment in word.text -%} + {{ segment.kanji }}({{ segment.furigana | safe }}) + {%- endfor -%} + {%- if word.dictionary -%} + + {%- endif -%} {%- endfor -%} - {%- if word.dictionary -%} - - {%- endif -%} - {%- endfor -%} -

+

+ {% endfor %} {% endfor %} - {% endfor %} +
+ {% endif %} + {{ content.text | safe }} + {% if content.translation %} +

+ Translation + {% if content.translation.author %}by {{ content.translation.author }}{% endif %} + {% if content.translation.site %} via + {% if content.translation.site.link %} + {{ content.translation.site.name }} + {% else %} + {{ content.translation.site.name }} + {% endif %} + {%- endif -%} +

+ {%- endif -%} + {%- if content.suggester -%} +

This challenge was suggested by {{ content.suggester }} using the -h suggest command.

+ {%- endif -%}
- {% endif %} - {{ content.text | safe }} - {% if content.translation %} -

- Translation - {% if content.translation.author %}by {{ content.translation.author }}{% endif %} - {% if content.translation.site %} via - {% if content.translation.site.link %} - {{ content.translation.site.name }} - {% else %} - {{ content.translation.site.name }} - {% endif %} - {%- endif -%} -

- {%- endif -%} - {%- if content.suggester -%} -

This challenge was suggested by {{ content.suggester }} using the -h suggest command.

- {%- endif -%} +
+ Copyright {% include "copyright-years" %} Tegaki Tuesday. All rights reserved. 字ちゃん mascot art by @bellumela. +