Compare commits
10 commits
a85dbbe27c
...
9d98b69e31
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d98b69e31 | |||
| 9bf97019ca | |||
| 5092c1680d | |||
| e5516c81f1 | |||
| 15a9b83e80 | |||
| b1c7f4100e | |||
| 759283fd9f | |||
| 0a5bc191d3 | |||
| 498f59a939 | |||
| bbd1a9674e |
16 changed files with 565 additions and 376 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"bitwise": true,
|
"bitwise": true,
|
||||||
"curly": true,
|
"curly": false,
|
||||||
"devel": true,
|
"devel": true,
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
"esversion": 9,
|
"esversion": 11,
|
||||||
"forin": true,
|
"forin": true,
|
||||||
"freeze": true,
|
"freeze": true,
|
||||||
"jquery": true,
|
"jquery": true,
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -44,9 +44,25 @@ Everything has its default style.
|
||||||
|
|
||||||
CSS classes follow a naming scheme of `<object>_<description>`.
|
CSS classes follow a naming scheme of `<object>_<description>`.
|
||||||
|
|
||||||
- *Object* usually is the name of the HTML element. If it is not a elemtn directly it is the thing which receives the styling
|
- *Object* usually is the name of the HTML element. If it is not a element directly it is the thing which receives the styling
|
||||||
- *Description* is a name of the style e.g. what it does, how it looks
|
- *Description* is a name of the style e.g. what it does, how it looks
|
||||||
|
|
||||||
|
### JavaScript (JS)
|
||||||
|
|
||||||
|
The codebase uses ECMAScript 2023 Language Specification (14th edition).
|
||||||
|
However, currently the JSHint configuration only allows 11 as highest version.
|
||||||
|
|
||||||
|
ID values are written in *camelCase*. The scheme further uses parts for specific contexts.
|
||||||
|
|
||||||
|
If the ID is for an interactive element the first part is an abbreviation of the action.
|
||||||
|
|
||||||
|
- `add` - Add
|
||||||
|
- `qry` - Query
|
||||||
|
- `rmv` - Remove
|
||||||
|
- `set` - Set
|
||||||
|
- `slt` - Select
|
||||||
|
- `tgl` - Toggle
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
This project uses [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://quelltext.interaktionsweise.de/interaktionsweise/hippie/tags).
|
This project uses [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://quelltext.interaktionsweise.de/interaktionsweise/hippie/tags).
|
||||||
|
|
|
||||||
236
TODO.md
236
TODO.md
|
|
@ -11,120 +11,126 @@
|
||||||
- Add build process for normalize.css from github.com/necolas/normalize.css
|
- Add build process for normalize.css from github.com/necolas/normalize.css
|
||||||
- Add build process for bourbon from https://github.com/thoughtbot/bourbon
|
- Add build process for bourbon from https://github.com/thoughtbot/bourbon
|
||||||
|
|
||||||
|
# CSS
|
||||||
|
|
||||||
|
- Check style for every basic element
|
||||||
|
- Uniform spelling of classes and identifiers
|
||||||
|
|
||||||
# Content
|
# Content
|
||||||
|
|
||||||
- Complete *Intro* with description for all basic elements, according to [HTML Standard - The elements of HTML](https://html.spec.whatwg.org/multipage/semantics.html#semantics)
|
- *Intro*
|
||||||
- Sections
|
- Complete with description for all basic elements, according to [HTML Standard - The elements of HTML](https://html.spec.whatwg.org/multipage/semantics.html#semantics)
|
||||||
- [x] body
|
- Sections
|
||||||
- [x] article
|
- [x] body
|
||||||
- [x] section
|
- [x] article
|
||||||
- [x] nav
|
- [x] section
|
||||||
- [x] aside
|
- [x] nav
|
||||||
- [x] h1-h6
|
- [x] aside
|
||||||
- [x] hgroup
|
- [x] h1-h6
|
||||||
- [x] header
|
- [x] hgroup
|
||||||
- [x] footer
|
- [x] header
|
||||||
- [x] address (put to grouping content)
|
- [x] footer
|
||||||
- Grouping content
|
- [x] address (put to grouping content)
|
||||||
- [x] p
|
- Grouping content
|
||||||
- [x] hr
|
- [x] p
|
||||||
- [x] pre
|
- [x] hr
|
||||||
- [x] blockquote
|
- [x] pre
|
||||||
- [x] ol
|
- [x] blockquote
|
||||||
- [x] ul
|
- [x] ol
|
||||||
- [ ] menu (new)
|
- [x] ul
|
||||||
- [x] li
|
- [ ] menu (new)
|
||||||
- [x] dl
|
- [x] li
|
||||||
- [x] dt
|
- [x] dl
|
||||||
- [x] dd
|
- [x] dt
|
||||||
- [x] figure
|
- [x] dd
|
||||||
- [x] figcaption
|
- [x] figure
|
||||||
- [x] main
|
- [x] figcaption
|
||||||
- [ ] search (new)
|
- [x] main
|
||||||
- [x] div
|
- [ ] search (new)
|
||||||
- Text-level semantics
|
- [x] div
|
||||||
- [x] a
|
- Text-level semantics
|
||||||
- [x] em
|
- [x] a
|
||||||
- [x] strong
|
- [x] em
|
||||||
- [x] small
|
- [x] strong
|
||||||
- [x] s
|
- [x] small
|
||||||
- [x] cite
|
- [x] s
|
||||||
- [x] q
|
- [x] cite
|
||||||
- [x] dfn
|
- [x] q
|
||||||
- [x] abbr
|
- [x] dfn
|
||||||
- [x] ruby
|
- [x] abbr
|
||||||
- [x] rb (deprecated)
|
- [x] ruby
|
||||||
- [x] rt
|
- [x] rb (deprecated)
|
||||||
- [x] rtc (deprecated)
|
- [x] rt
|
||||||
- [x] rp
|
- [x] rtc (deprecated)
|
||||||
- [x] data
|
- [x] rp
|
||||||
- [x] time
|
- [x] data
|
||||||
- [x] code
|
- [x] time
|
||||||
- [x] var
|
- [x] code
|
||||||
- [x] samp
|
- [x] var
|
||||||
- [x] kbd
|
- [x] samp
|
||||||
- [x] sub
|
- [x] kbd
|
||||||
- [x] sup
|
- [x] sub
|
||||||
- [x] i
|
- [x] sup
|
||||||
- [x] b
|
- [x] i
|
||||||
- [x] u
|
- [x] b
|
||||||
- [x] mark
|
- [x] u
|
||||||
- [x] bdi
|
- [x] mark
|
||||||
- [x] bdo
|
- [x] bdi
|
||||||
- [x] span
|
- [x] bdo
|
||||||
- [x] br (mentioned in grouping content)
|
- [x] span
|
||||||
- [x] wbr
|
- [x] br (mentioned in grouping content)
|
||||||
- Edits
|
- [x] wbr
|
||||||
- [x] ins
|
- Edits
|
||||||
- [x] del
|
- [x] ins
|
||||||
- Embedded content
|
- [x] del
|
||||||
- [x] picture
|
- Embedded content
|
||||||
- [x] source
|
- [x] picture
|
||||||
- [x] img
|
- [x] source
|
||||||
- [ ] iframe
|
- [x] img
|
||||||
- [ ] embed
|
- [ ] iframe
|
||||||
- [ ] object
|
- [ ] embed
|
||||||
- [ ] param (deprecated)
|
- [ ] object
|
||||||
- [ ] video
|
- [ ] param (deprecated)
|
||||||
- [ ] audio
|
- [ ] video
|
||||||
- [ ] track
|
- [ ] audio
|
||||||
- [ ] map
|
- [ ] track
|
||||||
- [ ] area
|
- [ ] map
|
||||||
- Tabular data
|
- [ ] area
|
||||||
- [ ] table
|
- Tabular data
|
||||||
- [ ] caption
|
- [ ] table
|
||||||
- [ ] colgroup
|
- [ ] caption
|
||||||
- [ ] col
|
- [ ] colgroup
|
||||||
- [ ] tbody
|
- [ ] col
|
||||||
- [ ] thead
|
- [ ] tbody
|
||||||
- [ ] tfoot
|
- [ ] thead
|
||||||
- [ ] tr
|
- [ ] tfoot
|
||||||
- [ ] td
|
- [ ] tr
|
||||||
- [ ] th
|
- [ ] td
|
||||||
- Forms
|
- [ ] th
|
||||||
- [x] form
|
- Forms
|
||||||
- [x] label
|
- [x] form
|
||||||
- [x] input
|
- [x] label
|
||||||
- [x] button
|
- [x] input
|
||||||
- [ ] select
|
- [x] button
|
||||||
- [ ] datalist
|
- [ ] select
|
||||||
- [ ] optgroup
|
- [ ] datalist
|
||||||
- [ ] option
|
- [ ] optgroup
|
||||||
- [ ] textarea
|
- [ ] option
|
||||||
- [ ] output
|
- [ ] textarea
|
||||||
- [ ] progress
|
- [ ] output
|
||||||
- [ ] meter (new)
|
- [ ] progress
|
||||||
- [x] fieldset
|
- [ ] meter (new)
|
||||||
- [x] legend
|
- [x] fieldset
|
||||||
- Interactive elements
|
- [x] legend
|
||||||
- [ ] details
|
- Interactive elements
|
||||||
- [ ] summary
|
- [ ] details
|
||||||
- [ ] dialog
|
- [ ] summary
|
||||||
- Scripting
|
- [ ] dialog
|
||||||
- [ ] script
|
- Scripting
|
||||||
- [ ] noscript
|
- [ ] script
|
||||||
- [ ] template
|
- [ ] noscript
|
||||||
- [ ] slot
|
- [ ] template
|
||||||
- [ ] canvas
|
- [ ] slot
|
||||||
- Check style for every basic element
|
- [ ] canvas
|
||||||
- Uniform spelling of classes and identifiers
|
- *Clock*
|
||||||
|
- Add overlays to better distinguish day, week and year
|
||||||
|
|
@ -351,12 +351,12 @@ function checkButtonAndTarget(event, element, button = 0) {
|
||||||
function getClosestEdgeToElement(element) {
|
function getClosestEdgeToElement(element) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const rect = element.getBoundingClientRect();
|
const bounding = element.getBoundingClientRect();
|
||||||
const distances = {
|
const distances = {
|
||||||
top: rect.top,
|
top: bounding.top,
|
||||||
right: window.innerWidth - rect.right,
|
right: window.innerWidth - bounding.right,
|
||||||
bottom: window.innerHeight - rect.bottom,
|
bottom: window.innerHeight - bounding.bottom,
|
||||||
left: rect.left
|
left: bounding.left
|
||||||
};
|
};
|
||||||
|
|
||||||
return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b);
|
return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b);
|
||||||
|
|
@ -459,6 +459,70 @@ function getRandomColor() {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getRandomFormattedString(chars = 2, digits = 6, separator = '-') {
|
||||||
|
const getRandomUppercase = () => String.fromCharCode(Math.floor(Math.random() * 26) + 65);
|
||||||
|
const getRandomDigit = () => Math.floor(Math.random() * 10);
|
||||||
|
let string = '';
|
||||||
|
|
||||||
|
for (let i = 0; i < chars; i++) {
|
||||||
|
string += getRandomUppercase();
|
||||||
|
}
|
||||||
|
|
||||||
|
string += separator;
|
||||||
|
|
||||||
|
for (let i = 0; i < digits; i++) {
|
||||||
|
string += getRandomDigit();
|
||||||
|
}
|
||||||
|
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleColumn(table, index) {
|
||||||
|
const rows = table.rows;
|
||||||
|
const isHidden = rows[0].cells[index].classList.contains('di_none');
|
||||||
|
|
||||||
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
const cell = rows[i].cells[index];
|
||||||
|
|
||||||
|
if (isHidden) {
|
||||||
|
cell.classList.remove('di_none');
|
||||||
|
} else {
|
||||||
|
cell.classList.add('di_none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertToRomanNumeral(num) {
|
||||||
|
const romanNumeralMap = [
|
||||||
|
{value: 1000, numeral: 'M'},
|
||||||
|
{value: 900, numeral: 'CM'},
|
||||||
|
{value: 500, numeral: 'D'},
|
||||||
|
{value: 400, numeral: 'CD'},
|
||||||
|
{value: 100, numeral: 'C'},
|
||||||
|
{value: 90, numeral: 'XC'},
|
||||||
|
{value: 50, numeral: 'L'},
|
||||||
|
{value: 40, numeral: 'XL'},
|
||||||
|
{value: 10, numeral: 'X'},
|
||||||
|
{value: 9, numeral: 'IX'},
|
||||||
|
{value: 5, numeral: 'V'},
|
||||||
|
{value: 4, numeral: 'IV'},
|
||||||
|
{value: 1, numeral: 'I'}
|
||||||
|
];
|
||||||
|
|
||||||
|
let result = '';
|
||||||
|
for (let i = 0; i < romanNumeralMap.length; i++) {
|
||||||
|
while (num >= romanNumeralMap[i].value) {
|
||||||
|
result += romanNumeralMap[i].numeral;
|
||||||
|
num -= romanNumeralMap[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function capitalizeFirstLetter(text) {
|
||||||
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
// CONCEPTS
|
// CONCEPTS
|
||||||
|
|
||||||
// NOTE: Benutzt private Zuweisungen
|
// NOTE: Benutzt private Zuweisungen
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags:
|
||||||
<main>
|
<main>
|
||||||
<canvas id="clock" width="512" height="512"></canvas>
|
<canvas id="clock" width="512" height="512"></canvas>
|
||||||
<p>
|
<p>
|
||||||
<button id="toggleFormat">12-Stunden-Format</button>
|
<button id="tglFormat">12-Stunden-Format</button>
|
||||||
</p>
|
</p>
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
@ -27,9 +27,9 @@ tags:
|
||||||
const colorDayOfMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-orange').trim();
|
const colorDayOfMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-orange').trim();
|
||||||
const colorMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-pink').trim();
|
const colorMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-pink').trim();
|
||||||
|
|
||||||
document.getElementById('toggleFormat').addEventListener('click', () => {
|
document.getElementById('tglFormat').addEventListener('click', () => {
|
||||||
is24HourFormat = !is24HourFormat;
|
is24HourFormat = !is24HourFormat;
|
||||||
document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format';
|
document.getElementById('tglFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format';
|
||||||
});
|
});
|
||||||
|
|
||||||
function drawRings(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) {
|
function drawRings(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags:
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<main>
|
<main>
|
||||||
<form id="www-search" class="flex inline" action="https://duckduckgo.com/">
|
<form id="www-search" class="flex inline" action="https://duckduckgo.com/">
|
||||||
<input id="query" class="input_io" name="q" placeholder="Suchbegriff" type="text" required/>
|
<input id="qrySearch" class="input_io" name="q" placeholder="Suchbegriff" type="text" required/>
|
||||||
<input class="button_io" value="Suchen" type="submit"/>
|
<input class="button_io" value="Suchen" type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
<div class="blocks">
|
<div class="blocks">
|
||||||
|
|
@ -69,7 +69,7 @@ tags:
|
||||||
|
|
||||||
document.getElementById('www-search').addEventListener('submit', function (e) {
|
document.getElementById('www-search').addEventListener('submit', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const query = document.getElementById('query').value.trim();
|
const query = document.getElementById('qrySearch').value.trim();
|
||||||
|
|
||||||
if (!query) return;
|
if (!query) return;
|
||||||
|
|
||||||
|
|
|
||||||
60
source/screens/demo/examples/ui/cli.liquid
Normal file
60
source/screens/demo/examples/ui/cli.liquid
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
---
|
||||||
|
title: CLI
|
||||||
|
tags:
|
||||||
|
- ui
|
||||||
|
---
|
||||||
|
{% assign bodyClass = "body_cli" -%}
|
||||||
|
{% layout "hippie/app.liquid" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div id="cli">
|
||||||
|
<div id="history">
|
||||||
|
<pre>Previous prompt</pre>
|
||||||
|
</div>
|
||||||
|
<div id="line">
|
||||||
|
<textarea name="prefix" id="prefix" rows="1" cols="1" readonly>></textarea>
|
||||||
|
<textarea name="prompt" id="prompt" rows="1" autofocus></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{%- block script %}
|
||||||
|
{{ block.super -}}
|
||||||
|
<script>
|
||||||
|
function resizeTextArea(textarea) {
|
||||||
|
const {style, value} = textarea;
|
||||||
|
|
||||||
|
style.height = style.minHeight = 'auto';
|
||||||
|
style.minHeight = `${Math.min(textarea.scrollHeight + 4, parseInt(textarea.style.maxHeight))}px`;
|
||||||
|
style.height = `${textarea.scrollHeight}px`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const textarea = document.getElementById('prompt');
|
||||||
|
|
||||||
|
document
|
||||||
|
.body
|
||||||
|
.addEventListener('click', () => {
|
||||||
|
textarea.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
textarea.addEventListener('input', () => {
|
||||||
|
resizeTextArea(textarea);
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener("keydown", (event) => {
|
||||||
|
if (event.key === 'Enter' && !event.shiftKey) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const p = document.createElement("pre");
|
||||||
|
|
||||||
|
p.textContent = event.target.value;
|
||||||
|
document
|
||||||
|
.getElementById("history")
|
||||||
|
.appendChild(p);
|
||||||
|
// window.scrollTo(0, document.body.scrollHeight);
|
||||||
|
|
||||||
|
event.target.value = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
---
|
|
||||||
title: CLI
|
|
||||||
tags:
|
|
||||||
- ui
|
|
||||||
---
|
|
||||||
{% set pageId = page.fileSlug %}
|
|
||||||
{% set bodyClass = "body_cli" %}
|
|
||||||
|
|
||||||
{% extends "hippie/_app_frame.njk" %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<div id="cli">
|
|
||||||
<div id="history">
|
|
||||||
<pre>Previous prompt</pre>
|
|
||||||
</div>
|
|
||||||
<div id="line">
|
|
||||||
<textarea name="prefix" id="prefix" rows="1" cols="1" readonly>></textarea>
|
|
||||||
<textarea name="prompt" id="prompt" rows="1" autofocus></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{%- block script %}
|
|
||||||
{{ super() }}
|
|
||||||
<script>
|
|
||||||
function resizeTextArea(textarea) {
|
|
||||||
const {style, value} = textarea;
|
|
||||||
|
|
||||||
style.height = style.minHeight = 'auto';
|
|
||||||
style.minHeight = `${Math.min(textarea.scrollHeight + 4, parseInt(textarea.style.maxHeight))}px`;
|
|
||||||
style.height = `${textarea.scrollHeight}px`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const textarea = document.getElementById('prompt');
|
|
||||||
|
|
||||||
document
|
|
||||||
.body
|
|
||||||
.addEventListener('click', () => {
|
|
||||||
textarea.focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
textarea.addEventListener('input', () => {
|
|
||||||
resizeTextArea(textarea);
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener("keydown", (event) => {
|
|
||||||
if (event.key === 'Enter' && !event.shiftKey) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
const p = document.createElement("pre");
|
|
||||||
|
|
||||||
p.textContent = event.target.value;
|
|
||||||
document
|
|
||||||
.getElementById("history")
|
|
||||||
.appendChild(p);
|
|
||||||
// window.scrollTo(0, document.body.scrollHeight);
|
|
||||||
|
|
||||||
event.target.value = '';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
145
source/screens/demo/examples/ui/explorer.liquid
Normal file
145
source/screens/demo/examples/ui/explorer.liquid
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
---
|
||||||
|
title: Explorer
|
||||||
|
tags:
|
||||||
|
- ui
|
||||||
|
---
|
||||||
|
{% assign bodyClass = "body_frame" -%}
|
||||||
|
{% layout "hippie/app.liquid" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% render 'hippie/partials/frame-header.liquid' %}
|
||||||
|
<main class="io">
|
||||||
|
<aside class="io">
|
||||||
|
<nav>
|
||||||
|
<span>location-pane</span>
|
||||||
|
<ul class="vertical">
|
||||||
|
<li>
|
||||||
|
<a class="a_button" href="">
|
||||||
|
<span>Start/Home</span>
|
||||||
|
<i class="bi bi-pin-fill"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="a_button" href="">
|
||||||
|
<span>System</span>
|
||||||
|
<i class="bi bi-pin-fill"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<hr>
|
||||||
|
<nav>
|
||||||
|
<ul class="vertical">
|
||||||
|
<li>
|
||||||
|
<a class="a_button" href="">
|
||||||
|
<span>💽 disc link</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="a_button" href="">
|
||||||
|
<span>📁 folder link</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="a_button" href="">
|
||||||
|
<span>🔗 location link</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<section>
|
||||||
|
<header class="io">
|
||||||
|
<nav>
|
||||||
|
<button title="back">
|
||||||
|
<i class="bi bi-caret-left"></i>
|
||||||
|
</button>
|
||||||
|
<button title="up">
|
||||||
|
<i class="bi bi-caret-up"></i>
|
||||||
|
</button>
|
||||||
|
<button title="forward">
|
||||||
|
<i class="bi bi-caret-right"></i>
|
||||||
|
</button>
|
||||||
|
<button title="reload">
|
||||||
|
<i class="bi bi-arrow-clockwise"></i>
|
||||||
|
</button>
|
||||||
|
<input placeholder="//" type="text">
|
||||||
|
</nav>
|
||||||
|
<nav>
|
||||||
|
<span>location-bar</span>
|
||||||
|
<hr class="vertical">
|
||||||
|
<button title="search">
|
||||||
|
<i class="bi bi-search"></i>
|
||||||
|
</button>
|
||||||
|
<input placeholder="*" type="text">
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<header class="io">
|
||||||
|
<nav>
|
||||||
|
<button title="add">
|
||||||
|
<i class="bi bi-plus-circle"></i>
|
||||||
|
</button>
|
||||||
|
<div class="spacer a"></div>
|
||||||
|
<button title="cut">
|
||||||
|
<i class="bi bi-scissors"></i>
|
||||||
|
</button>
|
||||||
|
<button title="copy">
|
||||||
|
<i class="bi bi-copy"></i>
|
||||||
|
</button>
|
||||||
|
<button title="paste">
|
||||||
|
<i class="bi bi-clipboard-check-fill"></i>
|
||||||
|
</button>
|
||||||
|
<div class="spacer b"></div>
|
||||||
|
<button title="delete">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
<hr class="vertical">
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<button title="collapse">
|
||||||
|
<i class="bi bi-arrows-collapse"></i>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button title="expand">
|
||||||
|
<i class="bi bi-arrows-expand-vertical"></i>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<span>options-bar</span>
|
||||||
|
</nav>
|
||||||
|
<nav></nav>
|
||||||
|
</header>
|
||||||
|
<div id="content">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>name</th>
|
||||||
|
<th>date</th>
|
||||||
|
<th>type</th>
|
||||||
|
<th>size</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>folder</td>
|
||||||
|
<td>YYYY-MM-DD</td>
|
||||||
|
<td>folder</td>
|
||||||
|
<td>4KB</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>YYYY-MM-DD</td>
|
||||||
|
<td>folder</td>
|
||||||
|
<td>1B</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% render 'hippie/partials/frame-status.liquid' %}
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
{% render 'hippie/partials/frame-mode.liquid' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -1,146 +0,0 @@
|
||||||
---
|
|
||||||
title: GUI explorer
|
|
||||||
tags:
|
|
||||||
- ui
|
|
||||||
---
|
|
||||||
{% set pageId = page.fileSlug %}
|
|
||||||
|
|
||||||
{% extends "hippie/_app_frame.njk" %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
{{ io.frameHeader('title-bar') }}
|
|
||||||
<main class="io">
|
|
||||||
<aside class="io">
|
|
||||||
<nav>
|
|
||||||
<span>location-pane</span>
|
|
||||||
<ul class="vertical">
|
|
||||||
<li>
|
|
||||||
<a class="a_button" href="">
|
|
||||||
<span>Start/Home</span>
|
|
||||||
<i class="bi bi-pin-fill"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="a_button" href="">
|
|
||||||
<span>System</span>
|
|
||||||
<i class="bi bi-pin-fill"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<hr>
|
|
||||||
<nav>
|
|
||||||
<ul class="vertical">
|
|
||||||
<li>
|
|
||||||
<a class="a_button" href="">
|
|
||||||
<span>💽 disc link</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="a_button" href="">
|
|
||||||
<span>📁 folder link</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="a_button" href="">
|
|
||||||
<span>🔗 location link</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
<section>
|
|
||||||
<header class="io">
|
|
||||||
<nav>
|
|
||||||
<button title="back">
|
|
||||||
<i class="bi bi-caret-left"></i>
|
|
||||||
</button>
|
|
||||||
<button title="up">
|
|
||||||
<i class="bi bi-caret-up"></i>
|
|
||||||
</button>
|
|
||||||
<button title="forward">
|
|
||||||
<i class="bi bi-caret-right"></i>
|
|
||||||
</button>
|
|
||||||
<button title="reload">
|
|
||||||
<i class="bi bi-arrow-clockwise"></i>
|
|
||||||
</button>
|
|
||||||
<input placeholder="//" type="text">
|
|
||||||
</nav>
|
|
||||||
<nav>
|
|
||||||
<span>location-bar</span>
|
|
||||||
<hr class="vertical">
|
|
||||||
<button title="search">
|
|
||||||
<i class="bi bi-search"></i>
|
|
||||||
</button>
|
|
||||||
<input placeholder="*" type="text">
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<header class="io">
|
|
||||||
<nav>
|
|
||||||
<button title="add">
|
|
||||||
<i class="bi bi-plus-circle"></i>
|
|
||||||
</button>
|
|
||||||
<div class="spacer a"></div>
|
|
||||||
<button title="cut">
|
|
||||||
<i class="bi bi-scissors"></i>
|
|
||||||
</button>
|
|
||||||
<button title="copy">
|
|
||||||
<i class="bi bi-copy"></i>
|
|
||||||
</button>
|
|
||||||
<button title="paste">
|
|
||||||
<i class="bi bi-clipboard-check-fill"></i>
|
|
||||||
</button>
|
|
||||||
<div class="spacer b"></div>
|
|
||||||
<button title="delete">
|
|
||||||
<i class="bi bi-trash"></i>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
<hr class="vertical">
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<button title="collapse">
|
|
||||||
<i class="bi bi-arrows-collapse"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button title="expand">
|
|
||||||
<i class="bi bi-arrows-expand-vertical"></i>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<span>options-bar</span>
|
|
||||||
</nav>
|
|
||||||
<nav></nav>
|
|
||||||
</header>
|
|
||||||
<div id="content">
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>name</th>
|
|
||||||
<th>date</th>
|
|
||||||
<th>type</th>
|
|
||||||
<th>size</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>folder</td>
|
|
||||||
<td>YYYY-MM-DD</td>
|
|
||||||
<td>folder</td>
|
|
||||||
<td>4KB</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>file</td>
|
|
||||||
<td>YYYY-MM-DD</td>
|
|
||||||
<td>folder</td>
|
|
||||||
<td>1B</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{ io.statusBar() }}
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
{{ io.frameFooter('mode-bar') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
@ -12,9 +12,9 @@ tags:
|
||||||
<section>
|
<section>
|
||||||
<header class="io">
|
<header class="io">
|
||||||
<nav>
|
<nav>
|
||||||
<div class="group">
|
<div class="group-input">
|
||||||
<input id="slider-size" value="5" min="1" max="10" step="1" type="range"/>
|
<input id="setSize" value="5" min="1" max="10" step="1" type="range"/>
|
||||||
<label class="right" for="slider-size">Größe</label>
|
<label class="right" for="setSize">Größe</label>
|
||||||
</div>
|
</div>
|
||||||
<button title="details">
|
<button title="details">
|
||||||
<i class="bi bi-layout-sidebar-reverse"></i> Details
|
<i class="bi bi-layout-sidebar-reverse"></i> Details
|
||||||
|
|
@ -36,7 +36,7 @@ tags:
|
||||||
{%- block script %}
|
{%- block script %}
|
||||||
{{ block.super -}}
|
{{ block.super -}}
|
||||||
<script>
|
<script>
|
||||||
const sizeSlider = document.getElementById('slider-size');
|
const sizeSlider = document.getElementById('setSize');
|
||||||
const galleryItems = document.querySelectorAll('.gallery > div');
|
const galleryItems = document.querySelectorAll('.gallery > div');
|
||||||
|
|
||||||
// Set the default size
|
// Set the default size
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,29 @@ tags:
|
||||||
<section>
|
<section>
|
||||||
<header class="io">
|
<header class="io">
|
||||||
<nav>
|
<nav>
|
||||||
<button title="add">
|
<div class="group-input">
|
||||||
<i class="bi bi-plus-circle"></i>
|
<button id="addEntry" title="Add entry">
|
||||||
|
<i class="bi bi-plus-circle"></i>
|
||||||
|
</button>
|
||||||
|
<div class="group-input-wrap"><input id="setScroll" type="checkbox"></div>
|
||||||
|
<label for="setScroll">Scroll to new entry</label>
|
||||||
|
</div>
|
||||||
|
<button id="tglIndex" title="Toggle index column">
|
||||||
|
<i class="bi bi-hash"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<div class="group-input">
|
||||||
|
<select id="sltNum" name="position-number">
|
||||||
|
<option value="" selected>None</option>
|
||||||
|
<option value="numeric">123</option>
|
||||||
|
<option value="latin">ABC</option>
|
||||||
|
<option value="roman">IVX</option>
|
||||||
|
</select>
|
||||||
|
<button id="setPosNum" title="Set numbering" type="button"><i class="bi bi-list-ol"></i></button>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<nav></nav>
|
<nav></nav>
|
||||||
</header>
|
</header>
|
||||||
<table>
|
<table id="content">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" title="Index">#</th>
|
<th scope="col" title="Index">#</th>
|
||||||
|
|
@ -31,22 +47,22 @@ tags:
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody id="positions"></tbody>
|
||||||
</table>
|
</table>
|
||||||
{% render 'hippie/partials/frame-status.liquid' %}
|
{% render 'hippie/partials/frame-status.liquid' %}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<template id="default-row">
|
<template id="rowDefault">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"></th>
|
<th scope="row"></th>
|
||||||
<td class="io">
|
<td class="io">
|
||||||
<nav>
|
<nav>
|
||||||
<button title="drag"><i class="bi bi-grip-horizontal"></i></button>
|
<button title="Drag"><i class="bi bi-grip-horizontal"></i></button>
|
||||||
<button title="expand"><i class="bi bi-arrows-expand-vertical"></i></button>
|
<button title="Expand"><i class="bi bi-arrows-expand"></i></button>
|
||||||
</nav>
|
</nav>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td class="pos-num"></td>
|
||||||
<td></td>
|
<td class="rigid"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
{% comment %}<td class="ellipsis"></td>{% endcomment %}
|
{% comment %}<td class="ellipsis"></td>{% endcomment %}
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -55,9 +71,9 @@ tags:
|
||||||
<td class="unit"></td>
|
<td class="unit"></td>
|
||||||
<td class="io">
|
<td class="io">
|
||||||
<nav>
|
<nav>
|
||||||
<button title="event"><i class="bi bi-calendar-event"></i></button>
|
<button title="Event"><i class="bi bi-calendar-event"></i></button>
|
||||||
<button title="note"><i class="bi bi-journal"></i></button>
|
<button title="Note"><i class="bi bi-journal"></i></button>
|
||||||
<button title="delete"><i class="bi bi-trash"></i></button>
|
<button title="Delete"><i class="bi bi-trash"></i></button>
|
||||||
</nav>
|
</nav>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -97,13 +113,27 @@ tags:
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum facilisis condimentum quam, bibendum tristique odio.'
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum facilisis condimentum quam, bibendum tristique odio.'
|
||||||
];
|
];
|
||||||
|
|
||||||
const tbody = document.querySelector('main.io section > table');
|
const currencyEuro = new Intl.NumberFormat('de-DE', {style: 'currency', currency: 'EUR'});
|
||||||
const template = document.querySelector('#default-row');
|
|
||||||
|
|
||||||
const currencyEuro = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' });
|
const content = document.querySelector('main.io section > table');
|
||||||
|
// const content = document.getElementById('content');
|
||||||
|
const tbodyPosition = document.getElementById('positions');
|
||||||
|
|
||||||
|
tbodyPosition.addEventListener('click', (event) => {
|
||||||
|
const rows = tbodyPosition.querySelectorAll('tr');
|
||||||
|
const rowTarget = event.target.closest('tr');
|
||||||
|
|
||||||
|
if (rowTarget && event.button === 0) {
|
||||||
|
for (row of rows) {
|
||||||
|
row.classList.remove('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
rowTarget.classList.add('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
for (let i = 0; i < 256; i++) {
|
for (let i = 0; i < 256; i++) {
|
||||||
const clone = document.importNode(template.content, true);
|
const clone = cloneRow();
|
||||||
const tr = clone.querySelector('tr');
|
const tr = clone.querySelector('tr');
|
||||||
const th = clone.querySelector('th');
|
const th = clone.querySelector('th');
|
||||||
const td = clone.querySelectorAll('td');
|
const td = clone.querySelectorAll('td');
|
||||||
|
|
@ -113,13 +143,90 @@ tags:
|
||||||
|
|
||||||
tr.setAttribute('data-id', i);
|
tr.setAttribute('data-id', i);
|
||||||
th.textContent = i + 1;
|
th.textContent = i + 1;
|
||||||
|
td[2].textContent = getRandomFormattedString();
|
||||||
td[3].textContent = placeholderNames[j];
|
td[3].textContent = placeholderNames[j];
|
||||||
// td[2].innerHTML = replaceLineBreaks(placeholderContents[k]);
|
// td[2].innerHTML = replaceLineBreaks(placeholderContents[k]);
|
||||||
td[4].firstElementChild.textContent = placeholderContents[k];
|
td[4].firstElementChild.textContent = placeholderContents[k];
|
||||||
// td[5].textContent = randomIntFrom(1, i).toString();
|
// td[5].textContent = randomIntFrom(1, i).toString();
|
||||||
td[5].textContent = currencyEuro.format(randomFloatFrom(1, 1000000, 2));
|
td[5].textContent = currencyEuro.format(randomFloatFrom(1, 1000000, 2));
|
||||||
|
|
||||||
tbody.appendChild(clone);
|
tbodyPosition.appendChild(clone);
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectNum = document.getElementById('sltNum');
|
||||||
|
const buttonPosNum = document.getElementById('setPosNum');
|
||||||
|
|
||||||
|
buttonPosNum.addEventListener('click', () => {
|
||||||
|
const numType = selectNum.value;
|
||||||
|
const cells = tbodyPosition.querySelectorAll('td.pos-num');
|
||||||
|
let num = '';
|
||||||
|
|
||||||
|
for (let i = 0; i < cells.length; i++) {
|
||||||
|
switch (numType) {
|
||||||
|
case 'numeric':
|
||||||
|
num = (i + 1).toString();
|
||||||
|
break;
|
||||||
|
case 'roman':
|
||||||
|
num = convertToRomanNumeral((i + 1)).toString();
|
||||||
|
break;
|
||||||
|
case '':
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
cells[i].textContent = num;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const buttonIndex = document.getElementById('tglIndex');
|
||||||
|
|
||||||
|
buttonIndex.addEventListener('click', () => {
|
||||||
|
const cells = content.querySelectorAll('th:first-child');
|
||||||
|
const isHidden = cells[0].classList.contains('di_none');
|
||||||
|
|
||||||
|
for (cell of cells) {
|
||||||
|
if (isHidden) {
|
||||||
|
cell.classList.remove('di_none');
|
||||||
|
} else {
|
||||||
|
cell.classList.add('di_none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const buttonAdd = document.getElementById('addEntry');
|
||||||
|
const checkScroll = document.getElementById('setScroll');
|
||||||
|
|
||||||
|
buttonAdd.addEventListener('click', () => {
|
||||||
|
const clone = cloneRow();
|
||||||
|
const viewportHeight = window.innerHeight;
|
||||||
|
const elementActive = tbodyPosition.querySelector('tr.active');
|
||||||
|
let elementNew = undefined;
|
||||||
|
let elementBound = undefined;
|
||||||
|
|
||||||
|
if (elementActive) {
|
||||||
|
elementActive.after(clone);
|
||||||
|
elementNew = elementActive.nextElementSibling;
|
||||||
|
} else {
|
||||||
|
tbodyPosition.appendChild(clone);
|
||||||
|
elementNew = tbodyPosition.lastElementChild;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checkScroll.checked) {
|
||||||
|
elementBound = elementNew.getBoundingClientRect();
|
||||||
|
|
||||||
|
if (elementBound.bottom > viewportHeight || elementBound.top < 0) {
|
||||||
|
elementNew.scrollIntoView({behavior: 'smooth', block: 'nearest'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TODO: Neuen index bilden
|
||||||
|
});
|
||||||
|
|
||||||
|
function cloneRow(type = 'default') {
|
||||||
|
type = 'row' + capitalizeFirstLetter(type);
|
||||||
|
|
||||||
|
const rowFragment = document.getElementById(type).content;
|
||||||
|
// TODO: Datenübergabe ergänzen und direkt hier in die Node aufnehmen
|
||||||
|
|
||||||
|
return document.importNode(rowFragment, true);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
13
source/screens/demo/examples/ui/tui.liquid
Normal file
13
source/screens/demo/examples/ui/tui.liquid
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
title: TUI
|
||||||
|
tags:
|
||||||
|
- ui
|
||||||
|
---
|
||||||
|
{% assign bodyClass = "body_frame" -%}
|
||||||
|
{% layout "hippie/app.liquid" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% render 'hippie/partials/frame-header.liquid' %}
|
||||||
|
<main class="io"></main>
|
||||||
|
{% render 'hippie/partials/frame-mode.liquid' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
title: TUI
|
|
||||||
tags:
|
|
||||||
- ui
|
|
||||||
---
|
|
||||||
{% set pageId = page.fileSlug %}
|
|
||||||
|
|
||||||
{% extends "hippie/_app_frame.njk" %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
{{ io.frameHeader('title-bar') }}
|
|
||||||
<main class="io"></main>
|
|
||||||
{{ io.frameFooter('mode-bar') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
@ -18,8 +18,8 @@ tags:
|
||||||
<nav class="big">
|
<nav class="big">
|
||||||
<button><i class="bi bi-folder"></i></button>
|
<button><i class="bi bi-folder"></i></button>
|
||||||
<button><i class="bi bi-terminal"></i></button>
|
<button><i class="bi bi-terminal"></i></button>
|
||||||
<button id="pauseButton"><i class="bi bi-pause"></i></button>
|
<button id="setPause"><i class="bi bi-pause"></i></button>
|
||||||
<button id="resumeButton"><i class="bi bi-play"></i></button>
|
<button id="setPlay"><i class="bi bi-play"></i></button>
|
||||||
</nav>
|
</nav>
|
||||||
<div>
|
<div>
|
||||||
<nav class="small">
|
<nav class="small">
|
||||||
|
|
@ -67,11 +67,11 @@ tags:
|
||||||
const timeFormat = {hour: '2-digit', minute: '2-digit'};
|
const timeFormat = {hour: '2-digit', minute: '2-digit'};
|
||||||
const timeDisplay = new TimeDisplay(timeElement, timeFormat);
|
const timeDisplay = new TimeDisplay(timeElement, timeFormat);
|
||||||
|
|
||||||
document.getElementById('pauseButton').addEventListener('click', () => {
|
document.getElementById('setPause').addEventListener('click', () => {
|
||||||
timeDisplay.pause();
|
timeDisplay.pause();
|
||||||
console.info('Pause time');
|
console.info('Pause time');
|
||||||
});
|
});
|
||||||
document.getElementById('resumeButton').addEventListener('click', () => {
|
document.getElementById('setPlay').addEventListener('click', () => {
|
||||||
timeDisplay.resume();
|
timeDisplay.resume();
|
||||||
console.info('Resume time');
|
console.info('Resume time');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0623e818a49176ca7516a88943e07a882ba5262d
|
Subproject commit 530748663f02ac15597c78843a12cd1f9973c4c9
|
||||||
Loading…
Add table
Add a link
Reference in a new issue