hikan.ru/mvc/views/blocks/header.gohtml

48 lines
1.4 KiB
Plaintext

{{ define "header" }}
<header>
<div>
<img src="/assets/pic/miffy.png?v={{ .version }}" width="100%" height="100%">
</div>
<div class="lastfm-container">
<p class="lastfm-text">
<code>🎵&nbsp;last played track: </code><code id="lastfm">waiting for a response from lastfm...</code><code>&nbsp;🎵</code>
</p>
</div>
<div>
<h1>
contacts
</h1>
<p>
you can message me on <a href="https://t.me/semaphoreslover" target="_blank">telegram</a> or <a href="https://mastodon.ml/@serr" target="_blank">mastodon</a>
</p>
</div>
<div>
<p>
> <a href="/">main page</a><br/>
> <a href="/posts/">posts section</a>
</p>
</div>
<div>
<p>
and also you can subscribe to my <a href="https://t.me/lolistack" target="_blank">telegram channel</a> with pictures!
</p>
</div>
<script>
function updateLastfm() {
fetch('/api/lastfm')
.then(response => response.text())
.then(text => {
document.getElementById('lastfm').textContent = text;
})
.catch(error => {
console.error('Error fetching lastfm:', error);
});
}
updateLastfm();
setInterval(updateLastfm, 10000);
</script>
</header>
{{ end }}