Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add giscus #89

Merged
merged 3 commits into from
May 8, 2024
Merged
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
7 changes: 7 additions & 0 deletions src/assets/styles/components/_discussion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.discussion {
padding: 44px 0px;

@include mq-down(sm) {
padding: 24px;
}
}
1 change: 1 addition & 0 deletions src/assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
@import "components/writing/article-card";
@import "components/writing/header";
@import "components/social-card";
@import "components/discussion";

// Pages
@import "pages/home";
Expand Down
8 changes: 0 additions & 8 deletions src/assets/styles/pages/_writing.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
.writing {
&.article-content {
padding-bottom: 44px;

@include mq-down(sm) {
padding-bottom: 24px;
}
}

&--article-list {
gap: 24px;
}
Expand Down
17 changes: 17 additions & 0 deletions src/includes/writing/discussion.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="discussion">
<script src="https://giscus.app/client.js"
data-repo="afnizarnur/afnizarnur.com"
data-repo-id="MDEwOlJlcG9zaXRvcnk3ODgxMDAyNg=="
data-category="Writing"
data-category-id="DIC_kwDOBLKLqs4CfN33"
data-mapping="title"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="light"
data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
async></script>
</div>
3 changes: 3 additions & 0 deletions src/layouts/writing.njk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ layout: base
{% endfor %}
</ul>
</div>

{% include "writing/discussion.njk" %}

</r-cell>

</r-grid>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/contact.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: base
title: Contact
eleventyNavigation:
key: Contact
order: 5
order: 4
permalink: /contact/
---

Expand Down
3 changes: 0 additions & 3 deletions src/pages/index.njk
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
layout: base
eleventyNavigation:
key: Home
order: 1
permalink: /
---

Expand Down
2 changes: 1 addition & 1 deletion src/pages/work.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: base
title: Work
eleventyNavigation:
key: Work
order: 2
order: 1
permalink: /work/
---

Expand Down
2 changes: 1 addition & 1 deletion src/pages/writing.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: base
title: Writing
eleventyNavigation:
key: Writing
order: 3
order: 2
permalink: /writing/
---

Expand Down