diff --git a/content/blog/future-of-silica-viewer/index.md b/content/blog/future-of-silica-viewer/index.md new file mode 100644 index 0000000..f144d4e --- /dev/null +++ b/content/blog/future-of-silica-viewer/index.md @@ -0,0 +1,16 @@ +--- +title: "Future of Silica Viewer" +date: 2023-03-27 +draft: false +summary: "Silica Viewer is leaving the App Store." +--- + +I will not be renewing my Apple Developer License for various reasons [I've already discussed elsewhere]({{}}). It is due to expire sometime in the summer, so there's still a couple of months before it disappears off the App Store. I'm actually _losing_ money by selling my software on the App Store, and I don't really work on a Mac anymore. Plus more fun problems related to Apple infrastructure: + +{{< stoot "mastodon.art" "109916077868745391" >}} + +If you already bought Silica Viewer, nothing will change - you can continue to redownload it into perpetuity. This just means you can't pay money for it now, although I wouldn't want you to because I don't keep up with active development. As always, Silica Viewer is open source and free to use still. + +![Screenshot of Silicate](macos.png) + +For people looking for alternative software, check out [Silicate](https://github.com/Avarel/silicate) by [Avarel](http://antran.io/). It works on more platforms than Silica Viewer, and has a better rendering engine, along with other cool features! Thank you all who have supported by using my software, as always :) diff --git a/content/blog/future-of-silica-viewer/macos.png b/content/blog/future-of-silica-viewer/macos.png new file mode 100644 index 0000000..8a3f04c Binary files /dev/null and b/content/blog/future-of-silica-viewer/macos.png differ diff --git a/themes/red/assets/css/site.css b/themes/red/assets/css/site.css index ef7e82a..ff7e96f 100644 --- a/themes/red/assets/css/site.css +++ b/themes/red/assets/css/site.css @@ -346,6 +346,40 @@ pre { margin-right: 0; } +.toot-header .toot-profile img { + border-radius: 9999px; + width: 48px; + height: auto; +} + +.toot-blockquote { + line-height: 1.35em; + margin: 1.5rem auto; + padding: 1rem; + border: 2px solid gray; + border-radius: 12px; +} + +.toot-header .toot-author { + display: flex; + flex-direction: column; + flex-grow: 1; + + margin-left: 10px; + margin-top: 3px; +} + +.toot-header .toot-author .toot-author-name { + font-weight: 700; +} + +.toot-header .toot-author .toot-author-handle { + line-height: 1; +} + +.toot-header { + display: flex; +} .nice-list li:not(:last-child):not(:only-child)::after { content: "·"; diff --git a/themes/red/layouts/shortcodes/stoot.html b/themes/red/layouts/shortcodes/stoot.html new file mode 100644 index 0000000..144597e --- /dev/null +++ b/themes/red/layouts/shortcodes/stoot.html @@ -0,0 +1,168 @@ + +{{ $masIns := .Get 0 }} +{{ $tootLink := "" }} +{{ $card := "" }} +{{ $handleInst := "" }} +{{ $mediaMD5 := "" }} +{{ $imageCount := 0 }} +{{ $votesCount := 0 }} +{{ $id := .Get 1 }} +{{ $urlToGet := print "https://" $masIns "/api/v1/statuses/" $id }} + +{{- with resources.GetRemote $urlToGet -}} + {{ if (resources.GetRemote $urlToGet).Err }} +
+ +
+ {{ else }} + {{ $json := unmarshal .Content }} + {{ $jsonHolder := $json }}{{/* Being safe */}} + + {{ if isset $json "account" }} + {{ $tootLink = print "https://" $masIns "@" $json.account.acct "/status/" $id }} + {{ $handleInst = print "@" $json.account.acct "@" $masIns }} + {{ end }} + + {{ if isset $json "content" }} +
+
+ + Mastodon avatar for {{ $handleInst }} + +
+ {{ $json.account.display_name }} + {{ $handleInst }} +
+
+ {{ $json.content | safeHTML }} + {{ with $json.media_attachments }} + {{ range $media_attachments := . }} + {{ if eq $media_attachments.type "image" }} + {{ $imageCount = (add ($imageCount) 1) }} + {{ end }} + {{ end }} +
+ {{ range $media_attachments := . }} + {{ if eq $media_attachments.type "image" }} + {{ $mediaMD5 = md5 $media_attachments.url }} + + Image {{ $media_attachments.id }} from toot {{ $id }} on {{ $masIns }} + {{- if $json.sensitive -}} +
+ Sensitive content
+ (flagged at origin) +
+ {{- end -}} + {{ end }} + {{ end }} +
+ {{/* + N.B.: + The above results in an empty, no-height div + when there's no image but there **is** + at least one item in `$media_attachments`. + Unfortunately, it seems to be the only way + to accomplish this. Not a good HTML practice, + but gets the job done. + */}} + {{ range $media_attachments := . }} + {{ if eq $media_attachments.type "video" }} + {{ $mediaMD5 = md5 $media_attachments.url }} + +
+ + {{- if $json.sensitive -}} +
+ Sensitive content
+ (flagged at origin) +
+ {{- end -}} +
+ {{ end }} + {{ if eq $media_attachments.type "gifv" }} + {{ $mediaMD5 = md5 $media_attachments.url }} + +
+ + {{- if $json.sensitive -}} +
+ Sensitive content
+ (flagged at origin) +
+ {{- end -}} +
+ {{ end }} + {{ end }} + {{ end }} + {{ with $json.card }} + {{- $cardData := . -}} + {{- with $cardData.image -}} + +
+
+ Card image from {{ $masIns }} toot {{ $id }} +
+
+

{{ $cardData.title }}

+

{{ $cardData.description }}

+
+
+
+ {{- end -}} + {{ end }} + {{ with $json.poll }} + {{ $poll := . }} + {{ with $poll.options }} + {{ range $pollOptions := . }} + {{ $votesCount = add $votesCount $pollOptions.votes_count }} + {{ end }} +
+ {{ range $pollOptions := . }} +
+ {{ (mul 100 (div $pollOptions.votes_count $votesCount)) | lang.FormatPercent 1 }} +
+
+ +
+
{{ $pollOptions.title }}
+ {{ end }} +
+ + {{ end }} + {{ end }} + +
+ {{ end }} + {{ end }} +{{- end -}}