ybbond

My site. The main domain
Log | Files | Refs | README | LICENSE | CC-LICENSE

commit 4f63ae1a00d568e8162cb6bf3e4ed370cba0c955
parent 44a7bdcadf26e2a491c37905a6992ff5523d0c51
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Sat,  9 May 2020 18:05:29 +0700

feature: indieweb h-feed for listings

Diffstat:
Massets/content.scss | 6+-----
Massets/styles.scss | 8+++++++-
Mlayouts/_default/list.html | 26++++++++++++++++++++++++--
Mlayouts/_default/single.html | 4----
Mlayouts/partials/post/pagination.html | 4++--
Mlayouts/partials/post/summary.html | 12+++++++++---

6 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/assets/content.scss b/assets/content.scss
@@ -5,14 +5,10 @@
   @return map-get($theme-map, $key);
 }
 
-.content, .notes  {
+.content, .notes, .summary {
   font-family: $font-text;
   width: 100%;
 
-  .hcard {
-    display: none;
-  }
-
   .headline-hash {
     padding: 0 0.2em;
     @media(min-width: 600px) {
diff --git a/assets/styles.scss b/assets/styles.scss
@@ -38,6 +38,12 @@ hr {
   }
 }
 
+.h-entry, .h-feed {
+  .hcard {
+    display: none;
+  }
+}
+
 h1, h2, h3, h4, h5 {
   @include themify($themes) {
     color: themed('color-green');
@@ -57,7 +63,7 @@ h1 {
 
 a {
   text-decoration: none;
-  &:not(.button, h2) {
+  &:not(.button, h1, h2) {
     &:hover {
       outline-style: solid;
       outline-width: 0.3em;
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -1,9 +1,30 @@
 {{ define "main" }}
+  <div class="h-feed">
+    <div id="h-card" class="hcard">
+    <img class="u-photo" src={{ "logo.png" | absURL }} alt="Weird photo of yohanes bandung" />
+    <a class="p-author h-card" href={{ .Site.Params.MainSiteURL }} rel="author">{{ substr .Site.Params.Author 0 20 }}.</a>
+    <a class="u-email" href="mailto:{{ .Site.Params.Email }}">{{ .Site.Params.Email }}</a>
+    <a rel="syndication" class="u-syndication" href={{ .Permalink }}>{{ .Title }}</a>
+    <span class="p-locality">Jakarta</span>, <span class="p-country-name">Indonesia</span>
+    {{ with .Params.tags }}
+      {{ range . }}
+        <a class="p-category" href={{ (printf  "tags/%s" .) | urlize | absURL }}>{{ . }}</a>
+      {{ end }}
+    {{ end }}
+  </div>
+  {{ $selflink := .Permalink }}
   {{ if or .Title .Content }}
-    <div>
-      {{ with .Title }}<h1>{{ . }}</h1>{{ end }}
+    <div class="list__header">
+      {{ with .Title }}
+        <a href={{ $selflink }} class="u-url">
+          <h1 class="p-name">
+              {{ . }}
+          </h1>
+        </a>
+      {{ end }}
       {{ with .Content }}<div>{{ . }}</div>{{ end }}
     </div>
+    <hr>
   {{ end }}
 
   {{ if  eq .Type "notes" }}
@@ -16,4 +37,5 @@
     {{ end }}
     {{ partial "post/pagination.html" . }}
   {{ end }}
+</div>
 {{ end }} 
\ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -9,13 +9,9 @@
       <div id="h-card" class="hcard">
         <img class="u-photo" src={{ "logo.png" | absURL }} alt="Weird photo of yohanes bandung" />
         <a class="p-author h-card" href={{ .Site.Params.MainSiteURL }} rel="author">{{ substr .Site.Params.Author 0 20 }}.</a>
-        <br>
         <a class="u-email" href="mailto:{{ .Site.Params.Email }}">{{ .Site.Params.Email }}</a>
-        <br>
         <a rel="syndication" class="u-syndication" href={{ .Permalink }}>{{ .Title }}</a>
-        <br>
         <span class="p-locality">Jakarta</span>, <span class="p-country-name">Indonesia</span>
-        <br>
         {{ with .Params.tags }}
           {{ range . }}
             <a class="p-category" href={{ (printf  "tags/%s" .) | urlize | absURL }}>{{ . }}</a>
diff --git a/layouts/partials/post/pagination.html b/layouts/partials/post/pagination.html
@@ -1,7 +1,7 @@
 <nav class="pagination">
   {{ if gt .Paginator.TotalPages 1 }}
     {{ if .Paginator.HasNext }}
-      <a class="button pagination__item__left" role="button" href="{{ trim .Paginator.Next.URL "/" | absLangURL }}" data-rel="prefetch">
+      <a class="button pagination__item__left" role="button" href="{{ trim .Paginator.Next.URL "/" | absLangURL }}" data-rel="prefetch" rel="next">
         < Older
       </a>
     {{ else }}
@@ -9,7 +9,7 @@
     {{ end }}
     <span class="pagination__item">*</span>
     {{ if .Paginator.HasPrev }}
-      <a class="button pagination__item__right" role="button" href="{{ trim .Paginator.Prev.URL "/" | absLangURL }}" data-rel="prefetch">
+      <a class="button pagination__item__right" role="button" href="{{ trim .Paginator.Prev.URL "/" | absLangURL }}" data-rel="prefetch" rel="prev">
         Newer >
       </a>
     {{ else }}
diff --git a/layouts/partials/post/summary.html b/layouts/partials/post/summary.html
@@ -1,6 +1,12 @@
-<article class="summary">
-  <a href="{{ .Permalink }}"><h2 class="summary__title">{{ .Title }}</h2></a>
-  <time title="{{ .Date.Format "Monday, 02 January 2006 on 15:04:05" }} GMT+7">{{ .Date.Format "02 Jan 2006" }}</time>
+<article class="summary h-entry">
+  <a href="{{ .Permalink }}" class="u-url">
+    <h2 class="summary__title p-name">
+      {{ .Title }}
+    </h2>
+  </a>
+  <time title="{{ .Date.Format "Monday, 02 January 2006 on 15:04:05" }} GMT+7">
+    {{ .Date.Format "02 Jan 2006" }}
+  </time>
   <span> - </span>
   {{ range .Params.tags }}
     {{- partial "components/tagitem.html" . -}}