-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecoo.html
64 lines (58 loc) · 2.06 KB
/
ecoo.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EcoOps Platform</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<!-- Load localforage first -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js"></script>
<!-- Then load our header component -->
<script src="/header.js"></script>
</head>
<body>
<eco-header>
<h1 class="text-3xl font-bold mb-2">Page Title</h1>
<p class="text-xl">Page subtitle or description</p>
</eco-header>
<main class="container mx-auto p-8">
<!-- Page content here -->
<h4>kiva</h4>
</main>
<script>
// Example of using localforage in your page
document.addEventListener('DOMContentLoaded', function() {
const store = localforage.createInstance({
name: 'ecoops-platform'
});
// Example: Save page data
async function savePageData() {
try {
await store.setItem('pageData', {
lastVisited: new Date().toISOString(),
userPreferences: {
theme: 'light',
fontSize: 'medium'
}
});
} catch (err) {
console.warn('Could not save page data:', err);
}
}
// Example: Load page data
async function loadPageData() {
try {
const pageData = await store.getItem('pageData');
if (pageData) {
console.log('Last visited:', pageData.lastVisited);
}
} catch (err) {
console.warn('Could not load page data:', err);
}
}
// Initialize page
loadPageData();
});
</script>
</body>
</html>