{{- define "head" -}} {{- $current := replaceRE `[^0-9]` "" .File -}} {{- .Scratch.Set "title" .Site.Title -}} {{- .Scratch.Add "title" " #" -}} {{- .Scratch.Add "title" (replaceRE `[^0-9]` "" .File) -}} {{- partial "head.html" . -}} {{- end -}} {{- define "primary" -}} {{- $current := replaceRE `[^0-9]` "" .File -}} {{- partial "nav.html" . -}}
{{ if not .Params.override }} {{ end }} {{ if .Params.english }} {{ end }}

Tegaki Tuesday #{{- $current -}}{{ if .Params.embellishment }} {{ end }}{{ .Params.embellishment | markdownify | emojify }}

()()きの()(よう)()#{{- $current -}}・
{{ if .Params.override }}
{{ .Params.override | safeHTML }}
{{ else }} {{ if .Params.english }} {{ end }}
{{- 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 not (and .dictionary (hasPrefix .dictionary "http")) -}} {{- $.Scratch.Set "dictionary" (printf "%s" ($.Scratch.Get "dictionary") | printf "%s%s" "https://jisho.org/word/" | printf "%s") -}} {{- end -}} {{- if and (not .dictionary) (not .pos) -}} {{- $.Scratch.Get "html" | safeHTML -}} {{- else -}} {{- $.Scratch.Get "html" | safeHTML -}} {{- end -}} {{- end -}}

{{- end -}} {{- end -}}
{{ end }}
{{- partial "content.html" . -}} {{ with .Params.song }}

This week's challenge is from the lyrics of {{ if .override }} {{ with .override }} {{ partial "content.html" (dict "Content" (markdownify .)) }} {{- end -}} {{ else }} {{ with .japanese }}{{ partial "content.html" (dict "Content" .) }}{{ end }}{{ if and .japanese .english }}/{{ end }}{{ with .english }}{{ . }}{{ end -}} {{ end -}} {{- with $.Params.youtube }} (YouTube){{ end -}} {{- with $.Params.spotify }} (Spotify){{ end -}} :

{{ end }} {{ with .Params.youtube }}
{{ end }} {{ with .Params.spotify }} {{ end }} {{ with .Params.translation }}

Translation{{ with .author }} by {{ . }}{{ end }}{{ with .site }} via {{ .name }}

{{ end }} {{ end }} {{ with .Params.suggester }}

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

{{ end }}
{{- end -}} {{- define "secondary" -}} {{- $current := replaceRE `[^0-9]` "" .File -}}
{{- if isset .Site.Data "challenges" -}} {{- range index .Site.Data.challenges ($current) -}} {{- $submission := . -}} {{ if or (ne $submission.username "sspdhemss") (gt $current 121) }} {{- range.images -}} {{- $path := printf "%s" . | printf "%s%s" "/" | printf "%s%s" $current | printf "%s" -}} {{- $image := resources.Get $path -}} {{- partial "submission.html" (dict "submission" $submission "challenge" $current "image" $image) -}} {{- end -}} {{ end }} {{- end -}} {{- end -}}
{{- end -}} {{- define "secondaryFooter" -}} {{- partial "footer.html" (partial "footers/submissions.html" .) -}} {{- end -}}