From 22fcc7b96ccb0f7cf302aead0e827f74282b3d74 Mon Sep 17 00:00:00 2001 From: tymoteuszjozwiak Date: Tue, 19 Dec 2023 21:18:21 +0100 Subject: [PATCH] feat: hashover comments integration --- blueprints.yaml | 423 +++++++++++++------------- paxover.yaml | 36 ++- templates/partials/comments.html.twig | 20 +- 3 files changed, 226 insertions(+), 253 deletions(-) diff --git a/blueprints.yaml b/blueprints.yaml index 9e40b42..dd1d1e8 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -5,9 +5,9 @@ version: 1.0.0 description: "Paxover is a theme for Tymoteusz Jóźwiak's personal website" icon: empire author: - name: Tymoteusz Jóźwiak - email: tymoteusz@jozwiak.top - url: https://jozwiak.top + name: Tymoteusz Jóźwiak + email: tymoteusz@jozwiak.top + url: https://jozwiak.top homepage: https://codeberg.org/tymoteuszjozwiak/paxover demo: https://jozwiak.top keywords: paxover @@ -15,250 +15,235 @@ bugs: https://codeberg.org/tymoteuszjozwiak/paxover/issues license: MIT dependencies: - - { name: grav, version: ">=1.6.0" } + - { name: grav, version: ">=1.6.0" } form: - validation: loose + validation: loose - fields: - blog_section: - type: section - title: Blog settings - underline: true + fields: + blog_section: + type: section + title: Blog settings + underline: true - blog.slug: - type: text - label: Blog slug - help: Route to the blog page - size: medium - default: "/blog" + blog.slug: + type: text + label: Blog slug + help: Route to the blog page + size: medium + default: "/blog" - blog.tag_title: - type: text - label: Tag title - help: Title displayed on tag view page - size: medium - default: "Tag" + blog.tag_title: + type: text + label: Tag title + help: Title displayed on tag view page + size: medium + default: "Tag" - blog.tags_title: - type: text - label: Tags title - help: Title displayed on tag list - size: medium - default: "Tagi" + blog.tags_title: + type: text + label: Tags title + help: Title displayed on tag list + size: medium + default: "Tagi" - blog.series_title: - type: text - label: Series title - help: Title displayed on series field - size: medium - default: "Seria" + blog.series_title: + type: text + label: Series title + help: Title displayed on series field + size: medium + default: "Seria" - blog.pagination_limit: - type: text - label: Blog pagination limit - help: Limit of posts displayed on one page - size: medium - default: "7" + blog.pagination_limit: + type: text + label: Blog pagination limit + help: Limit of posts displayed on one page + size: medium + default: "7" - blog.pagination_newer: - type: text - label: Pagination "newer" - help: Title displayed on "newer" button - size: medium - default: "Nowsze" + blog.pagination_newer: + type: text + label: Pagination "newer" + help: Title displayed on "newer" button + size: medium + default: "Nowsze" - blog.pagination_older: - type: text - label: Pagination "older" - help: Title displayed on "older" button - size: medium - default: "Starsze" + blog.pagination_older: + type: text + label: Pagination "older" + help: Title displayed on "older" button + size: medium + default: "Starsze" - blog.share: - type: text - label: Share section title - size: medium - default: "Udostępnij" + blog.share: + type: text + label: Share section title + size: medium + default: "Udostępnij" - blog.share_buttons: - type: list - label: Share buttons - btnLabel: Add button + blog.share_buttons: + type: list + label: Share buttons + btnLabel: Add button - fields: - .name: - type: text - label: Name - size: medium - .class: - type: text - label: Class (e.g. btn-twitter) - size: medium - .attributes: - type: text - label: Attributes (e.g. disabled) - size: medium - .link: - type: text - label: Link - size: medium - .url_param: - type: text - label: URL param (e.g. url) - size: medium - .title: - type: text - label: Title - size: medium - .title_en: - type: text - label: Title [EN] - size: medium + fields: + .name: + type: text + label: Name + size: medium + .class: + type: text + label: Class (e.g. btn-twitter) + size: medium + .attributes: + type: text + label: Attributes (e.g. disabled) + size: medium + .link: + type: text + label: Link + size: medium + .url_param: + type: text + label: URL param (e.g. url) + size: medium + .title: + type: text + label: Title + size: medium + .title_en: + type: text + label: Title [EN] + size: medium - social_section: - type: section - title: Main page settings - underline: true + social_section: + type: section + title: Main page settings + underline: true - social_buttons: - type: list - label: Social buttons - btnLabel: Add button + social_buttons: + type: list + label: Social buttons + btnLabel: Add button - fields: - .name: - type: text - label: Name - size: medium - .class: - type: text - label: Class (e.g. btn-twitter) - size: medium - .attributes: - type: text - label: Attributes (e.g. disabled) - size: medium - .link: - type: text - label: Link - size: medium - .title: - type: text - label: Title - size: medium - .title_en: - type: text - label: Title [EN] - size: medium + fields: + .name: + type: text + label: Name + size: medium + .class: + type: text + label: Class (e.g. btn-twitter) + size: medium + .attributes: + type: text + label: Attributes (e.g. disabled) + size: medium + .link: + type: text + label: Link + size: medium + .title: + type: text + label: Title + size: medium + .title_en: + type: text + label: Title [EN] + size: medium - contact: - type: textarea - label: Contact - help: Contact info displayed on main page - size: big - default: "" + contact: + type: textarea + label: Contact + help: Contact info displayed on main page + size: big + default: "" - contact_en: - type: textarea - label: Contact EN - help: English version of the previous field - size: big - default: "" + contact_en: + type: textarea + label: Contact EN + help: English version of the previous field + size: big + default: "" - lang_title_en: - type: text - label: Lang title EN - help: Main language title displayed on english version of main page - size: medium - default: "" + lang_title_en: + type: text + label: Lang title EN + help: Main language title displayed on english version of main page + size: medium + default: "" - footer_section: - type: section - title: Footer settings - underline: true + footer_section: + type: section + title: Footer settings + underline: true - footer.title: - type: text - label: Footer link title - size: medium - default: "" + footer.title: + type: text + label: Footer link title + size: medium + default: "" - footer.title_en: - type: text - label: Footer link title EN - help: English translation of footer link title - size: medium - default: "" + footer.title_en: + type: text + label: Footer link title EN + help: English translation of footer link title + size: medium + default: "" - footer.url: - type: text - label: Footer link - help: Footer link - size: medium - default: "" + footer.url: + type: text + label: Footer link + help: Footer link + size: medium + default: "" - footer.year: - type: number - label: Footer year - help: Website start year displayed in footer - size: medium - default: "2022" + footer.year: + type: number + label: Footer year + help: Website start year displayed in footer + size: medium + default: "2022" - owner_title: - type: text - label: Owner title - size: medium - default: "Owner" + owner_title: + type: text + label: Owner title + size: medium + default: "Owner" - wordcount_title: - type: text - label: Word count title - size: medium - default: "słów" + wordcount_title: + type: text + label: Word count title + size: medium + default: "słów" - analytics: - type: textarea - label: Analytics script - help: Script inserted at the bottom of every page - size: big - default: "" + analytics: + type: textarea + label: Analytics script + help: Script inserted at the bottom of every page + size: big + default: "" - cusdis_section: - type: section - title: Cusdis integration settings - underline: true + hashover_section: + type: section + title: hashover integration settings + underline: true - cusdis.domain: - type: text - label: Cusdis domain - help: Domain where your Cusdis instance is hosted - size: medium - default: "cusdis.com" + hashover.domain: + type: text + label: hashover domain + help: Domain where your hashover instance is hosted + size: medium - cusdis.app_id: - type: text - label: Cusdis App ID - help: ID from Cusdis dashboard (e.g. 35b01c49-15f9-46b3-807f-9240f6cadc1a) - size: medium - default: "" + hashover.title: + type: text + label: Comments section title + size: medium + default: "Komentarze" - cusdis.title: - type: text - label: Comments section title - size: medium - default: "Komentarze" - - cusdis.disable_comments: - type: text - label: Disable comments info text - help: Information displayed where the comments are disabled - size: medium - default: "Komentarze są wyłączone dla tego artykułu" - - cusdis.lang: - type: textarea - label: Cusdis language override - help: More info at https://cusdis.com/doc#/advanced/i18n?id=contributing-more-languages - size: big - default: "" + hashover.disable_comments: + type: text + label: Disable comments info text + help: Information displayed where the comments are disabled + size: medium + default: "Komentarze są wyłączone dla tego artykułu" diff --git a/paxover.yaml b/paxover.yaml index 121e802..a909da5 100644 --- a/paxover.yaml +++ b/paxover.yaml @@ -7,23 +7,21 @@ contact: contact_en: lang_title_en: blog: - slug: - tag_title: - tags_title: - series_title: - pagination_limit: - pagination_newer: - pagination_older: - share: - share_buttons: + slug: + tag_title: + tags_title: + series_title: + pagination_limit: + pagination_newer: + pagination_older: + share: + share_buttons: footer: - title: - title_en: - url: - year: -cusdis: - domain: - app_id: - title: - disable_comments: - lang: + title: + title_en: + url: + year: +hashover: + domain: + title: + disable_comments: diff --git a/templates/partials/comments.html.twig b/templates/partials/comments.html.twig index 45cde7e..442db3c 100644 --- a/templates/partials/comments.html.twig +++ b/templates/partials/comments.html.twig @@ -1,19 +1,9 @@ -{% if theme_config.cusdis.domain %} -

{{ theme_config.cusdis.title|raw }}

+{% if theme_config.hashover.domain %} +

{{ theme_config.hashover.title|raw }}

{% if page.header.disableComments %} -

{{ theme_config.cusdis.disable_comments|raw }}

+

{{ theme_config.hashover.disable_comments|raw }}

{% else %} - {% if theme_config.cusdis.lang %} - - {% endif %} -
- +
+ {% endif %} {% endif %} \ No newline at end of file