Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"url": "https://github.com/NodeBB/nodebb-theme-lavender/issues"
},
"nbbpm": {
"compatibility": "^4.12.0"
"compatibility": "^4.14.0"
}
}
6 changes: 3 additions & 3 deletions templates/header.tpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="{function.localeToHTML, userLang, defaultLang}" {{{if languageDirection}}}data-dir="{languageDirection}" style="direction: {languageDirection};"{{{end}}}>
<html lang="{localeToHTML(userLang, defaultLang)}" {{{if languageDirection}}}data-dir="{languageDirection}" style="direction: {languageDirection};"{{{end}}}>
<head>
<title>{browserTitle}</title>
{{{each metaTags}}}{function.buildMetaTag}{{{end}}}
{{{each metaTags}}}{{buildMetaTag(@value)}}{{{end}}}
<link rel="stylesheet" type="text/css" href="{relative_path}/assets/client{{{if bootswatchSkin}}}-{bootswatchSkin}{{{end}}}{{{ if (languageDirection=="rtl") }}}-rtl{{{ end }}}.css?{config.cache-buster}" />
{{{each linkTags}}}{function.buildLinkTag}{{{end}}}
{{{each linkTags}}}{{buildLinkTag(@value)}}{{{end}}}

<script>
var config = JSON.parse('{{configJSON}}');
Expand Down
10 changes: 5 additions & 5 deletions templates/partials/category_child.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
<div class="category-box position-relative card border-0 p-0">
<div class="category-info p-2">
<a class="d-block text-truncate fw-bold mb-2 fs-4" href="{{{ if ./link }}}{./link}{{{ else }}}{config.relative_path}/category/{./slug}{{{ end }}}" itemprop="url">
{{{ if ./icon }}}<i class="fa {./icon} visible-xs-inline"></i> {{{ end }}}{./name}
{{{ if ./icon }}}<i class="fa {./icon} visible-xs-inline"></i> {{{ end }}}{tx(./name)}
</a>
<div class="description ms-0 mb-1" itemprop="description">{./descriptionParsed}</div>
<div class="description ms-0 mb-1" itemprop="description">{{./descriptionParsed}}</div>
<!-- subcategories -->
<div class="">
{{{ each ./children }}}
<div class="mb-1">
{buildCategoryIcon(@value, "24px", "rounded-circle")} <a href="{{{ if ./link }}}{./link}{{{ else }}}{config.relative_path}/category/{./slug}{{{ end }}}" class="text-muted">{./name}</a>
{{buildCategoryIcon(@value, "24px", "rounded-circle")}} <a href="{{{ if ./link }}}{./link}{{{ else }}}{config.relative_path}/category/{./slug}{{{ end }}}" class="text-muted">{tx(./name)}</a>
</div>
{{{ end }}}
</div>
Expand All @@ -48,11 +48,11 @@
<hr class="mb-2 mt-1" />
<div class="d-flex gap-1">
<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./user, "24px", true)}
{{buildAvatar(./user, "24px", true)}}
</a>
<div class="post-preview-content overflow-hidden">
<div class="content">
{./content}
{{./content}}
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions templates/partials/topic/post.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="topic-profile-pic d-none d-lg-flex flex-column align-items-center sticky-top" style="top: 6rem; z-index: 1;">
<div class="d-flex flex-column align-items-center">
<a class="d-block img-thumbnail rounded-circle" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./user, "70px", false, "", "user/picture")}
{{buildAvatar(./user, "70px", false, "", "user/picture")}}
</a>

<small class="username text-center" title="{posts.user.username}" style="max-width: 70px;"><a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{./user.username}</a></small>
Expand Down Expand Up @@ -45,15 +45,15 @@
<div class="d-flex d-lg-none mb-2">
<div class="d-flex gap-2 align-items-center text-sm">
<a class="d-block rounded-circle" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./user, "20px", false, "", "user/picture")}
{{buildAvatar(./user, "20px", false, "", "user/picture")}}
</a>

<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" class="username text-center text-nowrap" title="{posts.user.username}" style="max-width: 70px;">{./user.username}</a>
</div>
</div>
<div component="post/content" class="post-content" itemprop="text">{posts.content}</div>
<div component="post/content" class="post-content" itemprop="text">{{posts.content}}</div>
<!-- IF posts.user.signature -->
<div class="post-signature">{posts.user.signature}</div>
<div class="post-signature">{{posts.user.signature}}</div>
<!-- ENDIF posts.user.signature -->
</div>
</div>
Expand Down Expand Up @@ -81,7 +81,7 @@

<!-- IF posts.user.custom_profile_info.length -->
{{{ each custom_profile_info}}}
&bull; {posts.user.custom_profile_info.content}
&bull; {{posts.user.custom_profile_info.content}}
{{{ end }}}
<!-- ENDIF posts.user.custom_profile_info.length -->
<span class="d-flex flex-nowrap gap-2 post-tools">
Expand Down
12 changes: 6 additions & 6 deletions templates/partials/topics_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{{ each topics }}}
<li component="category/topic" class="category-item card card-body px-2 py-0 border-top-0 border-bottom-0 border-end-0 {function.generateTopicClass}" itemprop="itemListElement" <!-- IMPORT partials/data/category.tpl -->>
<a id="{./index}" data-index="{./index}" component="topic/anchor"></a>
<meta itemprop="name" content="{function.stripTags, title}">
<meta itemprop="name" content="{./title}">

<div class="p-2 mb-0">
<div class="row">
Expand All @@ -17,7 +17,7 @@
<!-- IF topics.thumb -->
<img src="{topics.thumb}" class="user-img" title="{topics.user.username}" />
<!-- ELSE -->
{buildAvatar(./user, "48px", true)}
{{buildAvatar(./user, "48px", true)}}
<!-- ENDIF topics.thumb -->
</a>
</div>
Expand All @@ -30,13 +30,13 @@
{{{each topics.icons}}}{@value}{{{end}}}

{{{ if topics.noAnchor }}}
<span class="fs-4 topic-title" component="topic/header">{topics.title}</span><br />
<span class="fs-4 topic-title" component="topic/header">{./title}</span><br />
{{{ else }}}
<a class="fs-4 topic-title" component="topic/header" href="{config.relative_path}/topic/{topics.slug}" itemprop="url">{topics.title}</a><br />
<a class="fs-4 topic-title" component="topic/header" href="{config.relative_path}/topic/{topics.slug}" itemprop="url">{./title}</a><br />
{{{ end }}}

<div class="d-inline-block mb-1">
{buildCategoryIcon(./category, "24px", "rounded-circle")}
{{buildCategoryIcon(./category, "24px", "rounded-circle")}}
<a class="text-muted small" href="{config.relative_path}/category/{topics.category.slug}">{topics.category.name}</a>
</div>
&bull; <span class="timeago small" title="{topics.timestampISO}"></span>
Expand Down Expand Up @@ -78,7 +78,7 @@
<p class="no-replies"><a href="{config.relative_path}/topic/{topics.slug}" itemprop="url">[[category:no-replies]]</a></p>
{{{ else }}}
<a class="me-2" href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./teaser.user, "24px", true)}
{{buildAvatar(./teaser.user, "24px", true)}}
</a>
<a href="{config.relative_path}/topic/{topics.slug}/{topics.teaser.index}">
<span class="timeago" title="{topics.teaser.timestampISO}"></span>
Expand Down
4 changes: 3 additions & 1 deletion templates/topic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
{{widgets.header.html}}
{{{end}}}
</div>
<div class="row">
<div class="row" itemid="{url}" itemscope itemtype="https://schema.org/DiscussionForumPosting">
<!-- IMPORT partials/topics/meta-tags.tpl -->
<div class="topic {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">

<div component="topic/deleted/message" class="alert alert-warning{{{ if !deleted }}} hidden{{{ end }}}">[[topic:deleted-message]]</div>

<ul component="topic" id="post-container" class="posts" data-tid="{tid}">
Expand Down