From ed930eb714c9adf726d31c8806000c80d941f309 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Tue, 12 Apr 2022 22:35:44 -0700 Subject: [PATCH] Format challenge #59 --- content/challenges/59.md | 7 ++ .../layouts/challenges/single.html | 114 +++++++++--------- 2 files changed, 65 insertions(+), 56 deletions(-) create mode 100644 content/challenges/59.md diff --git a/content/challenges/59.md b/content/challenges/59.md new file mode 100644 index 0000000..2dae978 --- /dev/null +++ b/content/challenges/59.md @@ -0,0 +1,7 @@ +--- +date: 2022-04-12 +--- + +This week's challenge is open-ended! **Write down your favorite thing about spring** and submit it; it can be as short or long as you like. (If you're feeling adventurous, draw it as well, perhaps? :cherry_blossom:) + +Depending on how this goes, we me have more open-ended challenges in the future, we'll see... \ No newline at end of file diff --git a/themes/tegakituesday.com/layouts/challenges/single.html b/themes/tegakituesday.com/layouts/challenges/single.html index 8f8e0e7..86c3482 100644 --- a/themes/tegakituesday.com/layouts/challenges/single.html +++ b/themes/tegakituesday.com/layouts/challenges/single.html @@ -14,10 +14,60 @@

Tegaki Tuesday #{{- $current -}}

()()きの()(よう)()#{{- $current -}}・ -
-
-
- + {{ if or (.Params.japanese) (.Params.english) }} +
+
+
+ + + {{- range.Params.japanese -}} + + {{- range. -}} + +

{{- range. -}} + {{- if eq (printf "%T" .text) "string" -}} + {{- $.Scratch.Set "dictionary" .text -}} + {{- $.Scratch.Set "html" .text -}} + {{- else -}} + {{- $.Scratch.Set "dictionary" "" -}} + {{- $.Scratch.Set "html" "" -}} + {{- range.text -}} + {{- if reflect.IsMap . -}} + {{- range $kanji, $furigana := . -}} + {{- $.Scratch.Add "dictionary" $kanji -}} + {{- $.Scratch.Add "html" "" -}} + {{- $.Scratch.Add "html" $kanji -}} + {{- $.Scratch.Add "html" "(" -}} + {{- $.Scratch.Add "html" $furigana -}} + {{- $.Scratch.Add "html" ")" -}} + {{- end -}} + {{- else -}} + {{- $.Scratch.Add "dictionary" . -}} + {{- $.Scratch.Add "html" . -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- if .dictionary -}} + {{- $.Scratch.Set "dictionary" .dictionary -}} + {{- end -}} + {{- if and (not .dictionary) (not .pos) -}} + {{- $.Scratch.Get "html" | safeHTML -}} + {{- else -}} + {{- $.Scratch.Get "html" | safeHTML -}} + {{- end -}} + {{- end -}}

+ {{- end -}} + {{- end -}} +
+
+ + {{- range.Params.english -}} +

{{- $.RenderString . -}}

+ {{- end -}} +
+
+
+ {{- range.Params.japanese -}} @@ -25,72 +75,24 @@

{{- range. -}} {{- if eq (printf "%T" .text) "string" -}} - {{- $.Scratch.Set "dictionary" .text -}} - {{- $.Scratch.Set "html" .text -}} + {{- .text -}} {{- else -}} - {{- $.Scratch.Set "dictionary" "" -}} - {{- $.Scratch.Set "html" "" -}} {{- range.text -}} {{- if reflect.IsMap . -}} {{- range $kanji, $furigana := . -}} - {{- $.Scratch.Add "dictionary" $kanji -}} - {{- $.Scratch.Add "html" "" -}} - {{- $.Scratch.Add "html" $kanji -}} - {{- $.Scratch.Add "html" "(" -}} - {{- $.Scratch.Add "html" $furigana -}} - {{- $.Scratch.Add "html" ")" -}} + {{- $kanji -}}({{- $furigana -}}) {{- end -}} {{- else -}} - {{- $.Scratch.Add "dictionary" . -}} - {{- $.Scratch.Add "html" . -}} + {{- . -}} {{- end -}} {{- end -}} {{- end -}} - {{- if .dictionary -}} - {{- $.Scratch.Set "dictionary" .dictionary -}} - {{- end -}} - {{- if and (not .dictionary) (not .pos) -}} - {{- $.Scratch.Get "html" | safeHTML -}} - {{- else -}} - {{- $.Scratch.Get "html" | safeHTML -}} - {{- end -}} {{- end -}}

{{- end -}} {{- end -}}
-
- - {{- range.Params.english -}} -

{{- $.RenderString . -}}

- {{- end -}} -
-
-
- - - {{- range.Params.japanese -}} - - {{- range. -}} - -

{{- range. -}} - {{- if eq (printf "%T" .text) "string" -}} - {{- .text -}} - {{- else -}} - {{- range.text -}} - {{- if reflect.IsMap . -}} - {{- range $kanji, $furigana := . -}} - {{- $kanji -}}({{- $furigana -}}) - {{- end -}} - {{- else -}} - {{- . -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}}

- {{- end -}} - {{- end -}}
-
+ {{ end }}
{{- partial "content.html" . -}}