Files
muzak/playlist/templates/head.html
T
mark ca8ccbf5c6 Locally adds 98.css
Latest version with default styling. License included.
2024-02-23 22:53:19 +01:00

48 lines
1.7 KiB
HTML

{% load static %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="{% static 'js/htmx.min.js' %}" defer></script>
<script src="https://unpkg.com/interactjs"></script>
<link href="{% static '98.css/style.css' %}" rel="stylesheet" type="text/css" />
<link href="{% static 'style.css'%}" rel="stylesheet" type="text/css" />
<style>
{% include 'background.css' with background=user.profile.background %}
</style>
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'favicon-16x16.png' %}">
<link rel="manifest" href="/site.webmanifest">
<script src="https://open.spotify.com/embed/iframe-api/v1" async></script>
<title>HD Muzak: {{ request.path }}</title>
<script>
//Global position object for cross-page window positioning
position = {
set x(val) {
this._x = val
localStorage.setItem("position", JSON.stringify({x: val, y: this._y}));
},
set y(val) {
this._y = val
localStorage.setItem("position", JSON.stringify({x: this._x, y: val}));
},
get x() { return this._x },
get y() { return this._y },
_x: 0, _y: 0,
get_pos() {
stored_position = JSON.parse(localStorage.getItem("position"));
if (stored_position != null) {
position.x = stored_position.x
position.y = stored_position.y
document.getElementById("main-window").style.transform =
`translate(${position.x}px, ${position.y}px)`
} else {
localStorage.removeItem("position")
}
},
reset() {
this._x = 0
this._y = 0
localStorage.removeItem("position")
}
}
</script>