new translation strategy,prepare config for series
This commit is contained in:
@@ -8,11 +8,11 @@ author:
|
|||||||
name: Tymoteusz Jóźwiak
|
name: Tymoteusz Jóźwiak
|
||||||
email: tymoteusz@jozwiak.top
|
email: tymoteusz@jozwiak.top
|
||||||
url: https://jozwiak.top
|
url: https://jozwiak.top
|
||||||
homepage: https://github.com/tymoteuszjozwiak/paxover
|
homepage: https://codeberg.org/tymoteuszjozwiak/paxover
|
||||||
demo: https://jozwiak.top
|
demo: https://jozwiak.top
|
||||||
keywords: paxover
|
keywords: paxover
|
||||||
bugs: https://github.com/tymoteuszjozwiak/paxover/issues
|
bugs: https://codeberg.org/tymoteuszjozwiak/paxover/issues
|
||||||
license: MIT
|
license:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- { name: grav, version: ">=1.6.0" }
|
- { name: grav, version: ">=1.6.0" }
|
||||||
@@ -38,7 +38,21 @@ form:
|
|||||||
label: Tag title
|
label: Tag title
|
||||||
help: Title displayed on tag view page
|
help: Title displayed on tag view page
|
||||||
size: medium
|
size: medium
|
||||||
default: "Tag:"
|
default: "Tag"
|
||||||
|
|
||||||
|
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.pagination_limit:
|
blog.pagination_limit:
|
||||||
type: text
|
type: text
|
||||||
@@ -52,14 +66,7 @@ form:
|
|||||||
label: Pagination "newer"
|
label: Pagination "newer"
|
||||||
help: Title displayed on "newer" button
|
help: Title displayed on "newer" button
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "Nowsze"
|
||||||
|
|
||||||
blog.pagination_newer_en:
|
|
||||||
type: text
|
|
||||||
label: Pagination "newer" EN
|
|
||||||
help: English translation of the previous field
|
|
||||||
size: medium
|
|
||||||
default: "Newer"
|
|
||||||
|
|
||||||
blog.pagination_older:
|
blog.pagination_older:
|
||||||
type: text
|
type: text
|
||||||
@@ -68,25 +75,11 @@ form:
|
|||||||
size: medium
|
size: medium
|
||||||
default: "Starsze"
|
default: "Starsze"
|
||||||
|
|
||||||
blog.pagination_older_en:
|
|
||||||
type: text
|
|
||||||
label: Pagination "older" EN
|
|
||||||
help: English translation of the previous field
|
|
||||||
size: medium
|
|
||||||
default: "Older"
|
|
||||||
|
|
||||||
blog.share:
|
blog.share:
|
||||||
type: text
|
type: text
|
||||||
label: Share section title
|
label: Share section title
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "Udostępnij"
|
||||||
|
|
||||||
blog.share_en:
|
|
||||||
type: text
|
|
||||||
label: Share section title EN
|
|
||||||
help: English translation of the previous field
|
|
||||||
size: medium
|
|
||||||
default: "Share"
|
|
||||||
|
|
||||||
blog.share_buttons:
|
blog.share_buttons:
|
||||||
type: list
|
type: list
|
||||||
@@ -202,19 +195,19 @@ form:
|
|||||||
label: Footer year
|
label: Footer year
|
||||||
help: Website start year displayed in footer
|
help: Website start year displayed in footer
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "2022"
|
||||||
|
|
||||||
owner_title:
|
owner_title:
|
||||||
type: text
|
type: text
|
||||||
label: Owner title
|
label: Owner title
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "Owner"
|
||||||
|
|
||||||
wordcount_title:
|
wordcount_title:
|
||||||
type: text
|
type: text
|
||||||
label: Word count title
|
label: Word count title
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "słów"
|
||||||
|
|
||||||
analytics:
|
analytics:
|
||||||
type: textarea
|
type: textarea
|
||||||
@@ -246,41 +239,14 @@ form:
|
|||||||
type: text
|
type: text
|
||||||
label: Comments section title
|
label: Comments section title
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "Komentarze"
|
||||||
|
|
||||||
cusdis.title_en:
|
|
||||||
type: text
|
|
||||||
label: Comments section title EN
|
|
||||||
help: English translation of the previous field
|
|
||||||
size: medium
|
|
||||||
default: "Comments"
|
|
||||||
|
|
||||||
cusdis.disable_comments:
|
cusdis.disable_comments:
|
||||||
type: text
|
type: text
|
||||||
label: Disable comments info text
|
label: Disable comments info text
|
||||||
help: Information displayed where the comments are disabled
|
help: Information displayed where the comments are disabled
|
||||||
size: medium
|
size: medium
|
||||||
default: ""
|
default: "Komentarze są wyłączone dla tego artykułu"
|
||||||
|
|
||||||
cusdis.disable_comments_en:
|
|
||||||
type: text
|
|
||||||
label: Disable comments info text EN
|
|
||||||
help: English version of the previous field
|
|
||||||
size: medium
|
|
||||||
default: ""
|
|
||||||
|
|
||||||
cusdis.legal_info:
|
|
||||||
type: textarea
|
|
||||||
label: Cusdis legal info
|
|
||||||
size: big
|
|
||||||
default: ""
|
|
||||||
|
|
||||||
cusdis.legal_info_en:
|
|
||||||
type: textarea
|
|
||||||
label: Cusdis legal info EN
|
|
||||||
help: English version of the previous field
|
|
||||||
size: big
|
|
||||||
default: ""
|
|
||||||
|
|
||||||
cusdis.lang:
|
cusdis.lang:
|
||||||
type: textarea
|
type: textarea
|
||||||
@@ -288,10 +254,3 @@ form:
|
|||||||
help: More info at https://cusdis.com/doc#/advanced/i18n?id=contributing-more-languages
|
help: More info at https://cusdis.com/doc#/advanced/i18n?id=contributing-more-languages
|
||||||
size: big
|
size: big
|
||||||
default: ""
|
default: ""
|
||||||
|
|
||||||
cusdis.lang_en:
|
|
||||||
type: textarea
|
|
||||||
label: Cusdis language override EN
|
|
||||||
help: English version of the previous field
|
|
||||||
size: big
|
|
||||||
default: ""
|
|
||||||
|
|||||||
16
paxover.yaml
16
paxover.yaml
@@ -7,15 +7,14 @@ contact:
|
|||||||
contact_en:
|
contact_en:
|
||||||
lang_title_en:
|
lang_title_en:
|
||||||
blog:
|
blog:
|
||||||
slug: /blog
|
slug:
|
||||||
tag_title: "Tag:"
|
tag_title:
|
||||||
pagination_limit: 7
|
tags_title:
|
||||||
|
series_title:
|
||||||
|
pagination_limit:
|
||||||
pagination_newer:
|
pagination_newer:
|
||||||
pagination_newer_en:
|
|
||||||
pagination_older:
|
pagination_older:
|
||||||
pagination_older_en:
|
|
||||||
share:
|
share:
|
||||||
share_en:
|
|
||||||
share_buttons:
|
share_buttons:
|
||||||
footer:
|
footer:
|
||||||
title:
|
title:
|
||||||
@@ -26,10 +25,5 @@ cusdis:
|
|||||||
domain:
|
domain:
|
||||||
app_id:
|
app_id:
|
||||||
title:
|
title:
|
||||||
title_en:
|
|
||||||
disable_comments:
|
disable_comments:
|
||||||
disable_comments_en:
|
|
||||||
lang:
|
lang:
|
||||||
lang_en:
|
|
||||||
legal_info:
|
|
||||||
legal_info_en:
|
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
|
|
||||||
{% extends 'partials/base.html.twig' %}
|
|
||||||
|
|
||||||
{% if uri.param('tag') %}
|
|
||||||
{% set page_title = theme_config.blog.tag_title | default('Tag: ') ~ uri.param('tag') %}
|
|
||||||
{% else %}
|
|
||||||
{% set page_title = theme_config.blog.title | default('Blog') %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
{% set collection = page.collection({
|
|
||||||
'items': '@self.children',
|
|
||||||
'pagination': true,
|
|
||||||
'order': {'by': 'date', 'dir': 'desc'},
|
|
||||||
'limit': theme_config.blog.pagination_limit})
|
|
||||||
%}
|
|
||||||
{% set itemsInCollection = page.collection({'items': collection.params.items})|length %}
|
|
||||||
{% set currentPage = uri.param('page')|default('1') %}
|
|
||||||
{% set itemsPerPage = collection.params.limit %}
|
|
||||||
{% set pagesInCollection = (itemsInCollection / itemsPerPage)|round(0, 'ceil') %}
|
|
||||||
|
|
||||||
{% if page_title == 'Blog' %}
|
|
||||||
{{ page.content | raw }}
|
|
||||||
{% else %}
|
|
||||||
<h2>{{ page_title }}</h2>
|
|
||||||
{% endif %}
|
|
||||||
<div class="blog">
|
|
||||||
{% for child in collection %}
|
|
||||||
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if itemsInCollection > itemsPerPage %}
|
|
||||||
<div class="pagination">
|
|
||||||
{% if currentPage != '1' %}
|
|
||||||
<span class="pagination-newer"><a href="{{ page.url(true) ~ '/page' ~ system.param_sep ~ (currentPage - 1) }}">{{ theme_config.blog.pagination_newer_en }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
{% if (currentPage + 1) <= pagesInCollection %}
|
|
||||||
<span class="pagination-older"><a href="{{ page.url(true) ~ '/page' ~ system.param_sep ~ (currentPage + 1) }}">{{ theme_config.blog.pagination_older_en}}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{% extends 'partials/base.html.twig' %}
|
|
||||||
{% set page_title = 'Error 404' %}
|
|
||||||
{% block content %}
|
|
||||||
<h2>Error 404</h2>
|
|
||||||
<p>This page doesn't exist</p>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{% if theme_config.cusdis.domain %}
|
|
||||||
<h2 class="left">{{ theme_config.cusdis.title_en|raw }}</h2>
|
|
||||||
{% if page.header.disableComments %}
|
|
||||||
<p class="left">{{ theme_config.cusdis.disable_comments_en|raw }}</p>
|
|
||||||
{% else %}
|
|
||||||
{% if theme_config.cusdis.lang_en %}
|
|
||||||
<script>{{ theme_config.cusdis.lang_en|raw }}</script>
|
|
||||||
{% endif %}
|
|
||||||
<div id="cusdis_thread"
|
|
||||||
data-host="https://{{ theme_config.cusdis.domain }}"
|
|
||||||
data-app-id="{{ theme_config.cusdis.app_id }}"
|
|
||||||
data-page-id="{{ page.slug }}"
|
|
||||||
data-page-url="{{ page.url(true) }}"
|
|
||||||
data-page-title="{{ page.title }}"
|
|
||||||
data-theme="auto"
|
|
||||||
></div>
|
|
||||||
<script async defer src="https://{{ theme_config.cusdis.domain }}/js/cusdis.es.js"></script>
|
|
||||||
{% if theme_config.cusdis.legal_info_en %}
|
|
||||||
<p class="annotation">{{ theme_config.cusdis.legal_info_en|raw }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<div class="left">
|
|
||||||
<h2>{{ theme_config.blog.share_en|raw }}</h2>
|
|
||||||
<div class="share">
|
|
||||||
{% for button in theme_config.blog.share_buttons %}
|
|
||||||
<a class="btn {{ button.class }}" target="_blank" rel="nofollow noopener noreferrer" href="{{ button.link }}?{{ button.url_param }}={{ page.url(true) }}" title="{{ button.title_en }}">{{ button.name }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -15,8 +15,5 @@
|
|||||||
data-theme="auto"
|
data-theme="auto"
|
||||||
></div>
|
></div>
|
||||||
<script async defer src="https://{{ theme_config.cusdis.domain }}/js/cusdis.es.js"></script>
|
<script async defer src="https://{{ theme_config.cusdis.domain }}/js/cusdis.es.js"></script>
|
||||||
{% if theme_config.cusdis.legal_info %}
|
|
||||||
<p class="annotation">{{ theme_config.cusdis.legal_info|raw }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Reference in New Issue
Block a user