Added editorconfig and option to set section layout.

This commit is contained in:
2022-04-23 18:33:32 +03:00
parent 41daff5390
commit 210b600f21
18 changed files with 262 additions and 213 deletions
@@ -7,9 +7,7 @@
{{> (include_partial "layouts/partials/toolbar") }}
<main>
<div class="container">
{{> (include_block_template) }}
</div>
{{> (include_block_template) }}
</main>
{{> (include_partial "layouts/partials/scripts") }}
@@ -7,7 +7,9 @@
{{> (include_partial "layouts/partials/toolbar") }}
<main>
<div class="container">
{{> (include_block_template) }}
</div>
</main>
{{> (include_partial "layouts/partials/scripts") }}
+6 -6
View File
@@ -1,9 +1,9 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ config.cssUrl }}">
<link rel="stylesheet" href="styles/page--main.css">
<link rel="stylesheet" href="styles/{{ config.blockName }}.min.css">
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css"/>
<link rel="stylesheet" href="{{ config.cssUrl }}">
<link rel="stylesheet" href="styles/page--main.css">
<link rel="stylesheet" href="styles/{{ config.blockName }}.min.css">
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css"/>
</head>
+8 -8
View File
@@ -1,11 +1,11 @@
<header class="page_toolbar">
<div>
<label for="data-options">Data Options: </label>
<div>
<label for="data-options">Data Options: </label>
<select name="data" id="data-options">
{{#each config.dataFiles }}
<option value="{{ name }}" {{#if active }}selected="selected"{{/if}}>{{ name }}</option>
{{/each}}
</select>
</div>
<select name="data" id="data-options">
{{#each config.dataFiles }}
<option value="{{ name }}" {{#if active }}selected="selected"{{/if}}>{{ name }}</option>
{{/each}}
</select>
</div>
</header>
+8 -8
View File
@@ -1,13 +1,13 @@
(function () {
const dataOptionsSelect = document.getElementById('data-options');
if (!dataOptionsSelect) {
return;
}
const dataOptionsSelect = document.getElementById('data-options');
if (!dataOptionsSelect) {
return;
}
dataOptionsSelect.addEventListener('change', function () {
console.log(this.value)
window.location = '?data=' + this.value;
})
dataOptionsSelect.addEventListener('change', function () {
console.log(this.value)
window.location = '?data=' + this.value;
})
})();
+11 -11
View File
@@ -1,20 +1,20 @@
body {
margin: 0;
font-size: 1rem;
margin: 0;
font-size: 1rem;
}
header.page_toolbar {
font-family: Arial, sans-serif;
background-color: #ccc;
padding: 1rem;
font-family: Arial, sans-serif;
background-color: #ccc;
padding: 1rem;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 2rem;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 2rem;
}
header.page_toolbar select {
font-size: 0.85rem;
padding: 0.25rem;
font-size: 0.85rem;
padding: 0.25rem;
}