|
1 | 1 | <!DOCTYPE html> |
2 | | -<html> |
3 | | - <head> |
4 | | - <meta charset="utf-8"> |
5 | | - <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | | - <title>Welcome to Firebase Hosting</title> |
| 2 | +<html lang="en"> |
7 | 3 |
|
8 | | - <!-- update the version number as needed --> |
9 | | - <script defer src="/__/firebase/12.0.0/firebase-app-compat.js"></script> |
10 | | - <!-- include only the Firebase features as you need --> |
11 | | - <script defer src="/__/firebase/12.0.0/firebase-auth-compat.js"></script> |
12 | | - <script defer src="/__/firebase/12.0.0/firebase-database-compat.js"></script> |
13 | | - <script defer src="/__/firebase/12.0.0/firebase-firestore-compat.js"></script> |
14 | | - <script defer src="/__/firebase/12.0.0/firebase-functions-compat.js"></script> |
15 | | - <script defer src="/__/firebase/12.0.0/firebase-messaging-compat.js"></script> |
16 | | - <script defer src="/__/firebase/12.0.0/firebase-storage-compat.js"></script> |
17 | | - <script defer src="/__/firebase/12.0.0/firebase-analytics-compat.js"></script> |
18 | | - <script defer src="/__/firebase/12.0.0/firebase-remote-config-compat.js"></script> |
19 | | - <script defer src="/__/firebase/12.0.0/firebase-performance-compat.js"></script> |
20 | | - <!-- |
21 | | - initialize the SDK after all desired features are loaded, set useEmulator to false |
22 | | - to avoid connecting the SDK to running emulators. |
23 | | - --> |
24 | | - <script defer src="/__/firebase/init.js?useEmulator=true"></script> |
| 4 | +<head> |
| 5 | + <meta charset="UTF-8" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 | + <link rel="stylesheet" href="style.css"> |
| 8 | + <title>Todo App</title> |
| 9 | + <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet" /> |
| 10 | + <script type="module" src="app.js" defer></script> |
25 | 11 |
|
26 | | - <style media="screen"> |
27 | | - body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; } |
28 | | - #message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px; border-radius: 3px; } |
29 | | - #message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; } |
30 | | - #message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;} |
31 | | - #message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; } |
32 | | - #message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; } |
33 | | - #message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } |
34 | | - #load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; } |
35 | | - @media (max-width: 600px) { |
36 | | - body, #message { margin-top: 0; background: white; box-shadow: none; } |
37 | | - body { border-top: 16px solid #ffa100; } |
38 | | - } |
39 | | - </style> |
40 | | - </head> |
41 | | - <body> |
42 | | - <div id="message"> |
43 | | - <h2>Welcome</h2> |
44 | | - <h1>Firebase Hosting Setup Complete</h1> |
45 | | - <p>You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!</p> |
46 | | - <a target="_blank" href="https://firebase.google.com/docs/hosting/">Open Hosting Documentation</a> |
47 | | - </div> |
48 | | - <p id="load">Firebase SDK Loading…</p> |
| 12 | +</head> |
49 | 13 |
|
50 | | - <script> |
51 | | - document.addEventListener('DOMContentLoaded', function() { |
52 | | - const loadEl = document.querySelector('#load'); |
53 | | - // // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 |
54 | | - // // The Firebase SDK is initialized and available here! |
55 | | - // |
56 | | - // firebase.auth().onAuthStateChanged(user => { }); |
57 | | - // firebase.database().ref('/path/to/ref').on('value', snapshot => { }); |
58 | | - // firebase.firestore().doc('/foo/bar').get().then(() => { }); |
59 | | - // firebase.functions().httpsCallable('yourFunction')().then(() => { }); |
60 | | - // firebase.messaging().requestPermission().then(() => { }); |
61 | | - // firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { }); |
62 | | - // firebase.analytics(); // call to activate |
63 | | - // firebase.analytics().logEvent('tutorial_completed'); |
64 | | - // firebase.performance(); // call to activate |
65 | | - // |
66 | | - // // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 |
| 14 | +<body> |
| 15 | + <div class="todo-container"> |
| 16 | + <h2>🔥 Todo App</h2> |
| 17 | + <div class="input-section"> |
| 18 | + <input type="text" id="todoInput" placeholder="Enter your task..." /> |
| 19 | + <button id="addTodoBtn">Add</button> |
| 20 | + </div> |
| 21 | + <div id="main"></div> |
| 22 | + </div> |
| 23 | +</body> |
67 | 24 |
|
68 | | - try { |
69 | | - let app = firebase.app(); |
70 | | - let features = [ |
71 | | - 'auth', |
72 | | - 'database', |
73 | | - 'firestore', |
74 | | - 'functions', |
75 | | - 'messaging', |
76 | | - 'storage', |
77 | | - 'analytics', |
78 | | - 'remoteConfig', |
79 | | - 'performance', |
80 | | - ].filter(feature => typeof app[feature] === 'function'); |
81 | | - loadEl.textContent = `Firebase SDK loaded with ${features.join(', ')}`; |
82 | | - } catch (e) { |
83 | | - console.error(e); |
84 | | - loadEl.textContent = 'Error loading the Firebase SDK, check the console.'; |
85 | | - } |
86 | | - }); |
87 | | - </script> |
88 | | - </body> |
89 | 25 | </html> |
0 commit comments