aboutsummaryrefslogtreecommitdiffstats
path: root/templates/home.html
blob: ba6615f5b187e968a64c4a33efbaab2fd40d574c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{% extends "base.html" %}

{% block nav_home %}active{% endblock %}

{% block header %}

<header>
  <div class="panel" id="title">
    <h1>{{ locale.text("name").unwrap() }}</h1>
  </div>

  {% if is_live %}
  <iframe class="panel" id="stream" src="https://weirdstar.stream/embed/video" title="girlstream"
    referrerpolicy="origin" scrolling="no" allowfullscreen>
  </iframe>
  {% endif %}

  {% if listenbrainz.is_scrobbling %}
  <a href="https://listenbrainz.org/user/celblossom" class="panel" id="scrobble">{{ locale.text("now-playing").unwrap()
    }}: {{
    listenbrainz.song.clone().unwrap_or_default() }} -
    {{ listenbrainz.artist.clone().unwrap_or_default() }}</a>
  {% endif %}

</header>

{% endblock header %}

{% block content %}

{% for post in feed %}
{% match post %}
{% when HomeFeedItem::Blogpost(blogpost) %}
{% include "blogpost-panel.html" %}
{% when HomeFeedItem::Poem(poem) %}
{% include "poem-panel.html" %}
{% endmatch %}
{% endfor %}

<div class="home-feed-footer">
  <div class="panel"><a href="/blog">More blogposts...</a></div>
  <div class="panel"><a href="/poetry">More poetry...</a></div>
</div>

{% endblock content %}

{% block aside %}

<aside>

  {% include "latestposts.html" %}
  {% include "random-poem.html" %}
  {% match visits %}
  {% when Some(visit_count) %}
  <div class="panel"
    style="color: #e9cdcf; background-color: #b52f6a; z-index: -1; font-size: 2em; width: fit-content;">
    {{ visit_count }}{{ locale.text("visits").unwrap() }}</div>
  {% when None %}
  {% endmatch %}

</aside>

{% endblock aside %}