feat: Change file structure
- Move return object to named export for 11ty config - screens is now view - 11ty data files moved to view/_data - templates is now view/_includes - Both are the default directories - data is now used as intended, for user data - Update index to reflect filenames and structure
This commit is contained in:
parent
610e22b3c9
commit
b67a8a893a
78 changed files with 21 additions and 19 deletions
69
source/view/demo/examples/card.liquid
Normal file
69
source/view/demo/examples/card.liquid
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
title: Card
|
||||
tags:
|
||||
- demoExample
|
||||
---
|
||||
{% assign pageClass = "html_card" %}
|
||||
{% layout 'hippie/simple.liquid' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="card_bkg">
|
||||
<div id="dither"></div>
|
||||
{% render 'hippie/partials/placeholder-flag.liquid', type: '', id: 'flag' %}
|
||||
{% comment %}<img id="dither" src="art/flag_dither.png" width="1920" height="1200" alt="Background flag dithered"/>{% endcomment %}
|
||||
</div>
|
||||
<div class="card_box">
|
||||
<main>
|
||||
<p>Titel<br/>und Beschreibung</p>
|
||||
<h1>{% text hippie.placeholders.name %}</h1>
|
||||
<p>
|
||||
{% link hippie.placeholders.mail, '', '', 'card_address' %}<br/>
|
||||
{% link hippie.placeholders.domain, 'site.tld', '', 'decent' %}
|
||||
·
|
||||
{% text hippie.placeholders.address, '', 'decent' %}</p>
|
||||
</main>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
const flag = document.getElementById('flag');
|
||||
let colors = new Array();
|
||||
let iId = undefined;
|
||||
let position = 0;
|
||||
|
||||
for (let i = 1; i <= flag.childElementCount; i++) {
|
||||
colors.push(document.getElementById('triangle-' + i).getAttribute('fill'));
|
||||
}
|
||||
|
||||
document
|
||||
.querySelector('main')
|
||||
.addEventListener('mouseenter', () => {
|
||||
iId = setInterval(() => {
|
||||
for (let i = 1; i <= colors.length; i++) {
|
||||
position++;
|
||||
|
||||
if (position >= colors.length) {
|
||||
position = 0;
|
||||
}
|
||||
|
||||
document
|
||||
.getElementById('triangle-' + i)
|
||||
.setAttribute('fill', colors[position]);
|
||||
}
|
||||
|
||||
position++;
|
||||
|
||||
if (position >= colors.length) {
|
||||
position = 0;
|
||||
}
|
||||
}, 600);
|
||||
});
|
||||
|
||||
document
|
||||
.querySelector('main')
|
||||
.addEventListener('mouseleave', () => {
|
||||
iId && clearInterval(iId);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue