Första incheckningen. Protyp för PWA för att skapa todos
This commit is contained in:
43
public/index.html
Normal file
43
public/index.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="sv-SE">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Task Input App</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<!-- Flatpickr for dates -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>TODO</h1>
|
||||
<form id="taskForm">
|
||||
<label for="subject">Uppgift:</label>
|
||||
<input type="text" id="subject" required><br><br>
|
||||
|
||||
<label for="description">Beskrivning:</label>
|
||||
<textarea id="description"></textarea><br><br>
|
||||
|
||||
<label for="deadline">Datum:</label>
|
||||
<input type="date" id="deadline" lang="sv-SE" required><br><br>
|
||||
|
||||
<button type="submit">Spara</button>
|
||||
</form>
|
||||
<p id="responseMessage"></p>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
<script>
|
||||
// Set today's date as the default for the date input
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
document.getElementById('deadline').value = today;
|
||||
// Initialize flatpickr with Swedish locale and Monday as the first day of the week
|
||||
flatpickr("#deadline", {
|
||||
locale: "sv", // Set Swedish locale
|
||||
weekNumbers: true, // Show week numbers
|
||||
firstDayOfWeek: 1 // Start weeks on Monday
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user