Config-Funktionen in eigenes Modul, fixes #7
This commit is contained in:
+3
-4
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Config</title>
|
||||
<title>Settings</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
button {
|
||||
background-color: hsl(0, 0%, 50%);
|
||||
/* border: 1px solid rgba(255, 255, 255, 0.12); */
|
||||
border-width: 1px;
|
||||
border-radius: 0.25rem;
|
||||
line-height: 1.5;
|
||||
@@ -72,10 +71,10 @@
|
||||
<body>
|
||||
<div class="config">
|
||||
<label for="url">Url</label>
|
||||
<input type="text" id="url" value="file:///assets/data/index.html">
|
||||
<input type="text" id="url" placeholder="https://...">
|
||||
|
||||
<label for="whitelist">Allowed Domains</label>
|
||||
<textarea name="whitelist" id="whitelist"></textarea>
|
||||
<textarea name="whitelist" id="whitelist" placeholder="domain.tld;domain.tld"></textarea>
|
||||
|
||||
<label for="logpath">Logging Path</label>
|
||||
<input type="text" id="logpath" value="/assets/logs/tooloop-kiosk-browser.log">
|
||||
|
||||
+53
-33
@@ -22,15 +22,7 @@
|
||||
}
|
||||
|
||||
html {
|
||||
/* background-color: #000; */
|
||||
background-image: url('../images/icon-512.png');
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
body {
|
||||
backdrop-filter: blur(10px) brightness(50%);
|
||||
background: linear-gradient(to left, #de6262, #ffb88c);
|
||||
}
|
||||
|
||||
h1,
|
||||
@@ -38,18 +30,22 @@
|
||||
line-height: 1;
|
||||
margin: 1rem 0 1.333rem 0;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 2.25rem;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.333;
|
||||
line-height: 1.4;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: hsl(0, 0%, 25%);
|
||||
color: #f2f2f2;
|
||||
background-color: hsl(0, 0%, 85%);
|
||||
color: #333;
|
||||
font-weight: 300;
|
||||
font-size: 0.9rem;
|
||||
padding: 0.1666em 0.333em;
|
||||
padding: 0.133em 0.333em;
|
||||
}
|
||||
|
||||
pre {
|
||||
@@ -95,6 +91,7 @@
|
||||
padding: 1.1666rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow: auto;
|
||||
box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
@@ -102,13 +99,33 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th {
|
||||
width: min-content;
|
||||
}
|
||||
|
||||
td {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
|
||||
td, th {
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
border-top: 1px solid lightblue;
|
||||
border-bottom: 1px solid lightblue;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
|
||||
body,
|
||||
html {
|
||||
display: block;
|
||||
/* height: auto; */
|
||||
}
|
||||
|
||||
#info {
|
||||
@@ -147,31 +164,34 @@
|
||||
<div class="columns">
|
||||
<article class="card">
|
||||
<h2>Add your content</h2>
|
||||
<p>You can load a local page or an online ressource.</p>
|
||||
<p>The first thing you might want to do, is configure your page to load. You can load a local page or an
|
||||
online ressource.</p>
|
||||
<p>
|
||||
Put your local content in <code>/assets/data/index.html</code>
|
||||
or configure a URL in the config file (→ see <i>Configuration</i>).
|
||||
or configure a URL in the settings (shortcut <code>Strg + ,</code>).
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<h2>Configuration</h2>
|
||||
<p>If you need a config file, put it in either of these locations:</p>
|
||||
<ol>
|
||||
<li><code>/assets/presentation/config.json</code></li>
|
||||
<li>The application folder</li>
|
||||
</ol>
|
||||
<p>Here is an example:</p>
|
||||
<p>
|
||||
<pre><code>{
|
||||
"url": "https://www.tooloop.de",
|
||||
"whitelist": [
|
||||
"tooloop.de",
|
||||
"www.tooloop.de"
|
||||
],
|
||||
"logPath": "/assets/logs/Tooloop-Kiosk-Browser.log"
|
||||
}</code></pre>
|
||||
</p>
|
||||
<h2>Keyboard shortcuts</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th><code>Ctrl + ,</code></th>
|
||||
<td>Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Ctrl + F</code></th>
|
||||
<td>Toggle Fullscreen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Ctrl + Q</code></th>
|
||||
<td>Quit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Ctrl + R</code></th>
|
||||
<td>Reload</td>
|
||||
</tr>
|
||||
</table>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user