diff --git a/static/assets/gifs/helo.gif b/static/assets/gifs/helo.gif new file mode 100644 index 0000000..81d5301 Binary files /dev/null and b/static/assets/gifs/helo.gif differ diff --git a/static/contextmenu.js b/static/contextmenu.js new file mode 100644 index 0000000..99ff24f --- /dev/null +++ b/static/contextmenu.js @@ -0,0 +1,42 @@ +(function() { + if (window._contextMenuInitialized) return; + window._contextMenuInitialized = true; + + const menu = document.createElement('div'); + menu.className = 'context-menu'; + menu.innerHTML = ` + + `; + menu.style.display = 'none'; + document.body.appendChild(menu); + + const showMenu = (x, y) => { + menu.style.display = 'block'; + menu.style.left = `${x}px`; + menu.style.top = `${y}px`; + + const rect = menu.getBoundingClientRect(); + if (x + rect.width > window.innerWidth) { + menu.style.left = `${window.innerWidth - rect.width - 10}px`; + } + if (y + rect.height > window.innerHeight) { + menu.style.top = `${window.innerHeight - rect.height - 10}px`; + } + }; + + const hideMenu = () => { + menu.style.display = 'none'; + }; + + document.addEventListener('contextmenu', (e) => { + e.preventDefault(); + showMenu(e.clientX, e.clientY); + }, false); + + document.addEventListener('click', hideMenu); + document.addEventListener('scroll', hideMenu); + document.addEventListener('keydown', (e) => { + if (e.key === 'Escape') hideMenu(); + }); + +})(); diff --git a/static/style.css b/static/style.css index 1139139..efa3ab0 100644 --- a/static/style.css +++ b/static/style.css @@ -923,4 +923,23 @@ mini-player { width: 90%; } } +} + +/* Context Menu */ +.context-menu { + position: fixed; + background: var(--win-bg-grey); + border: 2px solid; + border-color: #ffffff #808080 #808080 #ffffff; + box-shadow: 2px 2px 0 #000; + border-radius: 4px; + padding: 0.5rem 0; + min-width: 150px; + z-index: 9999; + font-family: 'VT323', monospace; + font-size: 1.2rem; + + img { + width: 10svw; + } } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index b2f1b8e..97ff354 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,8 @@ + + @@ -17,6 +19,7 @@ + {% include "partials/header.html" %} @@ -24,12 +27,15 @@ +
{% block content %}{% endblock %}
+ + \ No newline at end of file