diff --git a/CHANGELOG.md b/CHANGELOG.md index e68b16b401fc01ebf45b5f0a7a1795b81b3f1881..c30240dcea02413eb78df807942b2a8bc315d330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog -## 2.1.1 +## 2.2.0 + +* When a post has an `image_header` parameter this image is set as an attachment + to ActivityPub posts +* Fixed some poor CSS rendering for quote-box. +* The `figure` shortcode will now make images clickable to see the full size. +* The tags page now renders categories as the the title instead of the slug + name. +* Added additional argument to `example` shortcode to turn off the copy button. ## 2.1.0 diff --git a/api/nodeinfo/2.1.ts b/api/nodeinfo/2.1.ts index bc3411afdd52b1d8f1530ff15f2fd37c97e28cf4..94f1f747224cc0b1bd9ade1b1eb135617903df9b 100644 --- a/api/nodeinfo/2.1.ts +++ b/api/nodeinfo/2.1.ts @@ -9,7 +9,7 @@ export default function (req: VercelRequest, res: VercelResponse) { "name": "Fedipage", "repository": "https://git.qoto.org/fedipage/fedipage", "homepage": "https://fedipage.com/", - "version": "2.1.1" + "version": "2.2.0" }, "protocols": [ "activitypub" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 940c7f4ef1dcda9a242773077649dd2e37c458ce..3b090f4d6854e7d18d7f24896d9687bd6c87fac5 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -31,8 +31,8 @@ <meta property="twitter:card" content="summary_large_image"> {{if .Params.image_header}} - <meta property="twitter:image" content="{{.Params.image_header}}"> - <meta property="og:image" content="{{.Params.image_header}}"> + <meta property="twitter:image" content="/{{.Params.image_header}}"> + <meta property="og:image" content="/{{.Params.image_header}}"> {{ else if .IsHome }} <meta property="twitter:image" content="/images/logo.png"> <meta property="og:image" content="/images/logo.png"> diff --git a/layouts/partials/side_menu_taxonomy.html b/layouts/partials/side_menu_taxonomy.html index eca6fb4ceeec5b43a1f5f9ea36e23c657e75a106..7a462bfdf54d75dc552e7af0130d86ee3a578d40 100644 --- a/layouts/partials/side_menu_taxonomy.html +++ b/layouts/partials/side_menu_taxonomy.html @@ -4,7 +4,7 @@ {{ $hereLink := .Permalink }} {{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }} {{ with $.Site.GetPage (printf "/tags/%s" $name) }} - <a href="{{ .RelPermalink }}" class='menu-item tag{{ if (eq .Permalink $hereLink) }} selected{{ end }}' data-slug='{{$name}}' title="All pages with tag <i>{{$name}}</i>">{{$name}} ({{$cnt}})</a> + <a href="{{ .RelPermalink }}" class='menu-item tag{{ if (eq .Permalink $hereLink) }} selected{{ end }}' data-slug='{{ .LinkTitle }}' title="All pages with tag <i>{{.LinkTitle}}</i>">{{.LinkTitle}} ({{$cnt}})</a> {{end}} {{end}} </nav> diff --git a/layouts/partials/status.ajson b/layouts/partials/status.ajson index 1db70700df2737a646bb331431700c4be4050b9a..b6ffc143f640b368ae34831967cedc14f648577e 100644 --- a/layouts/partials/status.ajson +++ b/layouts/partials/status.ajson @@ -20,8 +20,9 @@ "atomUri": "{{ .Permalink }}", "inReplyToAtomUri": null, "content": {{ printf "\"" | safeHTML }}<b>{{.Title}}</b>{{ if .Summary }}<br>{{ $summaryClean | safeHTML}}{{ end }}<br><br>Read more here:<br><a href='{{.Permalink}}'>{{.Permalink}}</a><br><br>{{ if .Site.Params.renderArticleHashtags }}{{ if .Params.tags }}{{ range $indexArticleTags, $elementArticleTag := .Params.tags }}{{ if ne $indexArticleTags 0 }} {{ end }}<a href='{{ site.BaseURL }}tags/{{ $elementArticleTag | lower }}' class='mention hashtag' rel='tag'>#<span>{{ $elementArticleTag }}</span></a>{{ end }}{{ end }}{{ end }} {{ if .Site.Params.renderDefaultHashtags }}{{ if .Site.Params.postHashtags }}{{ range $indexTags, $elementTag := .Site.Params.postHashtags }}{{ if ne $indexTags 0 }} {{ end }}<a href='#' class='mention hashtag' rel='tag'>#<span>{{ $elementTag }}</span></a>{{ end }}{{ end }}{{ end }}{{ printf "\"" | safeHTML }}, - "attachment": [], + "attachment": [] {{ if (or (and .Site.Params.postHashtags .Site.Params.renderDefaultHashtags) (and .Params.tags .Site.Params.renderArticleHashtags)) }} + , "tag": [ {{- if (and .Site.Params.postHashtags .Site.Params.renderDefaultHashtags) }} {{- range $indexTags, $elementTag := .Site.Params.postHashtags }} @@ -46,4 +47,17 @@ {{- end }} ] {{- end }} + {{ if .Params.image_header }} + , + "attachment": [ + { + "type": "Document", + "mediaType": "image/jpeg", + "url": "{{ .Site.BaseURL }}{{ .Params.image_header }}", + "name": null, + "blurhash": null + } + ] + {{ end }} + } diff --git a/layouts/shortcodes/example.html b/layouts/shortcodes/example.html index 6a542e476824fb27580e6c3670a44285f6d07cfc..1f34155ddfec98c2f14f99da72aee5bafc47c78b 100644 --- a/layouts/shortcodes/example.html +++ b/layouts/shortcodes/example.html @@ -3,7 +3,7 @@ <div class="scrollbar-container"> <div class="codeBlockWrapper_2QGZ"> {{ .Inner }} - <button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button> + {{ if .Get 1 }}<button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button>{{ end }} </div> </div> </div> diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index eeb792d0f44c23082d0201e63bcce005f5017571..6a2cd5c579c62fbe457315cbd13392ca44a4bf4e 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -1,4 +1,5 @@ <figure> + {{- if .Get "src" }}<a href="{{ .Get "src" }}">{{ end }} <img {{ with .Get "src" }}src="{{ . }}"{{ end }} {{ with .Get "alt" }}alt="{{ range (split . " ") }}{{ . }} {{ end }}"{{ end }} @@ -9,5 +10,6 @@ {{ with .Get "width" }}width="{{ . }}"{{ end }} {{ with .Get "height" }}height="{{ . }}"{{ end }} {{ with .Get "layout" }}layout="{{ . }}"{{ end }} /> + {{- if .Get "src" }}</a>{{ end }} {{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }} - </figure> \ No newline at end of file +</figure> diff --git a/layouts/shortcodes/quote-box.html b/layouts/shortcodes/quote-box.html index 178400cfafe6cf6eba3cae5e50342c381cf9e699..3a6739e7b4993d1e96b47685c916eb01f873ca8d 100644 --- a/layouts/shortcodes/quote-box.html +++ b/layouts/shortcodes/quote-box.html @@ -2,5 +2,5 @@ <blockquote> {{ .Inner }} </blockquote> - <cite>{{ .Get "source" }}</cite> + {{ if .Get "source" }}<cite>{{ .Get "source" }}</cite>{{ end }} </div> diff --git a/static/css/main.css b/static/css/main.css index 35f2a14982d4351ed531bf5a23d40f34abf076a4..61351ce4a5c02dfcf88be225aea361d0732e0df1 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -603,6 +603,11 @@ p { overflow: auto; } +section { + margin-top: 3em; + margin-bottom: 3em; +} + @-webkit-keyframes nprogress-spinner{ 0%{ -webkit-transform:rotate(0) @@ -2267,7 +2272,7 @@ div#ch-tooltip { .quote-box > blockquote:after { content: 'â€'; - right: -5rem; + right: 0; bottom: 1rem; }