fediparty/themes/starter/layout/_partial/world.ejs

78 lines
2.1 KiB
Plaintext
Raw Normal View History

2018-03-12 19:31:14 +00:00
<%
const network = page.network;
const w = network + 'World';
const world = site.data.worldi18n.worlds[w];
const data = site.data[network].data;
const numbers = site.data.numbers.list[network];
const stars = data.notable;
const reading = world.reading;
%>
<section class="section-hero">
<h3>
<span><%- __('total') %></span><span> ~ <%= numbers.population %></span><span><%- __('accounts') %></span><sup>[1]</sup>
</h3>
<% if (numbers.activeUsers) { %>
2018-03-12 19:31:14 +00:00
<h3>
<span><%- __('active') %></span><span> ~ <%= numbers.activeUsers %></span><span><%- __('people') %></span><sup>[2]</sup>
</h3>
<% } %>
<h3>
<span><%- __('servers') %></span><span> > <%= numbers.podsNum %></span><span><%- __('instances') %></span><sup>
<% if (numbers.activeUsers) { %>[3] <% } else { %> [2] <% } %>
2018-03-12 19:31:14 +00:00
</sup>
</h3>
</section>
<div class="section-title">
<h2><%- __('world') %></h2>
</div>
<div class="section-wrapper">
<div class="column">
<div class="section">
<h4><%- __('mascot') %></h4><span><%= world.mascot %></span>
</div>
<div class="section">
<h4><%- __('dwellers') %></h4><span><%= world.dwellers %></span>
</div>
</div>
<div class="column">
<div class="section">
<h4><%- __('communities') %></h4>
<% if (data.communities) { %>
2018-03-13 22:00:49 +00:00
<span><a href="<%= data.communities %>"><%= world.communities %></a></span>
2018-03-12 19:31:14 +00:00
<% } else { %>
<span class="u-temp"><%- __('soon') %></span>
<% } %>
</div>
</div>
</div>
2018-03-27 00:50:09 +00:00
<p class="description"><%= world.descr %> <a href="<%= data.official %>">Join <%= network %> today!</a></p>
2018-03-12 19:31:14 +00:00
<% if (stars) { %>
2018-03-12 19:31:14 +00:00
<div class="section u-block with-image">
<h4><%- __('stars') %></h4>
<ul class="section-list">
<% for (item in stars) { %>
<li class="u-inline">
<a href="<%= stars[item].url %>"><img src="<%= stars[item].avatar %>" alt="user"></a>
</li>
<% } %>
</ul>
</div>
<% } %>
<% if (reading) { %>
2018-03-12 19:31:14 +00:00
<div class="section u-block">
<h4><%- __('reading') %></h4>
<ul>
<% for (item in reading) { %>
<li><a href="<%= reading[item].url %>"><%= reading[item].title %></a></li>
<% } %>
</ul>
</div>
<% } %>