Fixed forum index on Misaki

Signed-off-by: Flashwave <me@flash.moe>
This commit is contained in:
flash 2015-11-22 23:35:19 +01:00
parent 891ba36485
commit 6ee42c62b5
4 changed files with 53 additions and 48 deletions

View file

@ -1,5 +1,19 @@
<div class="forumListing"> <div class="forumListing">
{% for category in board.forums %} {% for forum in forum.forums %}
{% if forum.type == 1 %}
{% if forum.forums|length %}
<div class="forumCategory">
<div class="forumCategoryHead">
<div class="forumCategoryTitle">{% if forum.type != 1 %}Subforums{% else %}<a href="{{ urls.format('FORUM_SUB', [forum.id]) }}">{{ forum.name }}</a>{% endif %}</div>
<div class="forumCategoryDescription">{{ forum.description }}</div>
</div>
{% for forum in forum.forums %}
{% include 'forum/forumEntry.tpl' %} {% include 'forum/forumEntry.tpl' %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %}
{% else %}
{% include 'forum/forumEntry.tpl' %}
{% endif %}
{% endfor %}
</div>

View file

@ -1,22 +1,15 @@
{% if category.forums|length and category.forum|length %}
<div class="forumCategory">
<div class="forumCategoryHead">
<div class="forumCategoryTitle">{% if category.forum.forum_type != 1 %}Subforums{% else %}<a href="{{ urls.format('FORUM_SUB', [category.forum.forum_id]) }}">{{ category.forum.forum_name }}</a>{% endif %}</div>
<div class="forumCategoryDescription">{{ category.forum.forum_desc }}</div>
</div>
{% for forum in category.forums %}
<div class="forumSubEntry"> <div class="forumSubEntry">
<a href="{% if forum.forum_type == 2 %}{{ forum.forum_link }}{% else %}{{ urls.format('FORUM_SUB', [forum.forum_id]) }}{% endif %}" class="forumSubIcon"> <a href="{% if forum.forum_type == 2 %}{{ forum.forum_link }}{% else %}{{ urls.format('FORUM_SUB', [forum.forum_id]) }}{% endif %}" class="forumSubIcon">
<div class="forumIcon fa fa-3x {% if forum.forum_icon %}{{ forum.forum_icon }}{% else %}{% if forum.forum_type == 2 %}fa-chevron-circle-right{% elseif forum.forum_type == 1 %}fa-folder{% else %}fa-comments{% endif %}{% endif %}"></div> <div class="forumIcon fa fa-3x {% if forum.icon %}{{ forum.icon }}{% else %}{% if forum.type == 2 %}fa-chevron-circle-right{% elseif forum.type == 1 %}fa-folder{% else %}fa-comments{% endif %}{% endif %}"></div>
</a> </a>
<div class="forumSubTitle"> <div class="forumSubTitle">
<a href="{% if forum.forum_type == 2 %}{{ forum.forum_link }}{% else %}{{ urls.format('FORUM_SUB', [forum.forum_id]) }}{% endif %}" class="forumSubName">{{ forum.forum_name }}</a> <a href="{% if forum.type == 2 %}{{ forum.link }}{% else %}{{ urls.format('FORUM_SUB', [forum.id]) }}{% endif %}" class="forumSubName">{{ forum.name }}</a>
<div class="forumSubDesc"> <div class="forumSubDesc">
{{ forum.forum_desc }} {{ forum.description }}
{% if board.forums[forum.forum_id]|length %} {% if forum.forums|length %}
<ul class="forumSubSubforums"> <ul class="forumSubSubforums">
{% for forum in board.forums[forum.forum_id].forums %} {% for forum in forum.forums %}
<li><a href="{% if forum.forum_type == 2 %}{{ forum.forum_link }}{% else %}{{ urls.format('FORUM_SUB', [forum.forum_id]) }}{% endif %}" class="default">{{ forum.forum_name }}</a></li> <li><a href="{% if forum.type == 2 %}{{ forum.link }}{% else %}{{ urls.format('FORUM_SUB', [forum.id]) }}{% endif %}" class="default">{{ forum.name }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
@ -24,15 +17,15 @@
</div> </div>
{% if forum.forum_type != 2 %} {% if forum.forum_type != 2 %}
<div class="forumSubStats"> <div class="forumSubStats">
<div class="forumSubTopics" title="Amount of topics in this forum.">{{ forum.topic_count }}</div> <div class="forumSubTopics" title="Amount of threads in this forum.">{{ forum.threadCount }}</div>
<div class="forumSubStatsSeperator">/</div> <div class="forumSubStatsSeperator">/</div>
<div class="forumSubPosts" title="Amount of posts in this forum.">{{ forum.post_count }}</div> <div class="forumSubPosts" title="Amount of posts in this forum.">{{ forum.postCount }}</div>
</div> </div>
<div class="forumSubReplies"> <div class="forumSubReplies">
<div> <div>
{% if forum.last_post.post_id %} {% if forum.lastPost.id %}
<a href="{{ urls.format('FORUM_THREAD', [forum.last_post.topic_id]) }}" class="default">{{ forum.last_post.post_subject }}</a><br /> <a href="{{ urls.format('FORUM_THREAD', [forum.lastPost.thread]) }}" class="default">{{ forum.lastPost.subject|slice(0, 25) }}{% if forum.lastPost.subject|length > 25 %}...{% endif %}</a><br />
<span title="{{ forum.last_post.post_time|date(sakura.dateFormat) }}">{{ forum.last_post.elapsed }}</span> by {% if forum.last_poster.id %}<a href="{{ urls.format('USER_PROFILE', [forum.last_poster.id]) }}" class="default" style="color: {{ forum.last_poster.colour }}; text-shadow: 0 0 5px {% if forum.last_poster.colour != 'inherit' %}{{ forum.last_poster.colour }}{% else %}#222{% endif %};">{{ forum.last_poster.username }}</a>{% else %}[deleted user]{% endif %} <a href="{{ urls.format('FORUM_POST', [forum.last_post.post_id]) }}#p{{ forum.last_post.post_id }}" class="default fa fa-tag"></a> <span title="{{ forum.lastPost.time|date(sakura.dateFormat) }}">{{ forum.lastPost.timeElapsed }}</span> by {% if forum.lastPost.poster.id %}<a href="{{ urls.format('USER_PROFILE', [forum.lastPost.poster.id]) }}" class="default" style="color: {{ forum.lastPost.poster.colour }}; text-shadow: 0 0 5px {% if forum.lastPost.poster.colour != 'inherit' %}{{ forum.lastPost.poster.colour }}{% else %}#222{% endif %};">{{ forum.lastPost.poster.username }}</a>{% else %}[deleted user]{% endif %} <a href="{{ urls.format('FORUM_POST', [forum.lastPost.id]) }}#p{{ forum.lastPost.id }}" class="default fa fa-tag"></a>
{% else %} {% else %}
There are no posts in this forum. There are no posts in this forum.
{% endif %} {% endif %}
@ -40,6 +33,3 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% endfor %}
</div>
{% endif %}

View file

@ -127,7 +127,7 @@
<div class="inner"> <div class="inner">
<div class="ft-logo"></div> <div class="ft-logo"></div>
<div class="ft-text"> <div class="ft-text">
<div>Copyright &copy; 2013-2015 <a href="http://flash.moe/" target="_blank">Flashwave</a>, <a href="http://circlestorm.net/" target="_blank">et al</a>.</div> <div>Powered by <a href="https://github.com/flashwave/sakura/" target="_blank">Sakura</a>, <a href="http://flash.moe/" target="_blank">Flashwave</a> 2013-2015</div>
<div><a href="{{ urls.format('INFO_PAGE', ['terms']) }}">Terms of Service</a> | <a href="{{ urls.format('INFO_PAGE', ['contact']) }}">Contact</a> | <a href="{{ urls.format('SITE_FAQ') }}">FAQ</a> | <a href="{{ urls.format('INFO_PAGE', ['rules']) }}">Rules</a> | <a href="https://sakura.flash.moe/">Changelog</a> | <a href="https://fiistat.us/">Status</a></div> <div><a href="{{ urls.format('INFO_PAGE', ['terms']) }}">Terms of Service</a> | <a href="{{ urls.format('INFO_PAGE', ['contact']) }}">Contact</a> | <a href="{{ urls.format('SITE_FAQ') }}">FAQ</a> | <a href="{{ urls.format('INFO_PAGE', ['rules']) }}">Rules</a> | <a href="https://sakura.flash.moe/">Changelog</a> | <a href="https://fiistat.us/">Status</a></div>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
/* /*
* Sakura Misaki Style * Sakura Misaki Style
* By Flashwave <http://flash.moe> * By Flashwave <http://flash.moe>
*/ */
@ -170,8 +170,9 @@ a:active {
} }
#footer > .inner { #footer > .inner {
max-width: 1024px; max-width: 976px;
margin: 0 auto; margin: 0 auto;
padding: 0 24px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;