nodebb-theme-harmony 1.1.79 → 1.1.81

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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.1.79",
3
+ "version": "1.1.81",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.5.0"
6
6
  },
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"
@@ -1 +1,4 @@
1
- .category-header .description p { margin: 0; }
1
+ .category-header .description p { margin: 0; }
2
+ .page-category .breadcrumb .breadcrumb-item:last-child {
3
+ display: none;
4
+ }
@@ -1,4 +1,6 @@
1
+ <!-- IMPORT partials/breadcrumbs-json-ld.tpl -->
1
2
  <!-- IMPORT partials/breadcrumbs.tpl -->
3
+
2
4
  <div class="category-header d-flex flex-column gap-2">
3
5
  <div class="d-flex gap-2 align-items-center mb-1 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
4
6
  {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 }}}
@@ -1,3 +1,4 @@
1
+ <!-- IMPORT partials/breadcrumbs-json-ld.tpl -->
1
2
  {{{ if widgets.header.length }}}
2
3
  <div data-widget-area="header">
3
4
  {{{each widgets.header}}}