flashwave
383e2ed0e0
This one took multiple days and it pretty invasive into the core of Misuzu so issue might (will) arise, there's also some features that have gone temporarily missing in the mean time and some inefficiencies introduced that will be fixed again at a later time. The old class isn't gone entirely because I still have to figure out what I'm gonna do about validation, but for the most part this knocks out one of the "layers of backwards compatibility", as I've been referring to it, and is moving us closer to a future where Flashii actually gets real updates. If you run into anything that's broken and you're inhibited from reporting it through the forum, do it through chat or mail me at flashii-issues@flash.moe.
200 lines
9.3 KiB
Twig
200 lines
9.3 KiB
Twig
{% extends 'home/master.twig' %}
|
|
{% from 'macros.twig' import container_title, avatar %}
|
|
|
|
{% set canonical_url = '/' %}
|
|
|
|
{% set landing_stats = [
|
|
{
|
|
icon: 'fas fa-users fa-fw',
|
|
name: 'members',
|
|
value: statistics['users:active']|number_format,
|
|
},
|
|
{
|
|
icon: 'fas fa-user-check fa-fw',
|
|
name: 'online',
|
|
value: statistics['users:online:recent']|number_format,
|
|
},
|
|
{
|
|
icon: 'fas fa-user-clock fa-fw',
|
|
name: 'active (24 hr)',
|
|
value: statistics['users:online:today']|number_format,
|
|
},
|
|
{
|
|
icon: 'fas fa-list fa-fw',
|
|
name: 'topics',
|
|
value: statistics['forum:topics:visible']|number_format,
|
|
},
|
|
{
|
|
icon: 'fas fa-comments fa-fw',
|
|
name: 'posts',
|
|
value: statistics['forum:posts:visible']|number_format,
|
|
},
|
|
{
|
|
icon: 'fas fa-comment-dots fa-fw',
|
|
name: 'comments',
|
|
value: statistics['comments:posts:visible']|number_format,
|
|
},
|
|
] %}
|
|
|
|
{% block main_header %}
|
|
<div class="landingv2-header">
|
|
<div class="landingv2-header-background"></div>
|
|
<div class="landingv2-header-content">
|
|
<div class="landingv2-welcome">
|
|
<a href="{{ url('index') }}">
|
|
<img src="/images/landing-logo.png" alt="{{ globals.site_name }}">
|
|
</a>
|
|
</div>
|
|
|
|
<div class="landingv2-header-menu">
|
|
{% for item in header_menu[1:] %}
|
|
<a href="{{ item.url }}" class="landingv2-header-menu-link">{{ item.title }}</a>
|
|
{% endfor %}
|
|
|
|
<a href="{{ url('auth-login') }}" class="landingv2-header-menu-link landingv2-auth-link landingv2-auth-link-login">
|
|
<div><i class="fas fa-sign-in-alt fa-fw"></i> Log in</div>
|
|
</a>
|
|
<a href="{{ url('auth-register') }}" class="landingv2-header-menu-link landingv2-auth-link landingv2-auth-link-register">
|
|
<div><i class="fas fa-user-plus fa-fw"></i> Register</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block main_footer %}
|
|
<footer class="landingv2-footer">
|
|
<div class="landingv2-footer-background"></div>
|
|
<div class="landingv2-footer-wrapper">
|
|
<div class="landingv2-footer-navigation">
|
|
{% for item in header_menu[0].menu %}
|
|
<div>
|
|
<a href="{{ item.url }}">{{ item.title }}</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="landingv2-footer-copyright">
|
|
<div class="landingv2-footer-copyright-line">
|
|
<a href="https://flash.moe" target="_blank" rel="noreferrer noopener">Flashwave</a> 2013-{{ ''|date('Y') }}
|
|
</div>
|
|
<div class="landingv2-footer-copyright-line">
|
|
{% set git_branch = git_branch() %}
|
|
{% if git_branch != 'HEAD' %}
|
|
<a href="https://github.com/flashwave/misuzu/tree/{{ git_branch }}" target="_blank" rel="noreferrer noopener">{{ git_branch }}</a>
|
|
{% else %}
|
|
{% set git_tag = git_tag() %}
|
|
<a href="https://github.com/flashwave/misuzu/tree/{{ git_tag }}" target="_blank" rel="noreferrer noopener">{{ git_tag }}</a>
|
|
{% endif %}
|
|
# <a href="https://github.com/flashwave/misuzu/commit/{{ git_commit_hash(true) }}" target="_blank" rel="noreferrer noopener">{{ git_commit_hash() }}</a>
|
|
</div>
|
|
{% if display_debug_info %}
|
|
{% set sql_query_count = sql_query_count() %}
|
|
<div class="landingv2-footer-copyright-line">
|
|
{{ sql_query_count.total|number_format }} (<span title="{{ sql_query_count.ndx|number_format }} queries processed through Index">{{ sql_query_count.ndx|number_format }}</span> + <span title="{{ sql_query_count.pdo|number_format }} queries processed through PDO">{{ sql_query_count.pdo|number_format }}</span>) queries / {{ (startup_time() - startup_time(constant('MSZ_TPL_RENDER')))|number_format(5) }} load / {{ startup_time(constant('MSZ_TPL_RENDER'))|number_format(5) }} render / {{ startup_time()|number_format(5) }} total
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="landingv2-content">
|
|
<div class="landingv2-stats">
|
|
{% for stat in landing_stats %}
|
|
<div class="landingv2-stat">
|
|
<div class="landingv2-stat-icon">
|
|
<i class="{{ stat.icon }}"></i>
|
|
</div>
|
|
<div class="landingv2-stat-value">
|
|
<span class="landingv2-stat-value-num">{{ stat.value }}</span> {{ stat.name }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="landingv2-forum">
|
|
<div class="landingv2-forum-topics landingv2-forum-topics-popular">
|
|
{{ container_title('<i class="fas fa-star fa-fw"></i> Popular Topics') }}
|
|
<div class="landingv2-forum-topics-list">
|
|
{% for topic in forum_popular %}
|
|
<div class="landingv2-forum-topic">
|
|
<a href="{{ url('forum-topic', {'topic': topic.topic_id}) }}" class="landingv2-forum-topic-link"></a>
|
|
<div class="landingv2-forum-topic-info">
|
|
<div class="landingv2-forum-topic-info-icon">
|
|
<i class="{{ topic.forum_icon|default('fas fa-comments fa-fw') }}"></i>
|
|
</div>
|
|
<div class="landingv2-forum-topic-info-details">
|
|
<div class="landingv2-forum-topic-info-details-title">
|
|
{{ topic.topic_title }}
|
|
</div>
|
|
</div>
|
|
<div class="landingv2-forum-topic-info-stats">
|
|
<div class="landingv2-forum-topic-info-stats-posts">{{ topic.topic_count_posts|number_format }}</div>
|
|
<div class="landingv2-forum-topic-info-stats-views">{{ topic.topic_count_views|number_format }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="landingv2-forum-topics landingv2-forum-topics-active">
|
|
{{ container_title('<i class="fas fa-wind fa-fw"></i> Active Topics') }}
|
|
<div class="landingv2-forum-topics-list">
|
|
{% for topic in forum_active %}
|
|
<div class="landingv2-forum-topic">
|
|
<a href="{{ url('forum-post', {'post': topic.latest_post_id}) }}" class="landingv2-forum-topic-link"></a>
|
|
<div class="landingv2-forum-topic-info">
|
|
<div class="landingv2-forum-topic-info-icon">
|
|
<i class="{{ topic.forum_icon|default('fas fa-comments fa-fw') }}"></i>
|
|
</div>
|
|
<div class="landingv2-forum-topic-info-details">
|
|
<div class="landingv2-forum-topic-info-details-title">
|
|
{{ topic.topic_title }}
|
|
</div>
|
|
</div>
|
|
<div class="landingv2-forum-topic-info-stats">
|
|
<div class="landingv2-forum-topic-info-stats-posts">{{ topic.topic_count_posts|number_format }}</div>
|
|
<div class="landingv2-forum-topic-info-stats-views">{{ topic.topic_count_views|number_format }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="landingv2-news">
|
|
{% for post in featured_news %}
|
|
<div class="landingv2-news-post markdown">
|
|
<h1>{{ post.title }}</h1>
|
|
<p>{{ post.firstParagraph|parse_text(2)|raw }}</p>
|
|
<div class="landingv2-news-post-options">
|
|
<a href="{{ url('news-post', {'post': post.id}) }}" class="landingv2-news-post-option">Continue reading</a>
|
|
| <time datetime="{{ post.createdTime|date('c') }}" title="{{ post.createdTime|date('r') }}">{{ post.createdTime|time_format }}</time>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% if online_users|length > 0 %}
|
|
<div class="landingv2-online">
|
|
{{ container_title('<i class="fas fa-users fa-fw"></i> Currently Online') }}
|
|
<div class="landingv2-online-users">
|
|
<div class="landingv2-online-inner">
|
|
{% for user in online_users %}
|
|
<a href="{{ url('user-profile', {'user': user.id}) }}" class="landingv2-online-avatar" title="{{ user.name }}">
|
|
{{ avatar(user.id, 50, user.name) }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if linked_data is defined and linked_data is iterable %}
|
|
<script type="application/ld+json">{ "@context": "http://schema.org", "@type": "Organization", "name": "{{ linked_data.name }}", "url": "{{ linked_data.url }}", "logo": "{{ linked_data.logo }}", "sameAs": ["{{ linked_data.same_as|join('", "')|raw }}"] }</script>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|