united subcategory and categories into one partial, requires tjs 0.2x
parent
1c9a46b4a7
commit
fa75a1970d
@ -0,0 +1,33 @@
|
||||
<li component="categories/category" data-cid="{../cid}" data-numRecentReplies="1" class="row clearfix">
|
||||
<meta itemprop="name" content="{../name}">
|
||||
|
||||
<div class="col-md-7 col-sm-9 col-xs-11 content">
|
||||
<div class="icon hidden-sm hidden-xs pull-left" style="{function.generateCategoryBackground}">
|
||||
<i class="fa fa-fw {../icon}"></i>
|
||||
</div>
|
||||
|
||||
<h1 class="title pull-left">
|
||||
<!-- IMPORT partials/categories/link.tpl --><br />
|
||||
<small>{../description}</small>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- IF !../link -->
|
||||
<div class="col-md-1 hidden-sm hidden-xs stats">
|
||||
<span class="{../unread-class} human-readable-number" title="{../topic_count}">{../topic_count}</span><br />
|
||||
<small>[[global:topics]]</small>
|
||||
</div>
|
||||
<div class="col-md-1 hidden-sm hidden-xs stats">
|
||||
<span class="{../unread-class} human-readable-number" title="{../post_count}">{../post_count}</span><br />
|
||||
<small>[[global:posts]]</small>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 col-xs-1 teaser">
|
||||
<!-- IMPORT partials/categories/lastpost.tpl -->
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="col-md-2 hidden-sm-hidden-xs"></div>
|
||||
<div class="col-md-3 col-sm-3 col-xs-1 teaser">
|
||||
<div class="card" style="border-color: {../bgColor}"></div>
|
||||
</div>
|
||||
<!-- ENDIF !../link -->
|
||||
</li>
|
@ -1,25 +1,25 @@
|
||||
<div class="card" style="border-color: {categories.bgColor}">
|
||||
<div class="card" style="border-color: {../bgColor}">
|
||||
<!-- BEGIN posts -->
|
||||
<!-- IF @first -->
|
||||
<div component="category/posts">
|
||||
<p>
|
||||
<strong>{categories.posts.user.username}</strong>
|
||||
<a class="permalink" href="{config.relative_path}/topic/{categories.posts.topic.slug}<!-- IF categories.posts.index -->/{categories.posts.index}<!-- ENDIF categories.posts.index -->">
|
||||
<small class="timeago" title="{categories.posts.relativeTime}"></small>
|
||||
<strong>{../user.username}</strong>
|
||||
<a class="permalink" href="{config.relative_path}/topic/{../topic.slug}<!-- IF ../index -->/{../index}<!-- ENDIF ../index -->">
|
||||
<small class="timeago" title="{../relativeTime}"></small>
|
||||
</a>
|
||||
</p>
|
||||
<div class="post-content">
|
||||
{categories.posts.content}
|
||||
{../content}
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF @first -->
|
||||
<!-- END posts -->
|
||||
|
||||
<!-- IF !posts.length -->
|
||||
<!-- IF !../posts.length -->
|
||||
<div component="category/posts">
|
||||
<div class="post-content">
|
||||
No new posts.
|
||||
</div>
|
||||
<div>
|
||||
<!-- ENDIF !posts.length -->
|
||||
<!-- ENDIF !../posts.length -->
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
<!-- IF categories.link -->
|
||||
<a href="{categories.link}" itemprop="url" target="_blank">
|
||||
<!-- IF ../link -->
|
||||
<a href="{../link}" itemprop="url" target="_blank">
|
||||
<!-- ELSE -->
|
||||
<a href="{config.relative_path}/category/{categories.slug}" itemprop="url">
|
||||
<!-- ENDIF categories.link -->
|
||||
{categories.name}
|
||||
<a href="{config.relative_path}/category/{../slug}" itemprop="url">
|
||||
<!-- ENDIF ../link -->
|
||||
{../name}
|
||||
</a>
|
Loading…
Reference in New Issue