Skip to content

Commit

Permalink
start doing Mastadon for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
knzai committed Aug 5, 2024
1 parent 8128caa commit 2ce82a2
Show file tree
Hide file tree
Showing 8 changed files with 373 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ kramdown:

hydejack:
# Configure the order of complementary content on blog posts
post_addons: [about, newsletter, related, random, comments]
post_addons: [comments, about, newsletter, related, random]

# Configure the order of complementary content on project pages
project_addons: [about, newsletter, other, comments]
project_addons: [comments, about, newsletter, other]

# Set to `true` if you don't want to show an icon indicating external links
no_mark_external: false
Expand Down
6 changes: 6 additions & 0 deletions _includes/body/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% if page.toot_id %}
<aside class="comments related" role="complementary">
<h2 class="hr-bottom">{{ site.data.strings.comments | default:"Comments" }}</h2>
<mastodon-comments host="tech.lgbt" user="knzai" tootId="{{page.toot_id}}"></mastodon-comments>
</aside>
{% endif %}
Empty file added _includes/my-comments.html
Empty file.
5 changes: 5 additions & 0 deletions _includes/my-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.4.1/purify.min.js" integrity="sha512-uHOKtSfJWScGmyyFr2O2+efpDx2nhwHU2v7MVeptzZoiC7bdF6Ny/CmZhN2AwIK1oCFiVQQ5DA/L9FSzyPNu6Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="module" src="/assets/scripts/mastodon-comments.js"></script>

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="preload" as="style" onload="this.rel='stylesheet'">
<noscript><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"></noscript>
1 change: 1 addition & 0 deletions _posts/2024-07-06-cleaning-gdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: >
category: rust
redirect_from:
- /posts/cleaning-gdocs/
toot_id: 112761044619578619
---

# Cleaning Up Web Published Google Docs
Expand Down
1 change: 1 addition & 0 deletions _posts/2024-07-20-wasm-file-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: >
redirect_from:
- /posts/wasm-file-form/
categories: ["rust", "wasm"]
toot_id: 112820421486365524
---

I submitted some [pull requests for additional examples](https://github.com/knzai/yew/pulls) to the top level library I'm using for Rust Wasm, [yew](https://yew.rs/). Some of the underlying tech and libraries have advanced since most of the examples were created, and there wasn't a simple one for a very common use case: using a form with multiple fields, including a file-input selector.
Expand Down
14 changes: 14 additions & 0 deletions _sass/my-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,18 @@ img.about {
}
.sidebar-bg {
background-size: auto 100%
}

mastodon-comments {
--font-color: #5d686f;
--font-size: 1.0rem;

--block-border-width: 1px;
--block-border-radius: 3px;
--block-border-color: #ededf0;
--block-background-color: none;

--comment-indent: 40px;

h2 { display: none }
}
Loading

0 comments on commit 2ce82a2

Please sign in to comment.