theme: add support for itte as the comment system
This commit is contained in:
parent
800a39956a
commit
2b8f97a1af
|
@ -106,6 +106,7 @@ Configuration: theme_config.json
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"avatar_url": "<url_of_your_avatar>",
|
"avatar_url": "<url_of_your_avatar>",
|
||||||
|
"itte_url": "https://<your_itte_instance>",
|
||||||
"nav_links": [
|
"nav_links": [
|
||||||
{
|
{
|
||||||
"name": "<nav_name>",
|
"name": "<nav_name>",
|
||||||
|
@ -119,6 +120,8 @@ Configuration: theme_config.json
|
||||||
|
|
||||||
`nav_links`: a set of navigation links to be displayed in the sidebar (or at the top on mobile). You can set `"target": "_blank"` to make the link open in new tabs, while omitting this attribute will make the link behave as a normal link, that is, open in the current page.
|
`nav_links`: a set of navigation links to be displayed in the sidebar (or at the top on mobile). You can set `"target": "_blank"` to make the link open in new tabs, while omitting this attribute will make the link behave as a normal link, that is, open in the current page.
|
||||||
|
|
||||||
|
`itte_url`: OPTIONAL. A URL to your [Itte](https://github.com/PeterCxy/itte) instance, the comment system.
|
||||||
|
|
||||||
Installation in Standard Notes
|
Installation in Standard Notes
|
||||||
===
|
===
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
<h1 id="paprika-post-title">{{ title }}</h1>
|
<h1 id="paprika-post-title">{{ title }}</h1>
|
||||||
<span class="date">{{ format_date timestamp "%e %b, %Y" }}</span>
|
<span class="date">{{ format_date timestamp "%e %b, %Y" }}</span>
|
||||||
{{{ content }}}
|
{{{ content }}}
|
||||||
|
{{ #if blog.theme_config.itte_url }}
|
||||||
|
<section id="itte-thread" data-path="{{ page.base_url }}{{ page.pathname }}">
|
||||||
|
</section>
|
||||||
|
<script src="{{ blog.theme_config.itte_url }}/itte.js"></script>
|
||||||
|
{{ /if }}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<div class="toc-wrapper hidden">
|
<div class="toc-wrapper hidden">
|
||||||
|
|
|
@ -559,3 +559,15 @@ blockquote {
|
||||||
.hljs:hover {
|
.hljs:hover {
|
||||||
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Extra customization for Itte, the comment system */
|
||||||
|
#itte-thread::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-left: calc(50% - 90px);
|
||||||
|
width: 180px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #e91e63;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue