caveman/gatherer/templates/trends.html

52 lines
1.5 KiB
HTML
Raw Normal View History

2022-11-06 01:29:58 +01:00
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8"/>
<title>Caveman: {% if language.is_some() %}{{ language.as_ref().unwrap() }}{% else %}Trends in the Fediverse{% endif %}</title>
2022-11-07 21:23:55 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2022-11-06 23:49:17 +01:00
<link rel="stylesheet" title="Default" type="text/css" href="/assets/style.css"/>
2022-11-06 01:29:58 +01:00
</head>
<body>
<header>
2022-11-07 21:23:55 +01:00
<h1>Fedi.Buzz</h1>
2022-11-06 01:29:58 +01:00
<p>Trends in the Fediverse</p>
</header>
<nav>
<h2>By language:</h2>
<ul>
<li><a href="/">Global</a></li>
</ul>
</nav>
<main>
{% for (result, title) in results.iter().zip(["Now", "Today", "This week"]) %}
<article>
<h2>{{ title }}</h2>
{% for (score, tag) in result %}
2022-11-06 02:20:36 +01:00
<section>
<h3>#{{ tag.spelling() }}</h3>
2022-11-07 21:23:55 +01:00
<p class="score">{{ format!("{}{:.0}%", if *score > 1. { "+" } else { "" }, 100. * score - 100.) }}</p>
2022-11-06 23:49:17 +01:00
<ul class="hosts">
2022-11-07 21:23:55 +01:00
{% for (_count, host) in tag.hosts_set().into_iter().rev().take(4) %}
2022-11-06 02:20:36 +01:00
<li>
<a href="https://{{ host }}/tags/{{ tag.name }}">
{{ host }}
</a>
</li>
{% endfor %}
</ul>
</section>
2022-11-06 01:29:58 +01:00
{% endfor %}
</article>
{% endfor %}
2022-11-07 21:23:55 +01:00
</main>
<footer>
<p>
made by <a href="https://chaos.social/@astro">@astro@chaos.social</a>
</p>
</footer>
2022-11-06 01:29:58 +01:00
</body>
</html>