updates for new version of hugo
This commit is contained in:
parent
7069191b84
commit
dbe39c9cce
3 changed files with 161 additions and 150 deletions
|
|
@ -6,10 +6,11 @@ theme = "minimage"
|
||||||
disqusShortname = ""
|
disqusShortname = ""
|
||||||
# Enable Google Analytics by entering your tracking code
|
# Enable Google Analytics by entering your tracking code
|
||||||
googleAnalytics = ""
|
googleAnalytics = ""
|
||||||
paginate = 5
|
|
||||||
Copyright = "All rights reserved - 2006-"
|
Copyright = "All rights reserved - 2006-"
|
||||||
preserveTaxonomyNames = true
|
preserveTaxonomyNames = true
|
||||||
#canonifyurls = true
|
#canonifyurls = true
|
||||||
|
[paginationp]
|
||||||
|
pagerSize = 5
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
category = "categories"
|
category = "categories"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Focus_Keyword: "close"
|
||||||
# Technology
|
# Technology
|
||||||
|
|
||||||
Since all the changes on [Twitter](https://twitter.com/duckunix), I am now active on [Fosstodon](https://fosstodom/@duckunix), which is a [Mastodon](https://joinmastodon.org/). I joined back in 2018, but I just started using it more. My #introduction toot:
|
Since all the changes on [Twitter](https://twitter.com/duckunix), I am now active on [Fosstodon](https://fosstodom/@duckunix), which is a [Mastodon](https://joinmastodon.org/). I joined back in 2018, but I just started using it more. My #introduction toot:
|
||||||
{{<smoot "fosstodon.org" "100578860152016241">}}
|
{{<smoot instance="fosstodon.org" id="100578860152016241">}}
|
||||||
|
|
||||||
On the home network front, I finally retired the big server as the drivers were failing. I decided to move the containers running there to my old desktop which was not doing anything. Some new disks, and life is better there.
|
On the home network front, I finally retired the big server as the drivers were failing. I decided to move the containers running there to my old desktop which was not doing anything. Some new disks, and life is better there.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,51 @@
|
||||||
{{ $masIns := .Get 0 }}
|
{{ $masIns := .Get "instance" }}
|
||||||
|
{{ $id := .Get "id" }}
|
||||||
{{ $tootLink := "" }}
|
{{ $tootLink := "" }}
|
||||||
{{ $card := "" }}
|
{{ $card := "" }}
|
||||||
{{ $handleInst := "" }}
|
{{ $handleInst := "" }}
|
||||||
{{ $mediaMD5 := "" }}
|
{{ $mediaMD5 := "" }}
|
||||||
{{ $imageCount := 0 }}
|
{{ $imageCount := 0 }}
|
||||||
{{ $votesCount := 0 }}
|
{{ $votesCount := 0 }}
|
||||||
{{ $id := .Get 1 }}
|
|
||||||
{{ $urlToGet := print "https://" $masIns "/api/v1/statuses/" $id }}
|
{{ $urlToGet := print "https://" $masIns "/api/v1/statuses/" $id }}
|
||||||
{{ $json := getJSON $urlToGet }}
|
|
||||||
{{ $jsonHolder := $json }}{{/* Being safe */}}
|
|
||||||
|
|
||||||
{{ if isset $json "account" }}
|
{{- with resources.GetRemote $urlToGet -}}
|
||||||
|
{{ if (resources.GetRemote $urlToGet).Err }}
|
||||||
|
<blockquote class="toot-blockquote">
|
||||||
|
<p class="ctr legal">[Source not online<br />
|
||||||
|
at time of site build.]</p>
|
||||||
|
</blockquote>
|
||||||
|
{{ else }}
|
||||||
|
{{ $json := unmarshal .Content }}
|
||||||
|
{{ $jsonHolder := $json }}{{/* Being safe */}}
|
||||||
|
|
||||||
|
{{ if isset $json "account" }}
|
||||||
{{ $tootLink = print "https://" $masIns "@" $json.account.acct "/status/" $id }}
|
{{ $tootLink = print "https://" $masIns "@" $json.account.acct "/status/" $id }}
|
||||||
{{ $handleInst = print "@" $json.account.acct "@" $masIns }}
|
{{ $handleInst = print "@" $json.account.acct "@" $masIns }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if isset $json "content" }}
|
{{ if isset $json "content" }}
|
||||||
<blockquote class="tweet-card" cite="{{ $tootLink }}">
|
<blockquote class="toot-blockquote" cite="{{ $tootLink }}">
|
||||||
<div class="tweet-header">
|
<div class="toot-header">
|
||||||
<a class="tweet-profile twitterExt" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">
|
<a class="toot-profile" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">
|
||||||
<img
|
<img
|
||||||
src="{{ $json.account.avatar }}"
|
src="{{ $json.account.avatar }}"
|
||||||
alt="Mastodon avatar for {{ $handleInst }}"
|
alt="Mastodon avatar for {{ $handleInst }}"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div class="tweet-author">
|
<div class="toot-author">
|
||||||
<a class="tweet-author-name twitterExt" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">{{ $json.account.display_name }}</a>
|
<a class="toot-author-name" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">{{ $json.account.display_name }}</a>
|
||||||
<a class="tweet-author-handle twitterExt" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">{{ $handleInst }}</a>
|
<a class="toot-author-handle" href="https://{{ $masIns }}/@{{ $json.account.acct }}" rel="noopener">{{ $handleInst }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="tweet-body">
|
|
||||||
{{ $json.content | safeHTML }}
|
{{ $json.content | safeHTML }}
|
||||||
</p>
|
|
||||||
{{ with $json.media_attachments }}
|
{{ with $json.media_attachments }}
|
||||||
{{ range $media_attachments := . }}
|
{{ range $media_attachments := . }}
|
||||||
{{ if eq $media_attachments.type "image" }}
|
{{ if eq $media_attachments.type "image" }}
|
||||||
{{ $imageCount = (add ($imageCount) 1) }}
|
{{ $imageCount = (add ($imageCount) 1) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="tweet-img-grid-{{ $imageCount }}">
|
<div class="toot-img-grid-{{ $imageCount }}">
|
||||||
{{ range $media_attachments := . }}
|
{{ range $media_attachments := . }}
|
||||||
{{ if eq $media_attachments.type "image" }}
|
{{ if eq $media_attachments.type "image" }}
|
||||||
{{ $mediaMD5 = md5 $media_attachments.url }}
|
{{ $mediaMD5 = md5 $media_attachments.url }}
|
||||||
|
|
@ -51,9 +57,9 @@
|
||||||
<img
|
<img
|
||||||
src="{{ $media_attachments.url }}"
|
src="{{ $media_attachments.url }}"
|
||||||
alt="Image {{ $media_attachments.id }} from toot {{ $id }} on {{ $masIns }}"
|
alt="Image {{ $media_attachments.id }} from toot {{ $id }} on {{ $masIns }}"
|
||||||
class="tweet-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} tweet-sens-blur{{ end }}"
|
class="toot-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} toot-sens-blur{{ end }}"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
{{- if $json.sensitive }}onclick="this.classList.toggle('tweet-sens-blur-no')"{{- end }}
|
{{- if $json.sensitive }}onclick="this.classList.toggle('toot-sens-blur-no')"{{- end }}
|
||||||
/>
|
/>
|
||||||
{{- if $json.sensitive -}}
|
{{- if $json.sensitive -}}
|
||||||
<div class="blur-text">
|
<div class="blur-text">
|
||||||
|
|
@ -81,8 +87,8 @@
|
||||||
aspect-ratio: {{ $media_attachments.meta.original.width }} / {{ $media_attachments.meta.original.height }};
|
aspect-ratio: {{ $media_attachments.meta.original.width }} / {{ $media_attachments.meta.original.height }};
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="ctr tweet-video-wrapper">
|
<div class="ctr toot-video-wrapper">
|
||||||
<video muted playsinline controls class="ctr tweet-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} tweet-sens-blur{{ end }}"{{- if $json.sensitive }}onclick="this.classList.toggle('tweet-sens-blur-no')"{{- end }}>
|
<video muted playsinline controls class="ctr toot-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} toot-sens-blur{{ end }}"{{- if $json.sensitive }}onclick="this.classList.toggle('toot-sens-blur-no')"{{- end }}>
|
||||||
<source src="{{ $media_attachments.url }}">
|
<source src="{{ $media_attachments.url }}">
|
||||||
<p class="legal ctr">(Your browser doesn’t support the <code>video</code> tag.)</p>
|
<p class="legal ctr">(Your browser doesn’t support the <code>video</code> tag.)</p>
|
||||||
</video>
|
</video>
|
||||||
|
|
@ -101,8 +107,8 @@
|
||||||
aspect-ratio: {{ $media_attachments.meta.original.width }} / {{ $media_attachments.meta.original.height }};
|
aspect-ratio: {{ $media_attachments.meta.original.width }} / {{ $media_attachments.meta.original.height }};
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="ctr tweet-video-wrapper">
|
<div class="ctr toot-video-wrapper">
|
||||||
<video loop autoplay muted playsinline controls controlslist="nofullscreen" class="ctr tweet-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} tweet-sens-blur{{ end }}" {{- if $json.sensitive }}onclick="this.classList.toggle('tweet-sens-blur-no')"{{- end }}>
|
<video loop autoplay muted playsinline controls controlslist="nofullscreen" class="ctr toot-media-img img-{{ $mediaMD5 }}{{ if $json.sensitive }} toot-sens-blur{{ end }}" {{- if $json.sensitive }}onclick="this.classList.toggle('toot-sens-blur-no')"{{- end }}>
|
||||||
<source src="{{ $media_attachments.url }}">
|
<source src="{{ $media_attachments.url }}">
|
||||||
<p class="legal ctr">(Your browser doesn’t support the <code>video</code> tag.)</p>
|
<p class="legal ctr">(Your browser doesn’t support the <code>video</code> tag.)</p>
|
||||||
</video>
|
</video>
|
||||||
|
|
@ -120,12 +126,14 @@
|
||||||
{{- $cardData := . -}}
|
{{- $cardData := . -}}
|
||||||
{{- with $cardData.image -}}
|
{{- with $cardData.image -}}
|
||||||
<a href="{{ $cardData.url }}" rel="'noopener">
|
<a href="{{ $cardData.url }}" rel="'noopener">
|
||||||
<div class="card">
|
<div class="toot-card">
|
||||||
<img src="{{ $cardData.image }}" alt="Card image from {{ $masIns }} toot {{ $id }}" loading="lazy" class="tweet-card-img" />
|
<div class="toot-card-image">
|
||||||
<p>
|
<img src="{{ $cardData.image }}" alt="Card image from {{ $masIns }} toot {{ $id }}" loading="lazy" class="toot-card-image-image" />
|
||||||
<span class="card-title">{{ $cardData.title }}</span><br />
|
</div>
|
||||||
{{ $cardData.description }}
|
<div class="toot-card-content">
|
||||||
</p>
|
<p class="card-title">{{ $cardData.title }}</p>
|
||||||
|
<p class="card-description">{{ $cardData.description }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
@ -136,22 +144,24 @@
|
||||||
{{ range $pollOptions := . }}
|
{{ range $pollOptions := . }}
|
||||||
{{ $votesCount = add $votesCount $pollOptions.votes_count }}
|
{{ $votesCount = add $votesCount $pollOptions.votes_count }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="tweet-poll-wrapper">
|
<div class="toot-poll-wrapper">
|
||||||
{{ range $pollOptions := . }}
|
{{ range $pollOptions := . }}
|
||||||
<div class="tweet-poll-count">
|
<div class="toot-poll-count">
|
||||||
<strong>{{ (mul 100 (div $pollOptions.votes_count $votesCount)) | lang.FormatPercent 1 }}</strong>
|
<strong>{{ (mul 100 (div $pollOptions.votes_count $votesCount)) | lang.FormatPercent 1 }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="tweet-poll-meter">
|
<div class="toot-poll-meter">
|
||||||
<meter id="vote-count" max="{{ $votesCount }}" value="{{ $pollOptions.votes_count }}"></meter>
|
<meter id="vote-count" max="{{ $votesCount }}" value="{{ $pollOptions.votes_count }}"></meter>
|
||||||
</div>
|
</div>
|
||||||
<div class="tweet-poll-title">{{ $pollOptions.title }}</div>
|
<div class="toot-poll-title">{{ $pollOptions.title }}</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<p class="legal">{{ $votesCount }} votes</p>
|
<p class="legal toot-poll-total">{{ $votesCount }} people</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="tweet-footer">
|
<div class="toot-footer">
|
||||||
<a href="https://{{ $masIns }}/@{{ $json.account.acct }}/{{ $json.id }}" class="tweet-date twitterExt" rel="noopener">{{ dateFormat "3:04 PM • January 2, 2006" $json.created_at }}</a> <span class="legal">(UTC)</span>
|
<a href="https://{{ $masIns }}/@{{ $json.account.acct }}/{{ $json.id }}" class="toot-date" rel="noopener">{{ dateFormat "3:04 PM • January 2, 2006" $json.created_at }}</a> <span class="pokey">(UTC)</span>
|
||||||
</div>
|
</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue