nodebb-theme-harmony 2.0.0-pre.27 → 2.0.0-pre.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/templates/topic.tpl +80 -75
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "2.0.0-pre.27",
3
+ "version": "2.0.0-pre.29",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.7.0"
6
6
  },
@@ -10,97 +10,102 @@
10
10
  </div>
11
11
  {{{ end }}}
12
12
 
13
- <div class="d-flex flex-column gap-3" itemid="{url}" itemscope itemtype="https://schema.org/DiscussionForumPosting">
13
+ <div itemid="{url}" itemscope itemtype="https://schema.org/DiscussionForumPosting">
14
14
  <meta itemprop="headline" content="{escape(titleRaw)}">
15
+ <meta itemprop="text" content="{escape(titleRaw)}">
15
16
  <meta itemprop="url" content="{url}">
16
17
  <meta itemprop="datePublished" content="{timestampISO}">
17
18
  <meta itemprop="dateModified" content="{lastposttimeISO}">
18
- <meta itemprop="author" itemscope itemtype="https://schema.org/Person" itemref="topicAuthorName{{{ if author.userslug }}} topicAuthorUrl{{{ end }}}">
19
- <meta id="topicAuthorName" itemprop="name" content="{author.username}">
20
- {{{ if author.userslug }}}<meta id="topicAuthorUrl" itemprop="url" content="{config.relative_path}/user/{author.userslug}">{{{ end }}}
21
- <div class="d-flex flex-wrap">
22
- <div class="d-flex flex-column gap-3 flex-grow-1">
23
- <h1 component="post/header" class="tracking-tight fw-semibold fs-3 mb-0 text-break {{{ if config.theme.centerHeaderElements }}}text-center{{{ end }}}">
24
- <span class="topic-title" component="topic/title">{title}</span>
25
- </h1>
19
+ <div itemprop="author" itemscope itemtype="https://schema.org/Person">
20
+ <meta itemprop="name" content="{author.username}">
21
+ {{{ if author.userslug }}}<meta itemprop="url" content="{config.relative_path}/user/{author.userslug}">{{{ end }}}
22
+ </div>
26
23
 
27
- <div class="topic-info d-flex gap-2 align-items-center flex-wrap {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
28
- <span component="topic/labels" class="d-flex gap-2 {{{ if (!scheduled && (!pinned && (!locked && (!oldCid && !icons.length)))) }}}hidden{{{ end }}}">
29
- <span component="topic/scheduled" class="badge badge border border-gray-300 text-body {{{ if !scheduled }}}hidden{{{ end }}}">
30
- <i class="fa fa-clock-o"></i> [[topic:scheduled]]
31
- </span>
32
- <span component="topic/pinned" class="badge badge border border-gray-300 text-body {{{ if (scheduled || !pinned) }}}hidden{{{ end }}}">
33
- <i class="fa fa-thumb-tack"></i> {{{ if !pinExpiry }}}[[topic:pinned]]{{{ else }}}[[topic:pinned-with-expiry, {isoTimeToLocaleString(./pinExpiryISO, config.userLang)}]]{{{ end }}}
34
- </span>
35
- <span component="topic/locked" class="badge badge border border-gray-300 text-body {{{ if !locked }}}hidden{{{ end }}}">
36
- <i class="fa fa-lock"></i> [[topic:locked]]
24
+ <div class="d-flex flex-column gap-3">
25
+ <div class="d-flex flex-wrap">
26
+ <div class="d-flex flex-column gap-3 flex-grow-1">
27
+ <h1 component="post/header" class="tracking-tight fw-semibold fs-3 mb-0 text-break {{{ if config.theme.centerHeaderElements }}}text-center{{{ end }}}">
28
+ <span class="topic-title" component="topic/title">{title}</span>
29
+ </h1>
30
+
31
+ <div class="topic-info d-flex gap-2 align-items-center flex-wrap {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
32
+ <span component="topic/labels" class="d-flex gap-2 {{{ if (!scheduled && (!pinned && (!locked && (!oldCid && !icons.length)))) }}}hidden{{{ end }}}">
33
+ <span component="topic/scheduled" class="badge badge border border-gray-300 text-body {{{ if !scheduled }}}hidden{{{ end }}}">
34
+ <i class="fa fa-clock-o"></i> [[topic:scheduled]]
35
+ </span>
36
+ <span component="topic/pinned" class="badge badge border border-gray-300 text-body {{{ if (scheduled || !pinned) }}}hidden{{{ end }}}">
37
+ <i class="fa fa-thumb-tack"></i> {{{ if !pinExpiry }}}[[topic:pinned]]{{{ else }}}[[topic:pinned-with-expiry, {isoTimeToLocaleString(./pinExpiryISO, config.userLang)}]]{{{ end }}}
38
+ </span>
39
+ <span component="topic/locked" class="badge badge border border-gray-300 text-body {{{ if !locked }}}hidden{{{ end }}}">
40
+ <i class="fa fa-lock"></i> [[topic:locked]]
41
+ </span>
42
+ <a component="topic/moved" href="{config.relative_path}/category/{oldCid}" class="badge badge border border-gray-300 text-body text-decoration-none {{{ if (!oldCid || (oldCid == "-1")) }}}hidden{{{ end }}}">
43
+ <i class="fa fa-arrow-circle-right"></i> {{{ if privileges.isAdminOrMod }}}[[topic:moved-from, {oldCategory.name}]]{{{ else }}}[[topic:moved]]{{{ end }}}
44
+ </a>
45
+ {{{each icons}}}<span class="lh-1">{@value}</span>{{{end}}}
37
46
  </span>
38
- <a component="topic/moved" href="{config.relative_path}/category/{oldCid}" class="badge badge border border-gray-300 text-body text-decoration-none {{{ if (!oldCid || (oldCid == "-1")) }}}hidden{{{ end }}}">
39
- <i class="fa fa-arrow-circle-right"></i> {{{ if privileges.isAdminOrMod }}}[[topic:moved-from, {oldCategory.name}]]{{{ else }}}[[topic:moved]]{{{ end }}}
40
- </a>
41
- {{{each icons}}}<span class="lh-1">{@value}</span>{{{end}}}
42
- </span>
43
- {function.buildCategoryLabel, category, "a", "border"}
44
- <div data-tid="{./tid}" component="topic/tags" class="lh-1 tags tag-list d-flex flex-wrap hidden-xs hidden-empty gap-2"><!-- IMPORT partials/topic/tags.tpl --></div>
45
- <div class="d-flex hidden-xs gap-2"><!-- IMPORT partials/topic/stats.tpl --></div>
47
+ {function.buildCategoryLabel, category, "a", "border"}
48
+ <div data-tid="{./tid}" component="topic/tags" class="lh-1 tags tag-list d-flex flex-wrap hidden-xs hidden-empty gap-2"><!-- IMPORT partials/topic/tags.tpl --></div>
49
+ <div class="d-flex hidden-xs gap-2"><!-- IMPORT partials/topic/stats.tpl --></div>
50
+ </div>
46
51
  </div>
52
+ <div class="d-flex gap-2 justify-content-end align-items-center mt-2 hidden-empty" component="topic/thumb/list"><!-- IMPORT partials/topic/thumbs.tpl --></div>
47
53
  </div>
48
- <div class="d-flex gap-2 justify-content-end align-items-center mt-2 hidden-empty" component="topic/thumb/list"><!-- IMPORT partials/topic/thumbs.tpl --></div>
49
- </div>
50
54
 
51
- <div class="row mb-4 mb-lg-0">
52
- <div class="topic {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
53
- <!-- IMPORT partials/post_bar.tpl -->
54
- {{{ if merger }}}
55
- <!-- IMPORT partials/topic/merged-message.tpl -->
56
- {{{ end }}}
57
- {{{ if forker }}}
58
- <!-- IMPORT partials/topic/forked-message.tpl -->
59
- {{{ end }}}
60
- {{{ if !scheduled }}}
61
- <!-- IMPORT partials/topic/deleted-message.tpl -->
62
- {{{ end }}}
55
+ <div class="row mb-4 mb-lg-0">
56
+ <div class="topic {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
57
+ <!-- IMPORT partials/post_bar.tpl -->
58
+ {{{ if merger }}}
59
+ <!-- IMPORT partials/topic/merged-message.tpl -->
60
+ {{{ end }}}
61
+ {{{ if forker }}}
62
+ <!-- IMPORT partials/topic/forked-message.tpl -->
63
+ {{{ end }}}
64
+ {{{ if !scheduled }}}
65
+ <!-- IMPORT partials/topic/deleted-message.tpl -->
66
+ {{{ end }}}
63
67
 
64
- <div class="d-flex gap-0 gap-lg-5">
65
- <div class="posts-container" style="min-width: 0;">
66
- <ul component="topic" class="posts timeline list-unstyled mt-sm-2 p-0 py-3" style="min-width: 0;" data-tid="{tid}" data-cid="{cid}">
67
- {{{ each posts }}}
68
- <li component="post" class="pt-4 {{{ if posts.deleted }}}deleted{{{ end }}} {{{ if posts.selfPost }}}self-post{{{ end }}} {{{ if posts.topicOwnerPost }}}topic-owner-post{{{ end }}}" <!-- IMPORT partials/data/topic.tpl -->>
69
- <a component="post/anchor" data-index="{./index}" id="{increment(./index, "1")}"></a>
70
- <meta itemprop="datePublished" content="{./timestampISO}">
71
- {{{ if ./editedISO }}}
72
- <meta itemprop="dateModified" content="{./editedISO}">
73
- {{{ end }}}
68
+ <div class="d-flex gap-0 gap-lg-5">
69
+ <div class="posts-container" style="min-width: 0;">
70
+ <ul component="topic" class="posts timeline list-unstyled mt-sm-2 p-0 py-3" style="min-width: 0;" data-tid="{tid}" data-cid="{cid}">
71
+ {{{ each posts }}}
72
+ <li component="post" class="pt-4 {{{ if posts.deleted }}}deleted{{{ end }}} {{{ if posts.selfPost }}}self-post{{{ end }}} {{{ if posts.topicOwnerPost }}}topic-owner-post{{{ end }}}" <!-- IMPORT partials/data/topic.tpl -->>
73
+ <a component="post/anchor" data-index="{./index}" id="{increment(./index, "1")}"></a>
74
+ <meta itemprop="datePublished" content="{./timestampISO}">
75
+ {{{ if ./editedISO }}}
76
+ <meta itemprop="dateModified" content="{./editedISO}">
77
+ {{{ end }}}
74
78
 
75
- <!-- IMPORT partials/topic/post.tpl -->
76
- </li>
77
- {{{ if (config.topicPostSort != "most_votes") }}}
78
- {{{ each ./events}}}<!-- IMPORT partials/topic/event.tpl -->{{{ end }}}
79
+ <!-- IMPORT partials/topic/post.tpl -->
80
+ </li>
81
+ {{{ if (config.topicPostSort != "most_votes") }}}
82
+ {{{ each ./events}}}<!-- IMPORT partials/topic/event.tpl -->{{{ end }}}
83
+ {{{ end }}}
84
+ {{{ end }}}
85
+ </ul>
86
+ {{{ if browsingUsers }}}
87
+ <div class="visible-xs">
88
+ <!-- IMPORT partials/topic/browsing-users.tpl -->
89
+ <hr/>
90
+ </div>
91
+ {{{ end }}}
92
+ {{{ if config.theme.enableQuickReply }}}
93
+ <!-- IMPORT partials/topic/quickreply.tpl -->
79
94
  {{{ end }}}
80
- {{{ end }}}
81
- </ul>
82
- {{{ if browsingUsers }}}
83
- <div class="visible-xs">
84
- <!-- IMPORT partials/topic/browsing-users.tpl -->
85
- <hr/>
86
95
  </div>
87
- {{{ end }}}
88
- {{{ if config.theme.enableQuickReply }}}
89
- <!-- IMPORT partials/topic/quickreply.tpl -->
90
- {{{ end }}}
96
+
97
+ <!-- IMPORT partials/topic/navigator.tpl -->
91
98
  </div>
92
99
 
93
- <!-- IMPORT partials/topic/navigator.tpl -->
100
+ {{{ if config.usePagination }}}
101
+ <!-- IMPORT partials/paginator.tpl -->
102
+ {{{ end }}}
103
+ </div>
104
+ <div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
105
+ {{{each widgets.sidebar}}}
106
+ {{widgets.sidebar.html}}
107
+ {{{end}}}
94
108
  </div>
95
-
96
- {{{ if config.usePagination }}}
97
- <!-- IMPORT partials/paginator.tpl -->
98
- {{{ end }}}
99
- </div>
100
- <div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
101
- {{{each widgets.sidebar}}}
102
- {{widgets.sidebar.html}}
103
- {{{end}}}
104
109
  </div>
105
110
  </div>
106
111
  </div>