blob: c92d5c5694287b0561e723da522649e131c20421 [file] [log] [blame]
Davit Tabidze71eecce2024-06-25 15:00:55 +04001{{ define "main" }}
2<div class="facts-content">
3 {{ $facts := where .Site.Pages "Section" "facts" }}
4 {{ $individualFacts := where $facts "Kind" "page" }}
5 {{ $sortedFacts := sort $individualFacts "File.BaseFileName" "asc" }}
6 <!-- 4x4 GRID -->
7 <div class="grid-container" data-facts='[
8 {{ range $i, $fact := $sortedFacts }}
9 {{ if $i }},{{ end }}{
10 "params": {{ jsonify $fact.Params }}
11 }
12 {{ end }}
13 ]'>
14 {{ range $i, $fact := $sortedFacts }}
15 {{ $className := printf "fact-%d" (add $i 1) }}
16 <div id="fact-{{ $i }}" class="facts {{ $className }} {{ if eq $i 0 }}active-fact{{ end }}"
17 onclick="handleImageChange('{{ $fact.Params.image }}', {{ $i }}, '{{ $fact.Title }}')"
18 onmouseover="handleMouseover('{{ $fact.Params.image }}', {{ $i }}, '{{ $fact.Title }}')">
19 <h3 class="fact-title">{{ $fact.Title }}</h3>
20 {{ $fact.Content }}
21 </div>
22 {{ end }}
23 <!-- 1 Large Box 3x3 -->
24 {{ $firstFact := index $sortedFacts 0 }}
25 <div id="factImageBox" class="fact-image-box">
Davit Tabidzef2aa7502024-07-25 18:02:03 +040026 <img id="factImage" src="/images/fact-1.png" alt="{{ $firstFact.Title }}" class="fact-image" loading="lazy">
Davit Tabidze71eecce2024-06-25 15:00:55 +040027 </div>
28 </div>
29</div>
30<div class="footer-form">
31 {{ partial "register-form.html" . }}
32</div>
Davit Tabidzeaec6d8a2024-07-29 18:30:09 +040033<script src="/js/main.js?v=0.0.5"></script>
34<script src="/js/register.js?v=0.0.3"></script>
Davit Tabidze71eecce2024-06-25 15:00:55 +040035{{ end }}