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

56 lines
1.7 KiB
Plaintext

{{ define "header" }}
<header>
<div style="position: relative; width: 100%; height: 100%;">
<img src="/assets/pic/miffy.png?v={{ .version }}"
style="width: 100%; height: 100%;">
<img src="/assets/pic/sparkling.gif?v={{ .version }}"
style="position: absolute;
top: 0;
right: 0;
width: 50%;
height: 50%;">
</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 }}