74 lines
2.8 KiB
HTML
74 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sv-SE">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<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="manifest" href="manifest.json" />
|
|
|
|
<!-- 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 id="loginContainer" class="container">
|
|
<h1 class="center-align">Logga in</h1>
|
|
<form id="loginForm">
|
|
<div class="input-field">
|
|
<label for="username">Användarnamn:</label>
|
|
<input type="text" id="username" required>
|
|
</div>
|
|
<div class="input-field">
|
|
<label for="password">Lösenord:</label>
|
|
<input type="password" id="password" required>
|
|
</div>
|
|
<button class="btn waves-effect waves-light" type="submit">Login</button>
|
|
</form>
|
|
<p id="loginMessage" class="center-align"></p>
|
|
</div>
|
|
|
|
<div id="appContainer" class="container" style="display:none;">
|
|
<h1 class="center-align">TODO</h1>
|
|
<form id="taskForm">
|
|
<div class="input-field">
|
|
<label for="subject">Uppgift:</label>
|
|
<input type="text" id="subject" required>
|
|
</div>
|
|
|
|
<div class="input-field">
|
|
<label for="description">Beskrivning:</label>
|
|
<textarea id="description" class="materialize-textarea"></textarea>
|
|
</div>
|
|
|
|
<div class="input-field">
|
|
<label for="scheduled">Datum:</label>
|
|
<input type="date" id="scheduled" lang="sv-SE" required>
|
|
</div>
|
|
|
|
<div class="input-field">
|
|
<label for="tags">Taggar (separera med komma):</label>
|
|
<input type="text" id="tags" class="autocomplete">
|
|
</div>
|
|
|
|
<button class="btn waves-effect waves-light" type="submit">Spara</button>
|
|
</form>
|
|
<p id="responseMessage" class="center-align"></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('scheduled').value = today;
|
|
// Initialize flatpickr with Swedish locale and Monday as the first day of the week
|
|
flatpickr("#scheduled", {
|
|
weekNumbers: true, // Show week numbers
|
|
firstDayOfWeek: 1 // Start weeks on Monday
|
|
});
|
|
</script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
|
</body>
|
|
</html>
|