Commit 24de3cf1 authored by diamondburned (Forefront)'s avatar diamondburned (Forefront) 😶

Added Gitment comments

parent 1efbf687
......@@ -46,4 +46,14 @@ description = "made by diamondburned"
#[params.twitter]
# username = "diamondburned"
# text = ""
# icon = "fab fa-twitter"
\ No newline at end of file
# icon = "fab fa-twitter"
# v This __REQUIRES__ JavaScript. Comment the ENTIRE BLOCK if you don't like it.
[params.gitment] # https://github.com/imsun/gitment#get-started
id = "" # a second tag, REQUIRED
owner = "" # github username
repo = "" # repo to make issues on, should be public
[params.gitment.oauth] # https://github.com/settings/applications/new
id = "" # your oauth ID
secret = "" # your oauth secret
......@@ -22,6 +22,11 @@
{{ .Content }}
</div>
{{ if isset .Site.Params "gitment" }}
{{ partial "gitment.html" . }}
<noscript>JavaScript is required for comments to show.</noscript>
{{ end }}
</main>
<div class="pagination">
......
......@@ -58,21 +58,18 @@ pre, code {
font-family: "Noto Mono", monospace;
}
code {
background-color:#060606;
background-color:#0E0E0E;
border-radius:3px;
color:#409e95;
font-size: 0.9em;
padding: .1em .25em;
box-shadow: inset 0px 0px 3px rgba(0,0,0,0.75);
}
pre code {
box-shadow: none;
}
pre {
margin:0 0 1rem;
word-wrap: break-word;
white-space: pre-wrap;
background-color: rgba(0,0,0,0.5);
background-color: #0E0E0E;
padding: 1em;
border-radius: 10px;
box-shadow: inset 0px 0px 10px rgba(0,0,0,0.75);
......@@ -80,7 +77,8 @@ pre {
pre code {
background-color:transparent;
font-size:0.9em;
padding:0
padding:0;
box-shadow: none;
}
.highlight {
background-color:#060606;
......@@ -364,6 +362,7 @@ main {
overflow:auto;
min-height: 65px;
background: #1d1d1d;
z-index: 1;
}
.nav-container {
margin: 1em auto;
......
<h2 class="cmt-header">Comments</h2>
<div id="gitment">
<!--<p style="color: gray; font-size: .75em">Working on it...</p>-->
</div>
\ No newline at end of file
<style>
h2.cmt-header {
padding: .5em;
}
div#gitment {
padding: 1em;
padding-top: 0;
margin-top: -1em;
}
.gitment-container * {
color: #AAAAAA; /* <-- me when I try to get this working */
}
.gitment-comment-main, .gitment-editor-main {
border: 0;
background: rgba(0,0,0,0.25);
padding: .5em
}
.gitment-comment-header {
background: none;
border-radius: 0px;
color: #CCC;
margin: 0 .5em;
}
.gitment-comment-body {
margin: 0 .5em;
border-radius: 0px;
}
.gitment-heart-icon, path.gitment-heart-icon {
fill: #CCC;
}
.gitment-editor-main::before, .gitment-comment-main::before {
border-right-color: rgba(0,0,0,0.25);
}
.gitment-editor-main::after, .gitment-comment-main::after {
border-right-color: transparent;
}
.gitment-editor-body textarea, .gitment-editor-body textarea:focus, .gitment-editor-preview.gitment-markdown {
box-shadow: inset 0px 0px 3px rgba(0,0,0,0.75);
background-color: #0E0E0E;
color: #CCC;
line-height: 1.4;
}
.gitment-editor-tab {
margin-left: 1px;
}
.gitment-editor-tab.gitment-selected {
background-color: rgba(0,0,0,0.25);
border-color: transparent;
border-bottom: none;
color: #CCC;
}
.gitment-editor-header {
border-bottom: transparent;
}
.gitment-editor-submit, .gitment-comments-init-btn {
background-color: rgba(255,255,255,0.05);
color: #CCC;
}
.gitment-editor-submit:hover, .gitment-comments-init-btn:hover {
background-color: rgba(255,255,255,0.15);
}
a.gitment-editor-footer-tip {
display: none;
}
.gitment-editor-login {
margin-top: -45px;
margin-right: 5px;
}
.gitment-comment-avatar, .gitment-comment-avatar-img, .gitment-comment-avatar, .gitment-editor-avatar-img, .gitment-editor-avatar svg {
border-radius: 50%;
background: black;
}
.gitment-footer-container {
margin-top: -20px;
margin-bottom: 0px;
}
</style>
\ No newline at end of file
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
<script>
function loadgitment() {
window.gitment = new Gitment({
id: "{{ .Site.Params.Gitment.ID }}",
owner: "{{ .Site.Params.Gitment.Owner }}",
repo: "{{ .Site.Params.Gitment.Repo }}",
oauth: {
client_id: "{{ .Site.Params.Gitment.OAuth.ID }}",
client_secret: "{{ .Site.Params.Gitment.OAuth.Secret }}",
},
});
//window.gitment.render(document.getElementById('gitment'));
window.gitment.render(document.querySelector('#gitment').innerHTML);
}
</script>
\ No newline at end of file
......@@ -9,6 +9,11 @@
{{ end }}
{{ end }}
{{ if isset .Site.Params "gitment" }}
{{ partial "gitment_head.html" . }}
{{ partial "gitment_css.html" . }}
{{ end }}
<title>
{{ if eq .URL "/" }}
{{ .Site.Title }}
......@@ -63,5 +68,7 @@
<!-- RSS -->
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
</head>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
{{ partial "head.html" . }}
{{ partial "head.html" . }}
<body>
<body onload="loadgitment()">
<nav class="nav">
<div class="nav-container">
<div class="title">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment