diff --git a/_config.yml b/_config.yml index 8a9f495..b0ab3fe 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,11 @@ issuesurl: "https://codeberg.org/daudix-UFO/blog-source/issues" # issue tracker permalink: /:title/ primary-color: "#c061cb" #used in ios theme. further color customization in style.css +comments: + host: mstdn.social + + username: Daudix + # Build settings markdown: kramdown diff --git a/_includes/comments.html b/_includes/comments.html new file mode 100644 index 0000000..3ba72fc --- /dev/null +++ b/_includes/comments.html @@ -0,0 +1,410 @@ + + + + +{% if include.host %} + {% assign host = include.host %} +{% elsif page.comments.host %} + {% assign host = page.comments.host %} +{% else %} + {% assign host = site.comments.host %} +{% endif %} + +{% if include.domain %} + {% assign domain = include.domain %} +{% elsif page.comments.domain %} + {% assign domain = page.comments.domain %} +{% elsif site.comments.domain %} + {% assign domain = site.comments.domain %} +{% else %} + {% assign domain = host %} +{% endif %} + +{% if include.username %} + {% assign username = include.username %} +{% elsif page.comments.username %} + {% assign username = page.comments.username %} +{% else %} + {% assign username = site.comments.username %} +{% endif %} + +{% if include.token %} + {% assign token = include.token %} +{% elsif page.comments.token %} + {% assign token = page.comments.token %} +{% else %} + {% assign token = site.comments.token %} +{% endif %} + +{% if include.id %} + {% assign id = include.id %} +{% else %} + {% assign id = page.comments.id %} +{% endif %} + +{% if site.comments.verified %} + {% assign verified = site.comments.verified | jsonify %} +{% else %} + {% assign verified = "[]" %} +{% endif %} + +
+

Comments

+

Comment on this blog post by publicly replying to this Mastodon post using a Mastodon or other ActivityPub/​Fediverse account. Known non-private replies are displayed below.

+ +
+

No known comments, yet. Reply to this Mastodon post to add your own!

+ +
+ + +
diff --git a/_layouts/post.html b/_layouts/post.html index 910fb34..0099654 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,9 +1,20 @@ --- layout: default --- +

{{ page.title }}

Table of Contents

{{ content | toc }} + +
+ +{%- if page.comments -%} + {%- if page.comments.id -%} + {%- include comments.html -%} +
+ {%- endif -%} +{%- endif -%} +

Go Home File an issue diff --git a/_layouts/tags.html b/_layouts/tags.html index 19863a6..f3f20e9 100644 --- a/_layouts/tags.html +++ b/_layouts/tags.html @@ -1,6 +1,7 @@ --- layout: default --- + {{ content }} {% for tag in site.tags %}

{{ tag[0] }}

diff --git a/_posts/2023-07-15-migration-from-github-to-codeberg.md b/_posts/2023-07-15-migration-from-github-to-codeberg.md index 1a69ce0..dcd9c04 100644 --- a/_posts/2023-07-15-migration-from-github-to-codeberg.md +++ b/_posts/2023-07-15-migration-from-github-to-codeberg.md @@ -3,6 +3,8 @@ layout: post title: "Migration from GitHub to Codeberg" tags: Codeberg GitHub Woodpecker Migration toc: true +comments: + id: 110720129252541458 --- ## Backstory diff --git a/style.css b/style.css index e7a1dcd..1208d90 100644 --- a/style.css +++ b/style.css @@ -58,6 +58,11 @@ --dark5: rgb(0, 0, 0); --primary-color: var(--purple2); /* Set your project color */ --borders: var(--light3); + --dark-op05: rgba(0, 0, 0, 0.05); + --dark-op07: rgba(0, 0, 0, 0.07); + --dark-op09: rgba(0, 0, 0, 0.09); + --dark-op40: rgba(0, 0, 0, 0.4); + --dark-op50: rgba(0, 0, 0, 0.5); } /* Typography */ @@ -158,7 +163,7 @@ b { } small { - color: rgba(0, 0, 0, 0.55); + color: var(--dark-op50); } dl { @@ -201,8 +206,8 @@ img.pixels { blockquote { padding: 0 1rem; margin-left: 0; - color: rgba(0, 0, 0, 0.4); - border-left: .3rem solid rgba(0, 0, 0, 0.07); + color: var(--dark-op40); + border-left: .3rem solid var(--dark-op07); } blockquote > :first-child { @@ -214,10 +219,10 @@ blockquote > :last-child { } kbd { - background-color: rgba(0, 0, 0, 0.05); - border: 1px solid rgba(0, 0, 0, 0.07); + background-color: var(--dark-op05); + border: 1px solid var(--dark-op07); border-radius: 4px; - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.09); + box-shadow: inset 0 -1px 0 var(--dark-op09); color: var(--dark4); display: inline-block; font-size: 11px; @@ -230,7 +235,7 @@ kbd { } kbd:active { - box-shadow: inset 0 0px 0 rgba(0, 0, 0, 0.09); + box-shadow: inset 0 0px 0 var(--dark-op09); vertical-align: bottom; filter: contrast(0.2); } @@ -328,7 +333,7 @@ table th { table th, table td { padding: 0.5rem 1rem; - border: 1px solid rgba(0, 0, 0, 0.05); + border: 1px solid var(--dark-op05); } td, @@ -644,7 +649,7 @@ tbody td { /* Inline Code */ code.highlighter-rouge { padding: 2px 6px; - background-color: rgba(0, 0, 0, 0.07); + background-color: var(--dark-op07); } /* Buttons */ @@ -663,6 +668,254 @@ code.highlighter-rouge { font-size: 90%; padding: .4rem 1rem; border-radius: var(--rounded-corner); - background-color: rgba(0, 0, 0, 0.05); + background-color: var(--dark-op05); color: var(--dark5); +} + +/* Comments */ + +.avatar { + background-position: center; + background-size: cover; + border-radius: 50%; + box-shadow: 0 0 2px var(--dark-op50); + margin: 0; + overflow: hidden; +} + +.avatar img { + height: 100%; + width: 100%; +} + +section#comments .comment time, +section#comments .comment footer { + text-align: unset; + padding: unset; + font-size: smaller; + opacity: 0.9; +} + +section#comments .comment { + display: grid; + column-gap: 1rem; + grid-template-areas: "avatar name" "avatar time" "avatar post" "...... card" "...... interactions"; + grid-template-columns: min-content; + justify-items: start; + margin: 2em auto 2em -1em; + padding: 1em; +} + +section#comments .comment .avatar-link { + grid-area: avatar; + height: 4rem; + position: relative; + width: 4rem; +} + +section#comments .comment .avatar-link .avatar { + height: 100%; + width: 100%; +} + +section#comments .comment .avatar-link.op::after { + background-color: var(--purple3); + border-radius: 50%; + bottom: -0.25rem; + color: var(--light2); + content: "✓"; + display: block; + font-size: 1.25rem; + font-weight: bold; + height: 1.5rem; + line-height: 1.5rem; + position: absolute; + right: -0.25rem; + text-align: center; + width: 1.5rem; +} + +section#comments .comment .author { + align-items: center; + cursor: default; + display: flex; + font-weight: bold; + gap: 0.5em; + grid-area: name; +} + +section#comments .comment .author img { + margin: unset; + max-width: unset; +} + +section#comments .comment .author .instance { + background-color: var(--light3); + border-radius: 9999px; + color: var(--dark4); + font-size: smaller; + font-weight: normal; + padding: 0.2em 0.8em; +} + +section#comments .comment .author .instance:hover { + opacity: 0.8; + text-decoration: none; +} + +section#comments .comment .author .instance.op { + background-color: var(--purple2); + color: var(--light2); +} + +section#comments .comment .author .instance.op::before { + content: "✓"; + font-weight: bold; + margin-inline-end: 0.25em; + margin-inline-start: -0.25em; +} + +section#comments .comment time { + grid-area: time; + line-height: 1.5rem; +} + +section#comments .comment time.edited::after { + content: " *"; +} + +section#comments .comment main { + grid-area: post; + justify-self: stretch; +} + +section#comments .comment main p:first-child { + margin-top: 0.25em; +} + +section#comments .comment main p:last-child { + margin-bottom: 0; +} + +section#comments .comment .card, +section#comments .comment .qr, +section#comments .comment .app-badge, +section#comments .comment .products .product, +.products section#comments .comment .product { + color: inherit; + grid-area: card; + max-width: 400px; +} + +section#comments .comment .card:hover, +section#comments .comment .qr:hover, +section#comments .comment .app-badge:hover, +section#comments .comment .products .product:hover, +.products section#comments .comment .product:hover { + text-decoration: none; +} + +section#comments .comment .card figure, +section#comments .comment .qr figure, +section#comments .comment .app-badge figure, +section#comments .comment .products .product figure, +.products section#comments .comment .product figure { + border-radius: inherit; + overflow: hidden; +} + +section#comments .comment .card figure { + background-color: var(--light1); + border-radius: 12px; + margin-left: 0; + margin-right: 0; +} + +section#comments .comment .card figure img { + margin: unset; +} + +section#comments .comment .card figcaption, +section#comments .comment .qr figcaption, +section#comments .comment .app-badge figcaption, +section#comments .comment .products .product figcaption, +.products section#comments .comment .product figcaption { + display: grid; + gap: 0.5em; + margin: 0; + padding: 1em; + text-align: left; +} + +section#comments .comment .card figcaption *, +section#comments .comment .qr figcaption *, +section#comments .comment .app-badge figcaption *, +section#comments .comment .products .product figcaption *, +.products section#comments .comment .product figcaption * { + display: -webkit-box; + line-height: 1.25; + margin: 0; + overflow: hidden; + padding: 0; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +section#comments .comment:first-of-type .card, +section#comments .comment:first-of-type .qr, +section#comments .comment:first-of-type .app-badge, +section#comments .comment:first-of-type .products .product, +.products section#comments .comment:first-of-type .product { + display: none; +} + +section#comments .comment footer { + display: flex; + gap: 1.25em; + grid-area: interactions; + margin-top: 0.925rem; +} + +section#comments .comment footer .faves { + cursor: default; +} + +section#comments .comment footer .faves::before { + color: var(--red2); + content: "❤️"; + margin-inline-end: 0.25em; +} + +section#comments .comment footer .boosts { + cursor: default; +} + +section#comments .comment footer .boosts::before { + color: var(--orange2); + content: "🔁"; + margin-inline-end: 0.25em; +} + +section#comments .comment .emoji { + display: inline; + height: 1.25em; + vertical-align: middle; + width: 1.25em; +} + +section#comments .comment .invisible { + display: none; +} + +section#comments .comment .ellipsis::after { + content: "…"; +} + +section#comments .comment details summary { + background-image: linear-gradient(90deg, transparent, transparent 0.4rem, var(--light1) 0.4rem, var(--light1) calc(100% - 0.4rem), transparent calc(100% - 0.4rem), transparent), repeating-linear-gradient(45deg, var(--dark4), var(--dark4) 0.3rem, var(--purple2) 0.3rem, var(--purple2) 0.6rem); + border-radius: 5px; + color: inherit; + cursor: default; + margin-top: 0.925rem; + padding: 1em; } \ No newline at end of file