~bfiedler/website

1cdf6270665d419b33c6805a8a6e766bc2ee5b40 — Ben Fiedler 1 year, 11 months ago 076ee1b
Link the FEN to a lichess analysis board
1 files changed, 3 insertions(+), 1 deletions(-)

M layouts/shortcodes/fen.html
M layouts/shortcodes/fen.html => layouts/shortcodes/fen.html +3 -1
@@ 1,5 1,6 @@
{{ $fen := cond .IsNamedParams (.Get "pos") (.Get 0) }}
<figure class="fen">
  <a href="https://lichess.org/analysis/fromPosition/{{ $fen }}">
  <div class="board{{ if (.Get "flip") }} flipped{{ end }}">
    {{- range $f := split $fen " " | first 1 }}
    {{- range $r := split $f "/" }}


@@ 103,8 104,9 @@
      {{ end }}
    </div>
    {{- end }}
  {{- end }}
    {{- end }}
  </div>
  </a>
  <figcaption>
    {{ if .IsNamedParams }}
    <p>{{ .Get "caption" | markdownify }}</p>