INBOX/DASHBOARD_PERPL/artifact-a4f02344-eba6-47bf-a1a8-d60ae8ddeef3-3.html
2026-08-07 15:50:54 +02:00

164 lines
No EOL
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: white; /* Ensure the iframe has a white background */
}
</style>
</head>
<body>
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8">
<title>Ivory & Ink Bullet Journal</title>
<!-- 1) Tokens from the style guide -->
<style>
:root {
/* Light theme */
--page: #FAF8F2;
--surface: #FFFEFA;
--surface-alt: #F6F2E9;
--text: #242321;
--muted: #6E6A63;
--border: #D8D1C5;
--primary: #2D2B28;
--secondary: #E8E2D8;
--focus: #F0E68C;
}
html[data-theme="dark"] {
/* Dark theme */
--page: #020202;
--surface: #151411;
--surface-alt: #201E1A;
--text: #FAF7EF;
--muted: #C7C1B5;
--border: #4D4941;
--primary: #E8E1D4;
--secondary: #4C4840;
--focus: #FFD700;
}
/* Layout */
body {
background: var(--page);
color: var(--text);
font-family: system-ui, sans-serif;
margin: 2rem;
line-height: 1.6;
transition: background 0.3s, color 0.3s;
}
h1 { margin-bottom: 1rem; }
section { margin-bottom: 2rem; }
.card {
background: var(--surface);
border: 1px solid var(--border);
padding: 1rem;
border-radius: 6px;
margin-bottom: 1rem;
transition: background 0.3s, border-color 0.3s;
}
.card:focus-within {
border-color: var(--primary);
outline: 3px solid var(--focus);
}
ul { list-style: none; padding-left: 0; }
li { margin-bottom: 0.5rem; }
/* Button styles primary button from the guide [1] */
button {
background: var(--primary);
color: var(--secondary);
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
font-family: inherit;
}
button.secondary { background: var(--secondary); color: var(--primary); }
</style>
</head>
<body>
<h1>My Bullet Journal</h1>
<!-- Daily Log -->
<section class="card" tabindex="0">
<h2>Daily Log</h2>
<ul id="daily-log"></ul>
<form id="daily-form">
<input type="text" id="daily-input" placeholder="Add a daily item" required>
<button type="submit">Add</button>
</form>
</section>
<!-- Tasks -->
<section class="card" tabindex="0">
<h2>Tasks</h2>
<ul id="tasks"></ul>
<form id="tasks-form">
<input type="text" id="tasks-input" placeholder="Add a task" required>
<button type="submit">Add</button>
</form>
</section>
<!-- Notes -->
<section class="card" tabindex="0">
<h2>Notes</h2>
<ul id="notes"></ul>
<form id="notes-form">
<input type="text" id="notes-input" placeholder="Add a note" required>
<button type="submit">Add</button>
</form>
</section>
<!-- Theme toggle -->
<button id="themeToggle" class="secondary">Toggle Theme</button>
<script>
/* 1) Theme toggle */
const toggle = document.getElementById('themeToggle');
toggle.addEventListener('click', () => {
const current = document.documentElement.getAttribute('data-theme');
document.documentElement.setAttribute('data-theme', current === 'light' ? 'dark' : 'light');
});
/* 2) Simple addtolist helper */
function addItem(listId, inputId) {
const list = document.getElementById(listId);
const input = document.getElementById(inputId);
const text = input.value.trim();
if (!text) return;
const li = document.createElement('li');
li.textContent = text;
list.appendChild(li);
input.value = '';
}
/* 3) Form handlers */
document.getElementById('daily-form').addEventListener('submit', e => { e.preventDefault(); addItem('daily-log', 'daily-input'); });
document.getElementById('tasks-form').addEventListener('submit', e => { e.preventDefault(); addItem('tasks', 'tasks-input'); });
document.getElementById('notes-form').addEventListener('submit', e => { e.preventDefault(); addItem('notes', 'notes-input'); });
</script>
</body>
</html>
<script>
</script>
</body>
</html>