2025-10-27 21:33:38 +01:00
|
|
|
---
|
|
|
|
|
title: Windows
|
|
|
|
|
tags:
|
|
|
|
|
- ui
|
|
|
|
|
---
|
2026-02-21 12:58:31 +01:00
|
|
|
{% assign bodyClass = 'body_frame' -%}
|
2026-04-23 21:45:14 +02:00
|
|
|
{% layout 'hippie-view/app.liquid' %}
|
2025-10-27 21:33:38 +01:00
|
|
|
|
|
|
|
|
{% block body %}
|
2025-10-27 23:24:49 +01:00
|
|
|
<div id="task-bar">
|
|
|
|
|
<nav>
|
|
|
|
|
<button data-action="start"><i class="bi bi-microsoft"></i></button>
|
|
|
|
|
</nav>
|
|
|
|
|
<nav>
|
|
|
|
|
<button><i class="bi bi-search"></i></button>
|
|
|
|
|
<button><i class="bi bi-layers-half"></i></button>
|
|
|
|
|
</nav>
|
|
|
|
|
<nav class="big">
|
|
|
|
|
<button><i class="bi bi-folder"></i></button>
|
|
|
|
|
<button><i class="bi bi-terminal"></i></button>
|
2026-02-14 12:18:07 +01:00
|
|
|
<button id="setPause"><i class="bi bi-pause"></i></button>
|
|
|
|
|
<button id="setPlay"><i class="bi bi-play"></i></button>
|
2025-10-27 23:24:49 +01:00
|
|
|
</nav>
|
|
|
|
|
<div>
|
|
|
|
|
<nav class="small">
|
|
|
|
|
<button><i class="bi bi-chevron-up"></i></button>
|
|
|
|
|
<button><i class="bi bi-steam"></i></button>
|
|
|
|
|
<button><i class="bi bi-router"></i></button>
|
|
|
|
|
<button><i class="bi bi-mic"></i></button>
|
|
|
|
|
<button><i class="bi bi-volume-down"></i></button>
|
|
|
|
|
</nav>
|
2026-04-05 14:20:14 +02:00
|
|
|
<div class="clock"></div>
|
2025-10-27 23:24:49 +01:00
|
|
|
<nav>
|
|
|
|
|
<button data-action="notification"><i class="bi bi-bell-fill"></i></button>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-10-27 21:33:38 +01:00
|
|
|
<div id="screen-space"></div>
|
2025-11-02 11:39:11 +01:00
|
|
|
<div id="placeholder">
|
|
|
|
|
<div class="box"></div>
|
|
|
|
|
<div class="box_brd"></div>
|
|
|
|
|
<div>
|
2025-11-02 13:12:04 +01:00
|
|
|
<span>task bar</span>
|
2025-11-02 11:39:11 +01:00
|
|
|
<div class="box_brd"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-10-27 21:33:38 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
2026-03-10 21:21:08 +01:00
|
|
|
{% block assets %}
|
2026-03-01 16:31:10 +01:00
|
|
|
{{ block.super -}}
|
2026-02-21 12:58:31 +01:00
|
|
|
<script src="/js/windows.js"></script>
|
2026-03-10 21:21:08 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{%- block script %}
|
|
|
|
|
{{ block.super -}}
|
2025-10-27 21:33:38 +01:00
|
|
|
<script>
|
2025-11-03 19:37:19 +01:00
|
|
|
console.log(HIPPIE.brand);
|
2025-10-27 21:33:38 +01:00
|
|
|
// Get the space element
|
|
|
|
|
const space = document.getElementById('screen-space');
|
|
|
|
|
const start = document.querySelector('[data-action=start]');
|
|
|
|
|
const draggableElement = document.getElementById('task-bar');
|
|
|
|
|
const placeholderElement = document.getElementById('placeholder');
|
2025-11-02 10:20:51 +01:00
|
|
|
|
2026-04-05 14:20:14 +02:00
|
|
|
initializeApp();
|
2025-10-31 19:47:19 +01:00
|
|
|
|
2026-04-05 14:20:14 +02:00
|
|
|
async function initializeApp() {
|
|
|
|
|
try {
|
|
|
|
|
const config = await loadJson('/json/windows.json');
|
|
|
|
|
// TODO: Elemente in der Klasse selbst erzeugen
|
|
|
|
|
const taskBar = new HippieTaskBar(draggableElement, placeholderElement, config.taskbar);
|
|
|
|
|
|
|
|
|
|
// TODO: In HippieTaskbar aufnehmen
|
|
|
|
|
document.getElementById('setPause').addEventListener('click', () => {
|
|
|
|
|
taskBar.time.pause();
|
|
|
|
|
console.info('Pause time');
|
|
|
|
|
});
|
|
|
|
|
document.getElementById('setPlay').addEventListener('click', () => {
|
|
|
|
|
taskBar.time.resume();
|
|
|
|
|
console.info('Resume time');
|
|
|
|
|
});
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('Failed to initialize app:', error);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-27 21:33:38 +01:00
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|