-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
66 lines (61 loc) · 3.37 KB
/
index.html
File metadata and controls
66 lines (61 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tagebuch</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css" rel="stylesheet">
<style>
html,
body
{
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
</style>
</head>
<body class="bg-gray-100" x-data="app()">
<div class="container mx-auto py-10 px-4">
<h1 class="text-3xl font-bold mb-6">Tagebuch</h1>
<div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="date">
Tag
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="date" type="date" placeholder="Entries date" x-model="date">
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="description">
Was möchte ich von diesem Tag erinnern?
</label>
<textarea id="description" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" type="text" x-model="description" name="" id="" cols="30" rows="10"></textarea>
</div>
<div class="flex items-center justify-between space-x-1">
<button class="w-1/3 bg-blue-500 hover:bg-blue-700 text-white text-xs py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button" @click="saveEntries()" :disabled="!description">
Speichern
</button>
<button class="w-1/3 bg-red-500 hover:bg-red-700 text-white text-xs py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button" @click="deleteAllEntries()">
Lösche alles
</button>
<button class="w-1/3 bg-green-500 hover:bg-green-700 text-white text-xs py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button" @click="copyEntries()" title="Copy All To Clipboard">
Kopiere alles
</button>
</div>
</div>
<div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
<h2 class="text-2xl font-bold mb-4">Einträge</h2>
<ul>
<template x-for="(Entries, index) in entries" :key="index">
<li class="mb-2">
<span x-text="Entries.date"></span> |
<span x-text="Entries.description"></span>
<button class="ml-2 text-blue-500 hover:text-blue-700" type="button" @click="editEntries(index)">Ändern</button>
<button class="ml-2 text-red-500 hover:text-red-700" type="button" @click="deleteEntries(index)">Löschen</button>
</li>
</template>
</ul>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.9.0/dist/cdn.min.js" defer></script>
<script src="app.js"></script>
</body>
</html>