commit 38a0b90c9efce62fa431034d9a101f195811f527 parent 4f63ae1a00d568e8162cb6bf3e4ed370cba0c955 Author: Yohanes Bandung <bandungpenting@gmail.com> Date: Sat, 9 May 2020 20:01:53 +0700 refactor: listings for h-feed add correct image Diffstat:
| M | assets/content.scss | | | 8 | ++++---- |
| M | assets/styles.scss | | | 10 | ++++------ |
| A | content/notes/_index.md | | | 7 | +++++++ |
| M | content/posts/April Links.md | | | 14 | ++++++++++---- |
| A | content/posts/_index.md | | | 6 | ++++++ |
| D | layouts/_default/_markup/render-link.html | | | 1 | - |
| M | layouts/_default/list.html | | | 5 | +++-- |
| M | layouts/_default/single.html | | | 2 | +- |
| M | layouts/partials/post/notes-item.html | | | 10 | ++++++++-- |
| M | layouts/partials/post/summary.html | | | 17 | +++++++++++++---- |
10 files changed, 56 insertions(+), 24 deletions(-)
diff --git a/assets/content.scss b/assets/content.scss @@ -5,7 +5,7 @@ @return map-get($theme-map, $key); } -.content, .notes, .summary { +.content, .notes, .summary__content { font-family: $font-text; width: 100%; @@ -122,15 +122,15 @@ span { position: relative; &:before { + right: 0.6em; + top: -0.2em; display: inline-block; - content: "โ "; + content: "โ"; position: absolute; z-index: 1; - width: 20px; @include themify($themes) { color: themed('color-red'); } - left: -1.2em; } } input { diff --git a/assets/styles.scss b/assets/styles.scss @@ -21,6 +21,10 @@ body { margin: 0 auto; } +[hidden] { + display: none; +} + hr { margin: 40px auto; @include themify($themes) { @@ -38,12 +42,6 @@ hr { } } -.h-entry, .h-feed { - .hcard { - display: none; - } -} - h1, h2, h3, h4, h5 { @include themify($themes) { color: themed('color-green'); diff --git a/content/notes/_index.md b/content/notes/_index.md @@ -0,0 +1,6 @@ +--- +title: My Notes +--- + +Listed are short thoughts, brags, and unimportant stuffs of my life. +Synced with this [RSS](/notes/index.xml) and my [Micro.Blog](https://micro.blog/ybbond) page.+ \ No newline at end of file diff --git a/content/posts/April Links.md b/content/posts/April Links.md @@ -7,12 +7,12 @@ date: 2020-05-01T00:00:01 type: bookmarks --- -An interesting [posts](https://yihui.org/en/2018/02/career-crisis/) by Yihui Xie, maintainer of TinyTex, and its [follow-up](https://yihui.org/en/2018/02/procrastination-techniques/) that leads me to this naughty website: - -๐ [Corrupt a file - Corrupt file online, deliver on time!](https://corrupt-a-file.net/) ## Tech +๐ [IndieWeb](https://indieweb.org/) +Led me to `IndieWebify` this site. + ๐ [vime/README.md at master ยท vime-js/vime ยท GitHub](https://github.com/vime-js/vime/blob/master/README.md) ๐ [Password Strengh - xkcd #936](https://xkcd.com/936/) @@ -23,4 +23,9 @@ An interesting [posts](https://yihui.org/en/2018/02/career-crisis/) by Yihui Xie ๐งฎ [Analyzing HN Reader's Personal Blogs Part 1 - Danny Salzman, by Danny Salzman](https://www.dannysalzman.com/2020/04/08/analyzing-hn-readers-personal-blogs) -๐ [RIP John Conway - XKCD](https://xkcd.com/2293/) +๐ [RIP John Conway - xkcd #2293](https://xkcd.com/2293/) + +## Knowledge + +An interesting [post](https://yihui.org/en/2018/02/career-crisis/) by Yihui Xie, maintainer of TinyTex, and its [follow-up](https://yihui.org/en/2018/02/procrastination-techniques/) that leads me to this naughty website: +๐ [Corrupt a file - Corrupt file online, deliver on time!](https://corrupt-a-file.net/)+ \ No newline at end of file diff --git a/content/posts/_index.md b/content/posts/_index.md @@ -0,0 +1,6 @@ +--- +title: Posts +--- + +Weblog, articles, bookmarks, reviews and thoughts. +Synced with this [RSS](/index.xml) and my [Micro.Blog](https://micro.blog/ybbond) page. diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html @@ -1 +0,0 @@ -<a href={{ .Destination | safeURL }}>{{ .Text | safeHTML }}</a> diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -1,6 +1,6 @@ {{ define "main" }} <div class="h-feed"> - <div id="h-card" class="hcard"> + <div id="h-card" class="hcard" hidden=""> <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> @@ -15,10 +15,11 @@ {{ $selflink := .Permalink }} {{ if or .Title .Content }} <div class="list__header"> + {{ $isTag := eq .Type "tags" }} {{ with .Title }} <a href={{ $selflink }} class="u-url"> <h1 class="p-name"> - {{ . }} + {{ cond $isTag "Tag ยซ" nil}}{{ . }}{{ cond $isTag "ยป" nil}} </h1> </a> {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -6,7 +6,7 @@ {{ else }} <article class="content h-entry"> <h1 class="p-name">{{ .Title }}</h1> - <div id="h-card" class="hcard"> + <div id="h-card" class="hcard" hidden=""> <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> diff --git a/layouts/partials/post/notes-item.html b/layouts/partials/post/notes-item.html @@ -1,8 +1,14 @@ {{ $dateformat := .Date.Format "2006-01-02 15:04" }} {{ $idslug := (print "date-" $dateformat "-") | urlize }} <div class="notes h-entry" id={{ $idslug }}> - <div id="h-card" class="hcard"> - <img class="u-photo" src={{ "logo.png" | absURL }} alt="Weird photo of yohanes bandung" /> + <div id="h-card" class="hcard" hidden=""> + {{ $permalink := .Permalink }} + {{ $title := .Title }} + {{ with .Params.Image.Src }} + {{ $filename := . | safeURL }} + {{ $original := printf "%s/%s" $permalink $filename }} + <img class="u-photo" hidden="" src={{ $original }} alt="Illustration of {{ $title }}" /> + {{ end }} <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> diff --git a/layouts/partials/post/summary.html b/layouts/partials/post/summary.html @@ -1,7 +1,14 @@ <article class="summary h-entry"> - <a href="{{ .Permalink }}" class="u-url"> + {{ $permalink := .Permalink }} + {{ $title := .Title }} + {{ with .Params.Image.Src }} + {{ $filename := . | safeURL }} + {{ $original := printf "%s/%s" $permalink $filename }} + <img class="u-photo" hidden="" src={{ $original }} alt="Illustration of {{ $title }}" /> + {{ end }} + <a href="{{ $permalink }}" class="u-url"> <h2 class="summary__title p-name"> - {{ .Title }} + {{ $title }} </h2> </a> <time title="{{ .Date.Format "Monday, 02 January 2006 on 15:04:05" }} GMT+7"> @@ -24,10 +31,12 @@ {{ $hell := .Type }} {{ if .Params.Description }} <p> {{ .Params.Description }} </p> - <a href="{{ .Permalink }}"> + <a href="{{ $permalink }}"> <p>Read More ยป</p> </a> {{ else }} - {{ partial "components/summary-seo.html" .Content }} + <div class="summary__content"> + {{ partial "components/summary-seo.html" .Content }} + </div> {{ end }} </article>