commit cfc17d4827f06c75c907998124ca66af0093cd75 parent 028180438b874406e563ea811c9a2a13bd7ec8e0 Author: Yohanes Bandung Bondowoso <hi@ybbond.dev> Date: Fri, 19 Jun 2020 23:23:18 +0700 content: add responses section Diffstat:
| M | assets/content.scss | | | 51 | +++++++++++++++++++++++++++++++++++++++------------ |
| M | assets/styles.scss | | | 3 | +++ |
| M | content/contact.md | | | 9 | +++++---- |
| A | content/responses/_index.md | | | 6 | ++++++ |
| A | content/responses/response-20200619212819.md | | | 21 | +++++++++++++++++++++ |
| M | layouts/_default/list.html | | | 6 | +++++- |
| M | layouts/_default/single.html | | | 7 | ++++++- |
| M | layouts/partials/post/notes-item.html | | | 4 | ++-- |
| A | layouts/partials/post/responses-item.html | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
| A | layouts/responses/rss.xml | | | 43 | +++++++++++++++++++++++++++++++++++++++++++ |
10 files changed, 172 insertions(+), 20 deletions(-)
diff --git a/assets/content.scss b/assets/content.scss @@ -5,10 +5,14 @@ @return map-get($theme-map, $key); } -.content, .notes { +.content { font-family: $font-text; width: 100%; + &__hr { + margin: 4em 0 0; + } + .headline-hash { padding: 0 0.2em; @media(min-width: 600px) { @@ -134,14 +138,14 @@ } .notes { - margin-bottom: 2em; + margin-bottom: 2rem; & > div, & > p { margin: 0; - margin-top: 0.7em; + margin-top: 0.7rem; & > p { margin: 0; - margin-top: 0.7em; + margin-top: 0.7rem; } } @@ -159,6 +163,18 @@ } } + &:target { + outline: solid 0.2em; + outline-offset: 0.6em; + @include themify($themes) { + outline-color: themed('color-background-hover'); + } + @media (max-width: 599px) { + outline: solid 0.3em; + outline-offset: 0.5em; + } + } + @media (max-width: 599px) { &__title { margin: 10px 0 0; @@ -169,24 +185,35 @@ flex-direction: column; } } +} + +.responses { + margin-bottom: 3rem; + + h1 { + margin-bottom: 0; + } + + &__subtitle { + margin: 0; + a { + font-family: $font-mono; + } + } &:target { - outline: solid 0.2em; - outline-offset: 0.6em; + outline: solid 0.2rem; + outline-offset: 1.3rem; @include themify($themes) { outline-color: themed('color-background-hover'); } @media (max-width: 599px) { - outline: solid 0.3em; - outline-offset: 0.5em; + outline: solid 0.3rem; + outline-offset: 1.2rem 0.8rem; } } } -.content__hr { - margin: 4em 0 0; -} - .image-figure { margin-top: 1.5rem; margin-bottom: 1.5rem; diff --git a/assets/styles.scss b/assets/styles.scss @@ -59,6 +59,9 @@ hr { @include themify($themes) { border-top: 1px solid themed('color-text'); } + &.list__subtitle { + margin-bottom: 2rem; + } } code { diff --git a/content/contact.md b/content/contact.md @@ -4,13 +4,15 @@ menu: contact description: Ways to get in touch with me --- -You can through any of my social medias on my [keybase](https://keybase.io/ybbond) or listed in the footer down below. +You can contact me through any of my social medias on my [keybase](https://keybase.io/ybbond) or listed in the footer down below ↓. I check my email on hi@ybbond.dev regularly, and set custom notification sound for it. -If you prefer encrypted communication, you can get my PGP key in [txt format](/ybbond-public.txt) or [asc format](/ybbond-public.asc). The fingerprint is: +If you prefer encrypted email, you can get my PGP key in [txt format](/ybbond-public.txt) or [asc format](/ybbond-public.asc). The fingerprint is: ```html 56DA ADB1 5246 1C80 6792 DBAB 8477 3B93 9886 81A0 ``` -If you'd rather XMPP than other alternatives, please chat [ybbond@404.city](xmpp:ybbond@404.city).- \ No newline at end of file +If you'd rather use encrypted chat than encrypted email: +- XMPP [ybbond@tchncs.de](xmpp:ybbond@tchncs.de) +- Matrix **@ybbond:tchncs.de** diff --git a/content/responses/_index.md b/content/responses/_index.md @@ -0,0 +1,6 @@ +--- +title: My Responses to... +--- + +Listed are my responses for posts made by others. +Synced with this [RSS](/responses/index.xml). diff --git a/content/responses/response-20200619212819.md b/content/responses/response-20200619212819.md @@ -0,0 +1,20 @@ +--- +tags: + - responses #responses +date: 2020-06-19T21:28:19+0700 +ID: 20200619212819 +type: responses +destination: + title: About Password + author: Ali Reza Hayati + url: https://alirezahayati.com/2020/06/about-passwords/ +--- + +Nice article! + +Ever since Tokopedia's user credentials got acquired by actor, I use password manager[^1], store a bit longer password than I usually use, and make them all different with a formatting that is different by many factors. I also use 2FA app[^2] if possible. + +The next step I use is quitting Google step-by-step. First mail provider, then I try to find other alternatives + +[^1]: Bitwarden +[^2]: Authy+ \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -25,13 +25,17 @@ {{ end }} {{ with .Content }}<div>{{ . }}</div>{{ end }} </div> - <hr> + <hr class="list__subtitle"> {{ end }} {{ if eq .Type "notes" }} {{ range (where .Site.RegularPages "Type" "notes") }} {{ partial "post/notes-item.html" . }} {{ end }} + {{ else if eq .Type "responses" }} + {{ range (where .Site.RegularPages "Type" "responses") }} + {{ partial "post/responses-item.html" . }} + {{ end }} {{ else }} {{ range .Paginator.Pages }} {{ partial "post/summary.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -4,6 +4,11 @@ {{- partial "post/notes-item.html" . -}} {{ partial "post/webmentions-handler.html" . }} </article> + {{ else if eq .Type "responses" }} + <article> + {{- partial "post/responses-item.html" . -}} + {{ partial "post/webmentions-handler.html" . }} + </article> {{ else }} <article class="content h-entry"> <h1 class="p-name">{{ .Title }}</h1> @@ -19,7 +24,7 @@ {{ end }} {{ end }} </div> - <div class="e-content"> + <div class="p-content e-content"> {{ partial "components/content.html" .Content }} </div> diff --git a/layouts/partials/post/notes-item.html b/layouts/partials/post/notes-item.html @@ -1,6 +1,6 @@ {{ $dateformat := .Date.Format "2006-01-02 15:04" }} {{ $idslug := (print "date-" $dateformat "-") | urlize }} -<div class="notes h-entry" id={{ $idslug }}> +<div class="content notes h-entry" id={{ $idslug }}> <div id="h-card" class="hcard" hidden=""> {{ $permalink := .Permalink }} {{ $title := .Title }} @@ -30,7 +30,7 @@ {{ end }} </span> </p> - <div class="notes__content e-content p-name"> + <div class="notes__content e-content p-content p-name"> {{ .Content }} </div> </div> \ No newline at end of file diff --git a/layouts/partials/post/responses-item.html b/layouts/partials/post/responses-item.html @@ -0,0 +1,41 @@ +{{ $dateformat := .Date.Format "2006-01-02 15:04" }} +{{ $idslug := (print "date-" $dateformat "-") | urlize }} +{{ $author := ""}} +{{ if isset .Params.Destination "author" }} + {{ $author = print " by «" .Params.Destination.Author "»" }} +{{ end }} +{{ $title := print "In response to " "«" .Params.Destination.Title "»" $author }} +<div class="content responses h-entry" id={{ $idslug }}> + <h1 class="p-name">{{ $title }}</h1> + <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> + <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> + <a class="p-category" href={{ "responses/" | absURL }}>responses</a> + </div> + <p class="responses__subtitle"> + <time title="{{ .Date.Format "Monday, 02 January 2006 on 15:04:05" }} GMT+7" class="responses__subtitle__date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05" }}+07:00"> + {{ .Date.Format "02 Jan 2006" }} + </time> + {{ if .Title }} + {{ else }} + <a data-goatcounter-click="cl-response-hash" class="u-url" href="/responses/#{{ $idslug }}">#</a> <a data-goatcounter-click="cl-response-full" href={{ .Permalink }}>»</a> + {{ end }} + </p> + <p class="responses__original"><a class="u-in-reply-to" href={{ .Params.Destination.Url }}>»Link to responded post«</a></p> + <div class="responses__content e-content p-content"> + {{ partial "components/content.html" .Content }} + </div> +</div>+ \ No newline at end of file diff --git a/layouts/responses/rss.xml b/layouts/responses/rss.xml @@ -0,0 +1,43 @@ +{{- $pctx := . -}} +{{- if .IsHome -}} + {{ $pctx = .Site }} +{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} + {{- $pages = $pctx.RegularPages -}} +{{- else -}} + {{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} + {{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>YBBond's Responses</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + {{ $dateformat := .Date.Format "2006-01-02 15:04" }} + {{ $idslug := (print "date-" $dateformat "-") | urlize }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Site.BaseURL }}responses#{{ $idslug }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid isPermaLink="true">{{ .Site.BaseURL }}responses#{{ $idslug }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss>