-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add comment gisqus and refactor
- install comment gisqus - move pkgs loadmore to scripts
- Loading branch information
1 parent
7ebac2e
commit 9785874
Showing
17 changed files
with
100 additions
and
35 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
;(function () { | ||
let isClick = false | ||
const ELEMENT_COMMENT = document.getElementById('content-comment')! | ||
const BtnToggle = document.getElementById('toggle-comment')! | ||
BtnToggle.onclick = () => { | ||
ELEMENT_COMMENT.classList.toggle('hidden') | ||
let isHide = true | ||
if (isHide) { | ||
isClick = false | ||
BtnToggle.innerHTML = 'Hide Comments' | ||
} else { | ||
isClick = true | ||
BtnToggle.innerHTML = 'Show Comments' | ||
} | ||
if (!isClick) { | ||
isClick = true | ||
const REPO = 'alifprihantoro/pawartatech' | ||
const REPO_ID = 'R_kgDONCtgBQ' | ||
const DATA_CATEGORY = 'Gisqus' | ||
const CATEGORY_ID = 'DIC_kwDONCtgBc4CkVdt' | ||
const DATA_MAPPING = 'pathname' | ||
const isLazy = true | ||
const DATA_THEMES = 'dark' | ||
const script = document.createElement('script') | ||
script.src = 'https://giscus.app/client.js' | ||
script.setAttribute('data-repo', REPO) | ||
script.setAttribute('data-repo-id', REPO_ID) | ||
script.setAttribute('data-category', DATA_CATEGORY) | ||
script.setAttribute('data-category-id', CATEGORY_ID) | ||
script.setAttribute('data-mapping', DATA_MAPPING) | ||
script.setAttribute('data-strict', '1') | ||
script.setAttribute('data-reactions-enabled', '1') | ||
script.setAttribute('data-emit-metadata', '1') | ||
script.setAttribute('data-input-position', 'top') | ||
script.setAttribute('data-theme', DATA_THEMES) | ||
if (isLazy) { | ||
script.setAttribute('data-loading', 'lazy') | ||
} | ||
script.setAttribute('data-lang', 'id') | ||
script.setAttribute('crossorigin', 'anonymous') | ||
ELEMENT_COMMENT.appendChild(script) | ||
} | ||
} | ||
})() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
/* default */ | ||
h1, | ||
h2, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters