@ -14,10 +14,60 @@
< h3 > Tegaki Tuesday #{{- $current -}}< / h3 >
< small > < ruby > 手< rp > (< / rp > < rt > て< / rt > < rp > )< / rp > < / ruby > < ruby > 書< rp > (< / rp > < rt > が< / rt > < rp > )< / rp > < / ruby > きの< ruby > 火< rp > (< / rp > < rt > か< / rt > < rp > )< / rp > < / ruby > < ruby > 曜< rp > (< / rp > < rt > よう< / rt > < rp > )< / rp > < / ruby > < ruby > 日< rp > (< / rp > < rt > び< / rt > < rp > )< / rp > < / ruby > # {{- $current -}}・< time datetime = "{{- .Date.Format " 2006-01-02T15:04:05Z07:00 " - } } " > {{- .Date.Format "2006年01月02日" -}}< / time > < / small >
< / header >
< div id = "challenge-container" >
< div id = "challenge-horizontal" >
< div id = "challenge-vocab" lang = "ja" >
<!-- Vocab view -->
{{ if or (.Params.japanese) (.Params.english) }}
< div id = "challenge-container" >
< div id = "challenge-horizontal" >
< div id = "challenge-vocab" lang = "ja" >
<!-- Vocab view -->
<!-- Outer list: lines -->
{{- range.Params.japanese -}}
<!-- Inner list: sublines -->
{{- range. -}}
<!-- Innermost list: words -->
< p > {{- 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" "< ruby > " -}}
{{- $.Scratch.Add "html" $kanji -}}
{{- $.Scratch.Add "html" "< rp > (< / rp > < rt > " -}}
{{- $.Scratch.Add "html" $furigana -}}
{{- $.Scratch.Add "html" "< / rt > < rp > )< / rp > < / ruby > " -}}
{{- 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 -}}
< a href = "https://jisho.org/word/{{- $.Scratch.Get " dictionary " - } } " class = "{{- .pos -}}" title = "{{- .pos -}}" target = "_blank" > {{- $.Scratch.Get "html" | safeHTML -}}< / a >
{{- end -}}
{{- end -}}< / p >
{{- end -}}
{{- end -}}
< / div >
< div id = "challenge-english" >
<!-- English view -->
{{- range.Params.english -}}
< p > {{- $.RenderString . -}}< / p >
{{- end -}}
< / div >
< / div >
< div id = "challenge-kanji" lang = "ja" >
<!-- Kanji view -->
<!-- Outer list: lines -->
{{- range.Params.japanese -}}
<!-- Inner list: sublines -->
@ -25,72 +75,24 @@
<!-- Innermost list: words -->
< p > {{- 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" "< ruby > " -}}
{{- $.Scratch.Add "html" $kanji -}}
{{- $.Scratch.Add "html" "< rp > (< / rp > < rt > " -}}
{{- $.Scratch.Add "html" $furigana -}}
{{- $.Scratch.Add "html" "< / rt > < rp > )< / rp > < / ruby > " -}}
< a href = "https://jisho.org/search/{{- $kanji -}} #kanji" target = "_blank" > < ruby > {{- $kanji -}}< rp > (< / rp > < rt > {{- $furigana -}}< / rt > < rp > )< / rp > < / ruby > < / a >
{{- 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 -}}
< a href = "https://jisho.org/word/{{- $.Scratch.Get " dictionary " - } } " class = "{{- .pos -}}" title = "{{- .pos -}}" target = "_blank" > {{- $.Scratch.Get "html" | safeHTML -}}< / a >
{{- end -}}
{{- end -}}< / p >
{{- end -}}
{{- end -}}
< / div >
< div id = "challenge-english" >
<!-- English view -->
{{- range.Params.english -}}
< p > {{- $.RenderString . -}}< / p >
{{- end -}}
< / div >
< / div >
< div id = "challenge-kanji" lang = "ja" >
<!-- Kanji view -->
<!-- Outer list: lines -->
{{- range.Params.japanese -}}
<!-- Inner list: sublines -->
{{- range. -}}
<!-- Innermost list: words -->
< p > {{- range. -}}
{{- if eq (printf "%T" .text) "string" -}}
{{- .text -}}
{{- else -}}
{{- range.text -}}
{{- if reflect.IsMap . -}}
{{- range $kanji, $furigana := . -}}
< a href = "https://jisho.org/search/{{- $kanji -}} #kanji" target = "_blank" > < ruby > {{- $kanji -}}< rp > (< / rp > < rt > {{- $furigana -}}< / rt > < rp > )< / rp > < / ruby > < / a >
{{- end -}}
{{- else -}}
{{- . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}< / p >
{{- end -}}
{{- end -}}
< / div >
< / div >
{{ end }}
< / div >
< div class = "content" >
{{- partial "content.html" . -}}