feat: Replace ui drag screen with liquid template
- Recreate io macros as liquid partials - Add app template based on default - Drag screen uses app.liquid layout instead of _app_frame.njk
This commit is contained in:
parent
6b644ca9f3
commit
c77bcd8bdc
6 changed files with 129 additions and 50 deletions
40
source/templates/hippie/app.liquid
Normal file
40
source/templates/hippie/app.liquid
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{% assign pageBase = "../../../" -%}
|
||||
{% assign pageId = page.fileSlug -%}
|
||||
{% assign pageClass = "html_ui" -%}
|
||||
{%- layout "hippie/default.liquid" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block links %}
|
||||
{{ block.super -}}
|
||||
<link href="/vendor/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet">
|
||||
<link href="{{ pageBase }}css/ui.css" media="all" rel="stylesheet"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
{{ block.super -}}
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="{{ pageBase }}js/variables.js"></script>
|
||||
<script src="{{ pageBase }}js/app.js"></script>
|
||||
|
||||
<script>
|
||||
const frameHeader = document.querySelector('body > header.io');
|
||||
const closeActionElements = document.querySelectorAll('[data-action=close]');
|
||||
|
||||
if (frameHeader) {
|
||||
console.log('frame header found', frameHeader);
|
||||
|
||||
frameHeader.addEventListener('click', (e) => {
|
||||
if (e.target.dataset.action === 'close') {
|
||||
console.debug('close', e.target);
|
||||
|
||||
history.back();
|
||||
|
||||
if (closeActionElements.length > 1) {
|
||||
console.debug('other frames present', closeActionElements.length);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
20
source/templates/hippie/partials/frame-header.liquid
Normal file
20
source/templates/hippie/partials/frame-header.liquid
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<header class="io">
|
||||
<nav>
|
||||
<button title="menu">
|
||||
<i class="bi bi-three-dots"></i>
|
||||
</button>
|
||||
<span>{{ title | default: 'title-bar' }}</span>
|
||||
</nav>
|
||||
<nav>
|
||||
<div class="spacer a"></div>
|
||||
<button title="minimize">
|
||||
<i class="bi bi-dash"></i>
|
||||
</button>
|
||||
<button title="maximize">
|
||||
<i class="bi bi-fullscreen"></i>
|
||||
</button>
|
||||
<button title="close" data-action="close">
|
||||
<i class="bi bi-x-square"></i>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
10
source/templates/hippie/partials/frame-mode.liquid
Normal file
10
source/templates/hippie/partials/frame-mode.liquid
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<footer class="io">
|
||||
<nav>
|
||||
<button>mode</button>
|
||||
<span>{{ title | default: 'mode-bar' }}</span>
|
||||
</nav>
|
||||
<nav>
|
||||
<div class="spacer a"></div>
|
||||
<button>action</button>
|
||||
</nav>
|
||||
</footer>
|
||||
11
source/templates/hippie/partials/frame-status.liquid
Normal file
11
source/templates/hippie/partials/frame-status.liquid
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<footer class="io">
|
||||
<nav>
|
||||
<span>## items</span>
|
||||
<span># selected (size)</span>
|
||||
<span># type(s)</span>
|
||||
<span># shared</span>
|
||||
</nav>
|
||||
<nav>
|
||||
<span>{{ title | default: 'status-bar' }}</span>
|
||||
</nav>
|
||||
</footer>
|
||||
Loading…
Add table
Add a link
Reference in a new issue