nodebb-theme-harmony 1.1.78 → 1.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library.js +0 -13
- package/package.json +1 -1
- package/plugin.json +1 -2
- package/scss/category.scss +4 -1
- package/templates/category.tpl +3 -0
- package/templates/flags/detail.tpl +1 -0
- package/templates/partials/breadcrumbs-json-ld.tpl +26 -0
- package/templates/partials/breadcrumbs.tpl +1 -1
- package/templates/post-queue.tpl +0 -2
- package/templates/topic.tpl +1 -0
package/library.js
CHANGED
|
@@ -186,16 +186,3 @@ library.filterMiddlewareRenderHeader = async function (hookData) {
|
|
|
186
186
|
return hookData;
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
library.removeFinalBreadcrumb = async (hookData) => {
|
|
190
|
-
const { templateData } = hookData;
|
|
191
|
-
const { breadcrumbs } = templateData;
|
|
192
|
-
|
|
193
|
-
const applyTo = ['category', 'topic'];
|
|
194
|
-
|
|
195
|
-
// Remove the last breadcrumb (the current page) as it is not part of Harmony's design
|
|
196
|
-
if (applyTo.includes(hookData.templateData.template.name) && breadcrumbs && breadcrumbs.length) {
|
|
197
|
-
breadcrumbs.pop();
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return hookData;
|
|
201
|
-
};
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
{ "hook": "filter:settings.get", "method": "getAdminSettings"},
|
|
9
9
|
{ "hook": "filter:user.saveSettings", "method": "saveUserSettings" },
|
|
10
10
|
{ "hook": "filter:user.profileMenu", "method": "addProfileItem" },
|
|
11
|
-
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" }
|
|
12
|
-
{ "hook": "filter:middleware.render", "method": "removeFinalBreadcrumb" }
|
|
11
|
+
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" }
|
|
13
12
|
],
|
|
14
13
|
"scripts": [
|
|
15
14
|
"public/harmony.js"
|
package/scss/category.scss
CHANGED
package/templates/category.tpl
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<!-- IMPORT partials/breadcrumbs.tpl -->
|
|
2
|
+
|
|
3
|
+
<!-- IMPORT partials/breadcrumbs-json-ld.tpl -->
|
|
4
|
+
|
|
2
5
|
<div class="category-header d-flex flex-column gap-2">
|
|
3
6
|
<div class="d-flex gap-2 align-items-center mb-1 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
|
|
4
7
|
{buildCategoryIcon(@value, "40px", "rounded-1 flex-shrink-0")}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<button type="button" class="btn btn-ghost border btn-sm justify-content-start dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
14
14
|
<i class="fa fa-fw fa-street-view text-primary"></i>
|
|
15
15
|
[[flags:flagged-user]]
|
|
16
|
+
<i class="fa fa-chevron-right ms-auto text-secondary"></i>
|
|
16
17
|
</button>
|
|
17
18
|
<ul class="dropdown-menu p-1 text-sm">
|
|
18
19
|
<li><a class="dropdown-item rounded-1" href="{config.relative_path}/uid/{target.uid}">[[flags:view-profile]]</a></li>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script type="application/ld+json">
|
|
2
|
+
{
|
|
3
|
+
"@context": "https://schema.org",
|
|
4
|
+
"@type": "BreadcrumbList",
|
|
5
|
+
"itemListElement": [
|
|
6
|
+
{
|
|
7
|
+
"@type": "ListItem",
|
|
8
|
+
"position": 1,
|
|
9
|
+
"name": "{config.siteTitle}",
|
|
10
|
+
"item": "/"
|
|
11
|
+
},
|
|
12
|
+
{{{ each breadcrumbs }}}
|
|
13
|
+
{{{ if !@first}}}
|
|
14
|
+
{
|
|
15
|
+
"@type": "ListItem",
|
|
16
|
+
"position": {increment(@index, "1")},
|
|
17
|
+
"name": "{./text}"
|
|
18
|
+
{{{ if !@last }}}
|
|
19
|
+
,"item": "{./url}"
|
|
20
|
+
{{{ end }}}
|
|
21
|
+
},
|
|
22
|
+
{{{ end }}}
|
|
23
|
+
{{{ end }}}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<ol class="breadcrumb mb-0 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}" itemscope="itemscope" itemprop="breadcrumb" itemtype="http://schema.org/BreadcrumbList">
|
|
3
3
|
{{{ each breadcrumbs }}}
|
|
4
4
|
<li{{{ if @last }}} component="breadcrumb/current"{{{ end }}} itemscope="itemscope" itemprop="itemListElement" itemtype="http://schema.org/ListItem" class="breadcrumb-item {{{ if @last }}}active{{{ end }}}">
|
|
5
|
-
<meta itemprop="position" content="{@index}" />
|
|
5
|
+
<meta itemprop="position" content="{increment(@index, "1")}" />
|
|
6
6
|
{{{ if ./url }}}<a href="{./url}" itemprop="item">{{{ end }}}
|
|
7
7
|
<span class="fw-semibold" itemprop="name">{./text}</span>
|
|
8
8
|
{{{ if ./url }}}</a>{{{ end }}}
|
package/templates/post-queue.tpl
CHANGED
package/templates/topic.tpl
CHANGED