-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathec2.html
52 lines (46 loc) · 1.58 KB
/
ec2.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
<!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">
<script type="module" 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 -->
</main>
<script>
// Example of using localforage in your page
import localforage from 'https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js';
const store = localforage.createInstance({
name: 'ecoops-platform'
});
// Example: Save some page-specific data
async function savePageData() {
await store.setItem('pageData', {
lastVisited: new Date(),
userPreferences: {
theme: 'light',
fontSize: 'medium'
}
});
}
// Example: Retrieve page data
async function loadPageData() {
const pageData = await store.getItem('pageData');
if (pageData) {
// Use the data to initialize page state
console.log('Last visited:', pageData.lastVisited);
}
}
// Initialize page
loadPageData();
</script>
</body>
</html>