This commit is contained in:
@@ -72,3 +72,15 @@ def index():
|
||||
tmsmp=tmsmp,
|
||||
rtmsmp=rtmsmp
|
||||
)
|
||||
|
||||
@bp.route("/m/<module>")
|
||||
def module(module):
|
||||
return render_tmpl(
|
||||
f'{module}.htm',
|
||||
lb=listens,
|
||||
lb_now=listening,
|
||||
recent=recent.get('data', {}),
|
||||
owned=owned.get('data', {}),
|
||||
tmsmp=tmsmp,
|
||||
rtmsmp=rtmsmp
|
||||
)
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
data-site-id="1"
|
||||
defer
|
||||
></script>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
|
||||
integrity="sha384-/TgkGk7p307TH7EXJDuUlgG3Ce1UVolAOFopFekQkkXihi5u/6OCvVKyz1W+idaz"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -10,7 +10,12 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
<div class="block">
|
||||
<div
|
||||
class="block"
|
||||
hx-get="/m/listenbrainz"
|
||||
hx-trigger="every 15s"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<h2><a href="https://listenbrainz.org/user/risdeveau/">Listenbrainz</a></h2>
|
||||
{% if lb_now.data and lb_now.data.listens.0 %}
|
||||
{{ track_block(lb_now.data.listens.0, is_active=true) }}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<div class="block steam">
|
||||
<div
|
||||
class="block steam"
|
||||
hx-get="/m/steam"
|
||||
hx-trigger="every 1m"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<h2><a href="https://steamcommunity.com/id/risdeveau">Steam</a></h2>
|
||||
|
||||
{% if recent.games %}
|
||||
|
||||
Reference in New Issue
Block a user