working on the blog listing page. Almost finished. Needs a few tweaks.
authordanix <danix@danix.xyz>
Sun, 12 Feb 2023 17:31:25 +0000 (18:31 +0100)
committerdanix <danix@danix.xyz>
Sun, 12 Feb 2023 17:31:25 +0000 (18:31 +0100)
layouts/articles/list-baseof.html
layouts/articles/list.html
layouts/page/list-baseof.html
layouts/page/list.html

index 06d57b2..f8388a9 100644 (file)
@@ -1,19 +1,28 @@
 <!DOCTYPE html>
 <html lang="{{ $.Site.LanguageCode | default "en" }}">
        {{- partial "head.html" . -}}
-       <body class="blog">
-               <div id="page" class="section-blog">
-                       <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
+       <body class="blog is-preload">
+               <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
+               <div id="wrapper" class="section-blog">
                        {{- partial "header.html" . -}}
-                       {{- partial "breadcrumbs.html" . -}}
-                       <div id="content" class="site-content">
-                               <div id="primary" class="content-area">
-                                       <main id="main" class="site-main">
-                                               {{- block "main" . }}{{- end }}
-                                       </main>
+
+                       <section id="banner" class="major">
+                               <div class="inner">
+                                       <header class="major">
+                                               <h1>{{ .Site.Title }}</h1>
+                                       </header>
+                                       <div class="content">
+                                               <p>{{ .Site.Params.Description }}</p>
+                                       </div>
                                </div>
+                       </section>
+
+                       <div id="main">
+                               {{- block "blog-list" . }}{{- end }}
                        </div>
                        {{- partial "footer.html" . -}}
                </div>
+               {{- partial "footer-addition.html" . -}}
        </body>
 </html>
+
index d75b6db..a14fe3d 100644 (file)
@@ -1,18 +1,40 @@
-{{ define "main" }}
-<article class="single-page">
-       <div id="page-content">
-               {{ .Content }}
-       </div>
-</article>
-<ul>
+{{ define "blog-list" }}
+<section id="one">
+       <article>
+               <div class="inner">
+                       {{ .Content }}
+               </div>
+       </article>
+</section>
+<section id="two" class="spotlights">
        <!-- Ranges through content/posts/*.md -->
        {{ range .Pages }}
-       <li>
-               <div>
-                       <h3 class="article-title"><a href="{{.Permalink}}">{{.Title}}</a></h3>
-                       <p class="byline">by {{ .Params.Author }} on {{.Date.Format "01-02-2006"}}</p>
+       <section>
+               <a class="image" href="{{.Permalink}}">
+                       <img src="{{ "bg/bg2.jpg" | absURL}}" alt="suca">
+               </a>
+               <div class="content">
+                       <div class="inner">
+                               <header class="major">
+                                       <h3>
+                                       {{ if gt (len .Title) 40 }}
+                                               {{ $first50 := ( substr .Title 0 40 ) }}
+                                               {{ $lastChars := ( substr .Title 40 ) }}
+                                               {{ $newLine := "<br>" }}
+                                               {{ $newTitle := ( printf "%s" $lastChars | printf "%s%s" $newLine | printf "%s%s" $first50  ) }}
+                                               {{ $newTitle | safeHTML }}
+                                       {{ else }}
+                                               {{ .Title }}
+                                       {{ end }}
+                                       </h3>
+                               </header>
+                               <p>here goes an abstract</p>
+                               <ul class="actions">
+                                       <li><a href="{{.Permalink}}" class="button">Read More</a></li>
+                               </ul>
+                       </div>
                </div>
-       </li>
+       </section>
        {{ end }}
-</ul>
+</section>
 {{ end }}
index f3beae8..cc5d0eb 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="{{ $.Site.LanguageCode | default "en" }}">
        {{- partial "head.html" . -}}
-       <body class="blog is-preload">
+       <body class="page-list is-preload">
                <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
                <div id="wrapper">
                        {{- partial "header.html" . -}}
@@ -19,7 +19,7 @@
                                </div>
                        </section>
                        <div id="main">
-                               {{- block "list-main" . }}{{- end }}
+                               {{- block "page-list-main" . }}{{- end }}
                        </div>
                        {{- partial "footer.html" . -}}
                </div>
index 23d4372..fb8b30a 100644 (file)
@@ -1,4 +1,4 @@
-{{ define "list-main" }}
+{{ define "page-list-main" }}
 <article>
        <div class="inner">
                <p>{{ .Content }}</p>