Compare commits
4 Commits
d14d65f3eb
...
material-d
| Author | SHA1 | Date | |
|---|---|---|---|
| 3190629286 | |||
| 54eaf7dcfb | |||
| 20f772aae7 | |||
| 575384d67f |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Task Manager",
|
"name": "Fredriks todos",
|
||||||
"short_name": "TaskApp",
|
"short_name": "TODO",
|
||||||
"description": "An app to manage tasks in Org mode format.",
|
"description": "An app to manage tasks in Org mode format.",
|
||||||
"start_url": "/",
|
"start_url": "/",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
|
|||||||
BIN
public/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -1,3 +1,15 @@
|
|||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
navigator.serviceWorker.register('/service-worker.js')
|
||||||
|
.then(registration => {
|
||||||
|
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log('ServiceWorker registration failed: ', error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('taskForm').addEventListener('submit', function(e) {
|
document.getElementById('taskForm').addEventListener('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|||||||
BIN
public/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
public/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 467 B |
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/icons/icon-192x192.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/icons/icon-512x512.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
@@ -4,27 +4,36 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Fredriks todos</title>
|
<title>Fredriks todos</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
|
<link rel="manifest" href="manifest.json" />
|
||||||
|
|
||||||
<!-- Flatpickr for dates -->
|
<!-- Flatpickr for dates -->
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>TODO</h1>
|
<h1 class="center-align">TODO</h1>
|
||||||
<form id="taskForm">
|
<form id="taskForm">
|
||||||
<label for="subject">Uppgift:</label>
|
<div class="input-field">
|
||||||
<input type="text" id="subject" required><br><br>
|
<label for="subject">Uppgift:</label>
|
||||||
|
<input type="text" id="subject" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label for="description">Beskrivning:</label>
|
<div class="input-field">
|
||||||
<textarea id="description"></textarea><br><br>
|
<label for="description">Beskrivning:</label>
|
||||||
|
<textarea id="description" class="materialize-textarea"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label for="scheduled">Datum:</label>
|
<div class="input-field">
|
||||||
<input type="date" id="scheduled" lang="sv-SE" required><br><br>
|
<label for="scheduled">Datum:</label>
|
||||||
|
<input type="date" id="scheduled" lang="sv-SE" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit">Spara</button>
|
<button class="btn waves-effect waves-light" type="submit">Spara</button>
|
||||||
</form>
|
</form>
|
||||||
<p id="responseMessage"></p>
|
<p id="responseMessage" class="center-align"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
@@ -34,10 +43,11 @@
|
|||||||
document.getElementById('scheduled').value = today;
|
document.getElementById('scheduled').value = today;
|
||||||
// Initialize flatpickr with Swedish locale and Monday as the first day of the week
|
// Initialize flatpickr with Swedish locale and Monday as the first day of the week
|
||||||
flatpickr("#scheduled", {
|
flatpickr("#scheduled", {
|
||||||
locale: "sv", // Set Swedish locale
|
//locale: "sv-SE", // Set Swedish locale
|
||||||
weekNumbers: true, // Show week numbers
|
weekNumbers: true, // Show week numbers
|
||||||
firstDayOfWeek: 1 // Start weeks on Monday
|
firstDayOfWeek: 1 // Start weeks on Monday
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
22
public/manifest.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "Fredriks todos",
|
||||||
|
"short_name": "TODO",
|
||||||
|
"description": "Fredriks app to manage tasks in Org mode format.",
|
||||||
|
"start_url": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"theme_color": "#4CAF50",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "icons/icon-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icons/icon-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -20,28 +20,6 @@ h1 {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
input, textarea {
|
|
||||||
width: 90%;
|
|
||||||
padding: 8px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #4CAF50;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: #45a049;
|
|
||||||
}
|
|
||||||
|
|
||||||
#responseMessage {
|
#responseMessage {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: green;
|
color: green;
|
||||||
|
|||||||