aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2022-10-07 22:20:29 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2022-10-07 22:20:29 +0200
commit69356cf90779944324f8c17779d562db4a3fd9e2 (patch)
treefa3599bda0cd92f94056467661ec3c2a2f260567
parentf4fa1ef9989da487a13d552cfe161a073390fffe (diff)
downloadmitjafelicijan.com-69356cf90779944324f8c17779d562db4a3fd9e2.tar.gz
Added Cactus comment to the site
-rw-r--r--themes/simple/layouts/_default/baseof.html19
-rw-r--r--themes/simple/layouts/_default/list.html2
-rw-r--r--themes/simple/layouts/_default/single.html11
-rw-r--r--themes/simple/layouts/partials/comments.html20
-rw-r--r--themes/simple/layouts/partials/footer.html3
-rw-r--r--themes/simple/layouts/partials/header.html2
-rw-r--r--themes/simple/layouts/partials/tailwind.html103
-rw-r--r--themes/simple/openring/openring.html1
8 files changed, 140 insertions, 21 deletions
diff --git a/themes/simple/layouts/_default/baseof.html b/themes/simple/layouts/_default/baseof.html
index 5f8e2ec..781b043 100644
--- a/themes/simple/layouts/_default/baseof.html
+++ b/themes/simple/layouts/_default/baseof.html
@@ -1,11 +1,14 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3 {{- partial "head.html" . -}} 3
4 <body> 4{{ partial "head.html" . }}
5 {{- partial "header.html" . -}} 5
6 <div id="content"> 6<body>
7 {{- block "main" . }}{{- end }} 7 {{ partial "header.html" . }}
8 </div> 8 <div id="content">
9 {{- partial "footer.html" . -}} 9 {{ block "main" . }}{{ end }}
10 </body> 10 </div>
11 {{ partial "footer.html" . }}
12</body>
13
11</html> 14</html>
diff --git a/themes/simple/layouts/_default/list.html b/themes/simple/layouts/_default/list.html
index 7870247..04589cb 100644
--- a/themes/simple/layouts/_default/list.html
+++ b/themes/simple/layouts/_default/list.html
@@ -1,5 +1,5 @@
1{{ define "main" }} 1{{ define "main" }}
2<main aria-role="main" class="container-blog px-6 md:p-0"> 2<main aria-role="main" class="container-blog mx-auto px-6 md:p-0">
3 3
4 <h1 class="text-2xl font-bold mb-6">Blog posts</h1> 4 <h1 class="text-2xl font-bold mb-6">Blog posts</h1>
5 5
diff --git a/themes/simple/layouts/_default/single.html b/themes/simple/layouts/_default/single.html
index 2622946..e8f27d1 100644
--- a/themes/simple/layouts/_default/single.html
+++ b/themes/simple/layouts/_default/single.html
@@ -1,5 +1,5 @@
1{{ define "main" }} 1{{ define "main" }}
2<main aria-role="main" class="container-blog px-6 md:p-0"> 2<main aria-role="main" class="container-blog mx-auto px-6 md:p-0">
3 3
4 <!-- Single article --> 4 <!-- Single article -->
5 <article itemtype="http://schema.org/Article" class="single mb-12"> 5 <article itemtype="http://schema.org/Article" class="single mb-12">
@@ -17,21 +17,18 @@
17 </article> 17 </article>
18 18
19 {{ if in .Type "posts" }} 19 {{ if in .Type "posts" }}
20 <hr class="border-2 border-gray-100 mb-10"> 20 <hr class="border-2 border-gray-100 mb-10" />
21 {{ end }} 21 {{ end }}
22 22
23 <!-- Comment, contact --> 23 <!-- Comment, contact -->
24 {{ if in .Type "posts" }} 24 {{ if in .Type "posts" }}
25 <section class="mb-10"> 25 <section class="mb-10">
26 <p class="mb-4"> 26 {{ partial "comments.html" . }}
27 <strong>Comment, contact:</strong> The easiest way to contact me is by writing me a message on <a href="https://t.me/mitjafelicijan" target="_blank" class="underline hover:bg-yellow-100">Telegram (https://t.me/mitjafelicijan)</a>.
28 </p>
29 <p>You can also just write me an email at <a href="mailto:m@mitjafelicijan.com" class="underline hover:bg-yellow-100">m@mitjafelicijan.com</a>.</p>
30 </section> 27 </section>
31 {{ end }} 28 {{ end }}
32 29
33 {{ if in .Type "posts" }} 30 {{ if in .Type "posts" }}
34 <hr class="border-2 border-gray-100 mb-10"> 31 <hr class="border-2 border-gray-100 mb-10" />
35 {{ end }} 32 {{ end }}
36 33
37 <!-- Read more --> 34 <!-- Read more -->
diff --git a/themes/simple/layouts/partials/comments.html b/themes/simple/layouts/partials/comments.html
new file mode 100644
index 0000000..dd73bb4
--- /dev/null
+++ b/themes/simple/layouts/partials/comments.html
@@ -0,0 +1,20 @@
1<section class="comments">
2 <p class="mb-4">You can write me an email at <a href="mailto:m@mitjafelicijan.com" class="underline hover:bg-yellow-100">m@mitjafelicijan.com</a> or comment bellow.</p>
3 <div id="comment-section"></div>
4
5 <script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
6 <link rel="stylesheet" href="_https://latest.cactus.chat/style.css" type="text/css">
7
8 <script>
9 window.addEventListener('load', () => {
10 initComments({
11 node: document.getElementById("comment-section"),
12 defaultHomeserverUrl: "https://matrix.cactus.chat:8448",
13 serverName: "cactus.chat",
14 siteName: "mitjafelicijan.com",
15 commentSectionId: "{{.File}}",
16 updateInterval: 15
17 });
18 });
19 </script>
20</section>
diff --git a/themes/simple/layouts/partials/footer.html b/themes/simple/layouts/partials/footer.html
index 8881f46..95a1771 100644
--- a/themes/simple/layouts/partials/footer.html
+++ b/themes/simple/layouts/partials/footer.html
@@ -1,4 +1,4 @@
1<footer class="container-blog px-6 md:p-0 text-gray-400 text-sm"> 1<footer class="container-blog mx-auto px-6 md:p-0 text-gray-400 text-sm">
2 <p class="pb-12"> 2 <p class="pb-12">
3 This website does not track you. 3 This website does not track you.
4 Content is made available under the <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noreferrer" class="underline hover:text-gray-800">CC BY 4.0 license</a> unless specified otherwise. 4 Content is made available under the <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noreferrer" class="underline hover:text-gray-800">CC BY 4.0 license</a> unless specified otherwise.
@@ -11,6 +11,5 @@
11<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js" integrity="sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8" crossorigin="anonymous"></script> 11<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js" integrity="sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8" crossorigin="anonymous"></script>
12<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> 12<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
13 13
14
15<!-- Fathom - beautiful, simple website analytics --> 14<!-- Fathom - beautiful, simple website analytics -->
16<script src="https://cdn.usefathom.com/script.js" data-site="XHQARKXP" defer></script> 15<script src="https://cdn.usefathom.com/script.js" data-site="XHQARKXP" defer></script>
diff --git a/themes/simple/layouts/partials/header.html b/themes/simple/layouts/partials/header.html
index 1e8ee13..1cbc47e 100644
--- a/themes/simple/layouts/partials/header.html
+++ b/themes/simple/layouts/partials/header.html
@@ -1,4 +1,4 @@
1<div class="container-blog px-6 md:p-0"> 1<div class="container-blog mx-auto px-6 md:p-0">
2 <header class="flex py-4 mt-4 mb-6"> 2 <header class="flex py-4 mt-4 mb-6">
3 <h3 class="flex-grow"> 3 <h3 class="flex-grow">
4 <a href="/" itemprop="url" class="text-xl font-bold hover:bg-yellow-100">Mitja Felicijan</a> 4 <a href="/" itemprop="url" class="text-xl font-bold hover:bg-yellow-100">Mitja Felicijan</a>
diff --git a/themes/simple/layouts/partials/tailwind.html b/themes/simple/layouts/partials/tailwind.html
index 2492d72..1786ffd 100644
--- a/themes/simple/layouts/partials/tailwind.html
+++ b/themes/simple/layouts/partials/tailwind.html
@@ -4,7 +4,6 @@
4 /* Container */ 4 /* Container */
5 .container-blog { 5 .container-blog {
6 max-width: 700px; 6 max-width: 700px;
7 margin: 0 auto;
8 } 7 }
9 8
10 /* User text selection */ 9 /* User text selection */
@@ -102,5 +101,107 @@
102 @apply my-10; 101 @apply my-10;
103 } 102 }
104 103
104 /* Cactus Comments */
105 .comments img {
106 max-width: auto !important;
107 max-width: unset !important;
108 max-width: inherit !important;
109 }
110 .cactus-container .cactus-editor-textarea {
111 @apply border w-full px-3 py-2 outline-none rounded mb-2;
112 }
113
114 .cactus-container .cactus-editor-name input {
115 @apply border w-full px-3 py-2 mb-2 outline-none rounded;
116 }
117
118 .cactus-container .cactus-editor-name {
119 @apply mb-1;
120 }
121
122 /* Cactus: Buttons */
123 .cactus-editor-buttons {
124 @apply flex gap-2;
125 }
126
127 .cactus-container .cactus-button {
128 @apply text-base bg-gray-200 font-medium px-4 py-1 rounded;
129 }
130
131 .cactus-container .cactus-editor {
132 @apply mb-10;
133 }
134
135 /* Cactus: Comment List */
136 .cactus-container .cactus-comments-list {
137 @apply flex flex-col gap-8;
138 }
139
140 .cactus-container .cactus-comment {
141 @apply flex gap-4;
142 }
143
144 .cactus-container .cactus-comment .cactus-comment-avatar img {
145 @apply w-10 h-10 rounded-full;
146 }
147
148 .cactus-container .cactus-comment .cactus-comment-avatar-placeholder {
149 @apply w-10 h-10 rounded-full bg-gray-300;
150 }
151
152 .cactus-container .cactus-comment .cactus-comment-header {
153 @apply flex gap-2 items-center;
154 }
155
156 .cactus-container .cactus-comment .cactus-comment-header .cactus-comment-displayname {
157 @apply font-semibold;
158 }
159
160 .cactus-container .cactus-comment .cactus-comment-header .cactus-comment-time {
161 @apply text-gray-400 text-sm;
162 }
163
164 /* Cactus: Login */
165 .cactus-container .cactus-login-form-wrapper {
166 @apply border mb-6 p-3 relative rounded;
167 }
168
169 .cactus-container .cactus-login-form .cactus-login-close {
170 @apply absolute right-3 top-3 w-4 h-4;
171 }
172
173 .cactus-container .cactus-login-form .cactus-login-title {
174 @apply font-bold mb-4 mt-0 pt-0;
175 }
176
177 /* Cactus: Login with a button */
178 .cactus-container .cactus-login-form .cactus-login-client {
179 @apply mb-6;
180 }
181
182 .cactus-container .cactus-login-form .cactus-login-client-title {
183 @apply font-semibold mb-2;
184 }
185
186 /* Cactus: Login with credentials */
187 .cactus-container .cactus-login-form .cactus-login-credentials {
188 }
189
190 .cactus-container .cactus-login-form .cactus-login-credentials-title {
191 @apply font-semibold mb-1;
192 }
193
194 .cactus-container .cactus-login-form .cactus-login-field {
195 @apply flex gap-4 mb-2 items-center;
196 }
197
198 .cactus-container .cactus-login-form .cactus-login-label {
199 @apply w-20;
200 }
201
202 .cactus-container .cactus-login-form input {
203 @apply border px-2 py-1 rounded;
204 }
205
105 } 206 }
106</style> 207</style>
diff --git a/themes/simple/openring/openring.html b/themes/simple/openring/openring.html
index 1b3a228..48444f8 100644
--- a/themes/simple/openring/openring.html
+++ b/themes/simple/openring/openring.html
@@ -1,5 +1,4 @@
1<section class="mb-10"> 1<section class="mb-10">
2
3 <h4 class="text-2xl font-bold mb-6">Articles from blogs I follow around the net</h4> 2 <h4 class="text-2xl font-bold mb-6">Articles from blogs I follow around the net</h4>
4 3
5 <section> 4 <section>