Add challenge content footer
This commit is contained in:
parent
a9d6a3800e
commit
fa9d7e9be0
3 changed files with 63 additions and 57 deletions
|
@ -108,6 +108,14 @@ input[type=number] {
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#challenge {
|
#challenge {
|
||||||
|
@ -121,19 +129,11 @@ input[type=number] {
|
||||||
|
|
||||||
#submissions {
|
#submissions {
|
||||||
grid-area: submissions;
|
grid-area: submissions;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 1em;
|
|
||||||
|
|
||||||
background: rgba(0, 0, 0, 0.125);
|
background: rgba(0, 0, 0, 0.125);
|
||||||
$gap: 0.5em;
|
$gap: 0.5em;
|
||||||
padding: $gap;
|
padding: $gap;
|
||||||
|
|
||||||
footer {
|
|
||||||
margin-top: auto;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
column-count: 3;
|
column-count: 3;
|
||||||
|
|
1
templates/copyright-years.html.tera
Normal file
1
templates/copyright-years.html.tera
Normal file
|
@ -0,0 +1 @@
|
||||||
|
© {% set year = now() | date(format="%Y") | int %}{{ settings.copyright_start }}{% if year != settings.copyright_start %}–{{ year }}{% endif %}
|
|
@ -65,57 +65,62 @@
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div id="challenge">
|
<div id="challenge">
|
||||||
<h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1>
|
<div>
|
||||||
{% if content.japanese %}
|
<h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1>
|
||||||
<div lang="ja">
|
{% if content.japanese %}
|
||||||
<script>
|
<div lang="ja">
|
||||||
let kyujitai = false;
|
<script>
|
||||||
function kyujitaiToggle() {
|
let kyujitai = false;
|
||||||
document.querySelectorAll("[data-kyujitai]").forEach(segment => {
|
function kyujitaiToggle() {
|
||||||
let newText = segment.getAttribute("data-kyujitai");
|
document.querySelectorAll("[data-kyujitai]").forEach(segment => {
|
||||||
segment.setAttribute("data-kyujitai", segment.firstChild.data);
|
let newText = segment.getAttribute("data-kyujitai");
|
||||||
segment.firstChild.data = newText;
|
segment.setAttribute("data-kyujitai", segment.firstChild.data);
|
||||||
})
|
segment.firstChild.data = newText;
|
||||||
kyujitai = !kyujitai;
|
})
|
||||||
}
|
kyujitai = !kyujitai;
|
||||||
</script>
|
}
|
||||||
<button onclick="kyujitaiToggle(); this.innerHTML = kyujitai ? '新字体' : '旧字体'">旧字体</button>
|
</script>
|
||||||
{% for line in content.japanese %}
|
<button onclick="kyujitaiToggle(); this.innerHTML = kyujitai ? '新字体' : '旧字体'">旧字体</button>
|
||||||
{% for subline in line %}
|
{% for line in content.japanese %}
|
||||||
<p>
|
{% for subline in line %}
|
||||||
{%- for word in subline -%}
|
<p>
|
||||||
{%- if word.dictionary -%}
|
{%- for word in subline -%}
|
||||||
<a href="{{ word.dictionary }}" target="_blank"{% if word.pos %} class="{{ word.pos }}" title="{{ word.pos }}"{% endif %}>
|
{%- if word.dictionary -%}
|
||||||
{%- endif -%}
|
<a href="{{ word.dictionary }}" target="_blank"{% if word.pos %} class="{{ word.pos }}" title="{{ word.pos }}"{% endif %}>
|
||||||
{% for segment in word.text -%}
|
{%- endif -%}
|
||||||
<ruby{% if segment.kyujitai %} data-kyujitai="{{ segment.kyujitai }}"{% endif %}>{{ segment.kanji }}<rp>(</rp><rt>{{ segment.furigana | safe }}</rt><rp>)</rp></ruby>
|
{% for segment in word.text -%}
|
||||||
|
<ruby{% if segment.kyujitai %} data-kyujitai="{{ segment.kyujitai }}"{% endif %}>{{ segment.kanji }}<rp>(</rp><rt>{{ segment.furigana | safe }}</rt><rp>)</rp></ruby>
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if word.dictionary -%}
|
||||||
|
</a>
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- if word.dictionary -%}
|
</p>
|
||||||
</a>
|
{% endfor %}
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
</p>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{{ content.text | safe }}
|
||||||
|
{% if content.translation %}
|
||||||
|
<p>
|
||||||
|
Translation
|
||||||
|
{% if content.translation.author %}by {{ content.translation.author }}{% endif %}
|
||||||
|
{% if content.translation.site %} via
|
||||||
|
{% if content.translation.site.link %}
|
||||||
|
<a href="{{ content.translation.site.link }}" target="_blank">{{ content.translation.site.name }}</a>
|
||||||
|
{% else %}
|
||||||
|
{{ content.translation.site.name }}
|
||||||
|
{% endif %}
|
||||||
|
{%- endif -%}
|
||||||
|
</p>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if content.suggester -%}
|
||||||
|
<p><em>This challenge was suggested by <strong>{{ content.suggester }}</strong> using the <code>-h suggest</code> command.</code></em></p>
|
||||||
|
{%- endif -%}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<footer>
|
||||||
{{ content.text | safe }}
|
Copyright {% include "copyright-years" %} Tegaki Tuesday. All rights reserved. 字ちゃん mascot art by <a href="https://twitter.com/bellumela" target="_blank">@bellumela</a>.
|
||||||
{% if content.translation %}
|
</footer>
|
||||||
<p>
|
|
||||||
Translation
|
|
||||||
{% if content.translation.author %}by {{ content.translation.author }}{% endif %}
|
|
||||||
{% if content.translation.site %} via
|
|
||||||
{% if content.translation.site.link %}
|
|
||||||
<a href="{{ content.translation.site.link }}" target="_blank">{{ content.translation.site.name }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ content.translation.site.name }}
|
|
||||||
{% endif %}
|
|
||||||
{%- endif -%}
|
|
||||||
</p>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if content.suggester -%}
|
|
||||||
<p><em>This challenge was suggested by <strong>{{ content.suggester }}</strong> using the <code>-h suggest</code> command.</code></em></p>
|
|
||||||
{%- endif -%}
|
|
||||||
</div>
|
</div>
|
||||||
<div id="submissions">
|
<div id="submissions">
|
||||||
<script>
|
<script>
|
||||||
|
@ -146,7 +151,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
Submissions are copyright © {% set year = now() | date(format="%Y") | int %}{{ settings.copyright_start }}{% if year != settings.copyright_start %}–{{ year }}{% endif %} their respective submitters, and are licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</a> license.
|
Submissions are copyright {% include "copyright-years" %} their respective submitters, and are licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</a> license.
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue