fediparty/themes/starter/layout/miscellaneous.ejs

126 lines
6.4 KiB
Plaintext
Raw Normal View History

2018-11-15 22:06:54 +00:00
---
layout: layout
---
<%
function groupByKey(arr, key) {
let results = [];
2020-02-26 22:37:27 +00:00
arr.forEach(function(item) {
let keyValue = item[key];
if (!keyValue) {return};
let check = results.findIndex(function(x) {return x.name === keyValue});
2020-02-26 22:37:27 +00:00
if (check>=0) {
results[check].count +=1;
2020-02-26 22:37:27 +00:00
} else {
let newGroup = {};
newGroup.name = keyValue;
newGroup.count = 1;
results.push(newGroup);
2020-02-26 22:37:27 +00:00
}
});
return results;
2020-02-26 22:37:27 +00:00
}
2020-03-01 20:53:56 +00:00
const apps = site.data.miscellaneous.apps;
const langList = groupByKey(apps, "codeLanguage").sort((a,b) => b.count - a.count);
const licenseList = groupByKey(apps, "license").sort((a,b) => b.count - a.count);
const byCategory = [['snMacro', 'Social network (macro)'], ['snMicro', 'Social network (micro)'], ['blogPub', 'Blog and Publishing'], ['media', 'Media sharing'], ['links', 'Link sharing'], ['evMeet', 'Events and Meetups'], ['files', 'File hosting'], ['data', 'Open data'], ['reviews', 'Reviews and ratings'], ['games', 'Gaming'], ['dev', 'Software development'], ['extend', 'Extensions'], ['forums', 'Forums, boards'], ['econ', 'Economic activities'], ['other', 'Other']];
2020-04-24 22:20:08 +00:00
const byProtocol = [['sortDiaspora', 'diaspora'], ['sortZot', 'Zot'], ['sortAP', 'ActivityPub'], ['sortOstatus', 'OStatus']];
const pattern = /[\s0.-]/g;
2018-11-15 22:06:54 +00:00
%>
<%- partial('_partial/heroheader') %>
<article class="contents misc">
<h2>EXPLORE FEDIVERSE SOFTWARE</h2>
2020-04-24 22:20:08 +00:00
<a class="dark-ui u-block u-center" href="/en/tools" style="border: 0; color: #fb4e4e;">→ Check out other Fediverse Tools ←</a></h5>
2018-11-15 22:06:54 +00:00
2020-02-25 18:45:27 +00:00
<h4>Sort by category:</h4>
2020-04-24 22:20:08 +00:00
<% for (item in byCategory) { %>
<label class="option" for="<%= byCategory[item][0] %>"><%= byCategory[item][1] %></label><input id="<%= byCategory[item][0] %>" type="checkbox">
<% } %>
2018-11-15 22:06:54 +00:00
2020-02-25 18:45:27 +00:00
<h4>Sort by protocol:</h4>
2020-04-24 22:20:08 +00:00
<% for (item in byProtocol) { %>
<label class="option" for="<%= byProtocol[item][0] %>"><%= byProtocol[item][1] %></label><input id="<%= byProtocol[item][0] %>" type="checkbox">
<% } %>
2020-02-25 18:45:27 +00:00
<h4>Sort by code language:</h4>
<label class="option" for="all">All</label><input id="all" type="radio" name="radio">
2020-02-26 22:37:27 +00:00
<% for (i in langList) { %>
<label class="option" for="<%= langList[i].name.toLowerCase() %>"><%= langList[i].name %> <span>(<%= langList[i].count %>)</span></label><input id="<%= langList[i].name.toLowerCase() %>" type="radio" name="radio">
<% } %>
<h4>Sort by license:</h4>
<label class="option" for="all">All</label><input id="all" type="radio" name="radio">
<% for (i in licenseList) { %>
<label class="option" for="<%= licenseList[i].name.toLowerCase().replace(pattern, '') %>"><%= licenseList[i].name %> <span>(<%= licenseList[i].count %>)</span></label><input id="<%= licenseList[i].name.toLowerCase().replace(pattern, '') %>" type="radio" name="radio">
2020-02-26 22:37:27 +00:00
<% } %>
2018-11-15 22:06:54 +00:00
2020-02-23 14:59:22 +00:00
<section class="grid misc__grid cards">
2018-11-15 22:06:54 +00:00
<% for (item in apps) { %>
<% let type = apps[item].categories %>
2020-02-25 18:45:27 +00:00
<% let lang = apps[item].codeLanguage.toLowerCase() %>
2018-11-15 22:06:54 +00:00
<button class="card <%= lang %> <%= apps[item].license.toLowerCase().replace(pattern, '') %> <% if (apps[item].apClass) { %>ap<% } %> <% if (apps[item].zotClass) { %>zot<% } %> <% if (apps[item].diasporaClass) { %>dia<% } %> <% if (apps[item].OStatusClass) { %>os<% } %> <% for (t in type) { %> <%=type[t]%> <% } %>">
2020-02-23 14:59:22 +00:00
<div class="card__content">
<div class="card__title">
<% if (apps[item].logo) { %><img src="<%= apps[item].logo %>" alt="logo"><% } %>
<p class="title u-emphasize"><%= apps[item].title %></p>
</div>
<div class="card__body">
<% if (apps[item].site) { %>
<h4 class="card__subtitle">Website</h4>
<% let path = apps[item].site.split('://') %>
<p><a href="<%= apps[item].site %>"><%= path[1] %></a>
<svg role="img"><title>remote link</title><use xlink:href="#icon-link"></use></svg></p>
<% } %>
<h4 class="card__subtitle">Source code</h4>
<p><a href="<%= apps[item].source %>">repository</a> <svg role="img"><title>remote link</title><use xlink:href="#icon-link"></use></svg></p>
<% if (apps[item].servers) { %>
<h4 class="card__subtitle">Servers</h4>
<p><a href="<%= apps[item].servers %>">list</a> <svg role="img"><title>remote link</title><use xlink:href="#icon-link"></use></svg></p>
<% } %>
2020-08-25 01:37:38 +00:00
<% if (apps[item].description) { %>
<h4 class="card__subtitle">About</h4>
<p class="card__about">
<%- truncate( (apps[item].description), {length: 200, omission: '...'}) %>
</p>
2020-02-23 14:59:22 +00:00
<% } %>
<span class="card__more u-emphasize">more info<i>▶</i</span>
</div>
<div class='card__extra'>
<% if (apps[item].codeLanguage) { %>
<h4 class="card__subtitle">Code language</h4>
<p><%= apps[item].codeLanguage %></p>
<% } %>
<% if (apps[item].techStack) { %>
<h4 class="card__subtitle">Tech stack</h4>
<p><%= apps[item].techStack %></p>
<% } %>
<h4 class="card__subtitle">Protocols</h4>
<p><%= apps[item].protocols %></p>
2020-08-30 22:13:47 +00:00
<% if (apps[item].license) { %>
<h4 class="card__subtitle">License</h4>
<p><%= apps[item].license %></p>
<% } %>
2020-08-25 01:37:38 +00:00
<% if (apps[item].FediAccount) { %>
<h4 class="card__subtitle">Contact</h4>
<p><%= apps[item].FediAccount %></p>
2020-02-23 14:59:22 +00:00
<% } %>
</div>
2018-11-15 22:06:54 +00:00
</div>
2020-02-23 14:59:22 +00:00
</button>
2018-11-15 22:06:54 +00:00
<% } %>
</section>
2020-02-23 14:59:22 +00:00
2020-02-25 18:45:27 +00:00
<footer>
<p>Something's missing? <a class="dark-ui" href="https://codeberg.org/fediverse/fediparty/src/branch/main/CONTRIBUTING.md#user-content-submitting-software">Add</a> it.</p>
<p>Software no longer maintained, renamed, broken link? Please, <a class="dark-ui" href="https://codeberg.org/fediverse/fediparty/issues">let us know</a>.</p>
2023-10-04 20:46:55 +00:00
<p>Special thanks to <a class="dark-ui" href="https://mastodon.nzoss.nz/@strypey">@strypey</a> for starting, and to <a class="dark-ui" href="https://social.coop/@smallcircles">Arnold Schrijver</a> - for curating this <a class="dark-ui" href="https://codeberg.org/fediverse/delightful-fediverse-apps">list</a>.</p>
2020-04-08 18:32:38 +00:00
<p>Other sources: implementation report on <a class="dark-ui" href="http://activitypub.rocks/implementation-report">activitypub.rocks</a> website.</p>
2020-02-25 18:45:27 +00:00
</footer>
2020-02-23 14:59:22 +00:00
2018-11-15 22:06:54 +00:00
</article>