summaryrefslogtreecommitdiff
path: root/themes/itheme/layouts/index.html
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-04-29 10:16:09 -0400
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-04-29 10:16:09 -0400
commit2cd42b9d71238abc14748566134ead380d5f0969 (patch)
tree03b479b0d92781add4c196bb515886f0b981e842 /themes/itheme/layouts/index.html
Init
Diffstat (limited to 'themes/itheme/layouts/index.html')
-rw-r--r--themes/itheme/layouts/index.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/themes/itheme/layouts/index.html b/themes/itheme/layouts/index.html
new file mode 100644
index 0000000..9cdb913
--- /dev/null
+++ b/themes/itheme/layouts/index.html
@@ -0,0 +1,53 @@
+{{ define "main" }}
+{{ $pages := where .Site.RegularPages "Params.plain" "ne" true }}
+ <section class="everydayfeed">
+ <div class="section-content">
+ <h2 class="section-head">{{ i18n "latestArticles" }}</h2>
+ <ul role="list" class="section-tiles">
+ {{ range first 1 $pages }}
+ {{ $level := 1 }}
+ {{ partial "tile.html" (dict "context" . "level" $level) }}
+ {{ end }}
+
+ {{ range first 4 ( after 1 $pages) }}
+ {{ $level := 2 }}
+ {{ partial "tile.html" (dict "context" . "level" $level) }}
+ {{ end }}
+
+ {{ range first 6 ( after 5 $pages) }}
+ {{ $level := 3 }}
+ {{ partial "tile.html" (dict "context" . "level" $level) }}
+ {{ end }}
+ </ul>
+ </div>
+ </section>
+{{- if site.Params.ShowMore -}}
+ <section class="more-from-newsroom">
+ <div class="section-content">
+ <h2 class="section-head">{{ i18n "moreArticles" }}</h2>
+ <ul role="list" class="section-tiles">
+
+ {{ range first 6 $pages }}
+ {{ partial "moreTile.html" (dict "context" .) }}
+ {{ end }}
+ </ul>
+ <div class="view-archive-wrapper">
+ <a href="{{ "posts" | relURL }} " class="cta-primary-light" data-analytics-region="router" data-analytics-title="view archive">{{ i18n "viewArchive"}}</a>
+ </div>
+ </div>
+ </section>
+{{- end -}}
+ <script>
+ document.addEventListener("DOMContentLoaded", function () {
+ var script = document.createElement("script");
+ script.src = {{ "js/animation.js" | relURL }};
+ document.head.appendChild(script);
+
+ script.onload = function () {
+ console.log("lazyload.js loaded");
+ // when layout is loaded, load the images
+ initImage();
+ };
+ });
+ </script>
+{{ end }} \ No newline at end of file