feat: Add and rename screens
- Add windows screen - Add windows.js - Different variants of classes for drag and edge snap behaviour - Rename js files to better distinguish usage
This commit is contained in:
parent
3c9c438b25
commit
e0cfcfac13
8 changed files with 351 additions and 2 deletions
30
source/screens/demo/examples/ui/windows.liquid
Normal file
30
source/screens/demo/examples/ui/windows.liquid
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: Windows
|
||||
tags:
|
||||
- ui
|
||||
---
|
||||
{% assign bodyClass = "body_frame" -%}
|
||||
{% layout "hippie/app.liquid" %}
|
||||
|
||||
{% block body %}
|
||||
<nav id="task-bar">
|
||||
<button data-action="start">Start</button>
|
||||
</nav>
|
||||
<div id="screen-space"></div>
|
||||
<div id="placeholder"></div>
|
||||
{% endblock %}
|
||||
|
||||
{%- block script %}
|
||||
<script src="{{ pageBase }}js/windows.js"></script>
|
||||
<script>
|
||||
// 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');
|
||||
|
||||
// const draggable = new Draggable(draggableElement);
|
||||
const dragMore = new DragAdv(draggableElement, placeholderElement);
|
||||
// const dragBest = new BestDrag(draggableElement, placeholderElement);
|
||||
</script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue