Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

{{ define "main" }}
{{ partial "article/article.html" . }}

{{ with .Params.bsky_post }}
{{ if . }}
{{ partial "bsky-comments.html" . }}
{{ end }}
{{ end }}

{{ if .Params.links }}
{{ partial "article/components/links" . }}
Expand Down
29 changes: 29 additions & 0 deletions layouts/partials/comments/bsky-comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script type="module" src="https://cdn.jsdelivr.net/gh/Siya-33/[email protected]/js/bsky-comments.js"></script>
<bsky-comments post="{{ . }}" ></bsky-comments>
<style>
bsky-comments {
--background-color: var(--card-background);
--text-color: var(--card-text-color-main);
--link-color: var(--code-text-color);
--comment-meta-color: #5E9595;
--error-color: red;
--reply-border-color: transparent;
--button-background-color: var(--code-background-color);
--author-avatar-border-radius: 100%;
}
</style>
<!-- custom style -->
<!-- <script>
document.addEventListener('DOMContentLoaded', function() {
const bskyComments = document.querySelector('bsky-comments');
if (bskyComments) {
const style = document.createElement('style');
style.textContent = `
comments {
border-radius: var(--card-border-radius);
}
`;
bskyComments.shadowRoot.appendChild(style);
}
});
</script> -->