html-sites #3

Merged
TorstenHettstedt merged 10 commits from html-sites into master 2021-04-08 20:16:00 +02:00
3 changed files with 86 additions and 66 deletions
Showing only changes of commit 89ad394773 - Show all commits
+5 -2
View File
@@ -1,8 +1,11 @@
<header>
Arbeitszeiten
</header>
<Nav {active} />
<main>
<svelte:component this={Route} {params} />
<svelte:component this={Route} {params} />
</main>
<footer><p>© Torsten Lücke 2021</p></footer>
<script>
import Navaid from 'navaid';
+27 -22
View File
@@ -6,25 +6,30 @@
<title>{params.title}</title>
</svelte:head>
<h1>{params.title}</h1>
<table>
<thead>
<tr>
<th>Zeitraum</th>
<th>Arbeitstage</th>
<th>Arbeitsstunden</th>
<th>Über- / Unterstunden</th>
</tr>
</thead>
<tbody>
{#each params.records as record}
<tr>
<td>{record.period}</td>
<td>{record.workingDays}</td>
<td>{record.totalHours}</td>
<td>{record.overtime}</td>
</tr>
{/each}
</tbody>
</table>
<section id="list-records">
<header>
<h1>{params.title}</h1>
</header>
<article>
<table>
<thead>
<tr>
<th>Zeitraum</th>
<th>Arbeitstage</th>
<th>Arbeitsstunden</th>
<th>Über- / Unterstunden</th>
</tr>
</thead>
<tbody>
{#each params.records as record}
<tr>
<td>{record.period}</td>
<td>{record.workingDays}</td>
<td>{record.totalHours}</td>
<td>{record.overtime}</td>
</tr>
{/each}
</tbody>
</table>
</article>
</section>
+54 -42
View File
@@ -13,48 +13,60 @@
<title>{title}</title>
</svelte:head>
<h1>{title}</h1>
{#if activeRecord === null}
<table>
<thead>
<tr>
<th>Datum</th>
<th>Arbeitsstunden</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
{#each params.records as record}
<tr>
<td>{record.workingDay}</td>
<td>{record.workingTime}</td>
<td>
<button>Bearbeiten <IconifyIcon icon={wrenchIcon} /></button>
<button>Löschen <IconifyIcon icon={trashIcon} color="red" /></button>
</td>
</tr>
{/each}
</tbody>
</table>
<section id="list-records">
<header>
<h1>{title}</h1>
</header>
<article>
<table>
<thead>
<tr>
<th>Datum</th>
<th>Arbeitsstunden</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
{#each params.records as record}
<tr>
<td>{record.workingDay}</td>
<td>{record.workingTime}</td>
<td>
<button>Bearbeiten <IconifyIcon icon={wrenchIcon} /></button>
<button>Löschen <IconifyIcon icon={trashIcon} color="red" /></button>
</td>
</tr>
{/each}
</tbody>
</table>
</article>
</section>
{:else}
<!--suppress HtmlUnknownTarget -->
<form action="/working-hours" name="editRecord">
<fieldset name="record-data">
<div>
<label for="workingDay">Arbeitstag</label>
<!--suppress JSUnresolvedVariable -->
<input bind:value={activeRecord.workingDay} placeholder="Arbeitstag" type="date" id="workingDay">
</div>
<div>
<label for="workingTime">Arbeitszeit</label>
<!--suppress JSUnresolvedVariable -->
<input bind:value={activeRecord.workingTime} placeholder="Arbeitszeit" type="time" id="workingTime">
</div>
</fieldset>
<fieldset name="buttons">
<button>Übernehmen <IconifyIcon icon={checkIcon} color="green" /></button>
<button>Abbrechen <IconifyIcon icon={xIcon} /></button>
</fieldset>
</form>
<section id="edit-record">
<header>
<h1>{title}</h1>
</header>
<article>
<!--suppress HtmlUnknownTarget -->
<form action="/working-hours" name="editRecord">
<fieldset name="record-data">
<div>
<label for="workingDay">Arbeitstag</label>
<!--suppress JSUnresolvedVariable -->
<input bind:value={activeRecord.workingDay} placeholder="Arbeitstag" type="date" id="workingDay">
</div>
<div>
<label for="workingTime">Arbeitszeit</label>
<!--suppress JSUnresolvedVariable -->
<input bind:value={activeRecord.workingTime} placeholder="Arbeitszeit" type="time" id="workingTime">
</div>
</fieldset>
<fieldset name="buttons">
<button>Übernehmen <IconifyIcon icon={checkIcon} color="green" /></button>
<button>Abbrechen <IconifyIcon icon={xIcon} /></button>
</fieldset>
</form>
</article>
</section>
{/if}