|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 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> |
| 7 | + |
| 8 | + <!-- update the version number as needed --> |
| 9 | + <script defer src="/__/firebase/12.8.0/firebase-app-compat.js"></script> |
| 10 | + <!-- include only the Firebase features as you need --> |
| 11 | + <script defer src="/__/firebase/12.8.0/firebase-auth-compat.js"></script> |
| 12 | + <script |
| 13 | + defer |
| 14 | + src="/__/firebase/12.8.0/firebase-database-compat.js" |
| 15 | + ></script> |
| 16 | + <script |
| 17 | + defer |
| 18 | + src="/__/firebase/12.8.0/firebase-firestore-compat.js" |
| 19 | + ></script> |
| 20 | + <script |
| 21 | + defer |
| 22 | + src="/__/firebase/12.8.0/firebase-functions-compat.js" |
| 23 | + ></script> |
| 24 | + <script |
| 25 | + defer |
| 26 | + src="/__/firebase/12.8.0/firebase-messaging-compat.js" |
| 27 | + ></script> |
| 28 | + <script defer src="/__/firebase/12.8.0/firebase-storage-compat.js"></script> |
| 29 | + <script |
| 30 | + defer |
| 31 | + src="/__/firebase/12.8.0/firebase-analytics-compat.js" |
| 32 | + ></script> |
| 33 | + <script |
| 34 | + defer |
| 35 | + src="/__/firebase/12.8.0/firebase-remote-config-compat.js" |
| 36 | + ></script> |
| 37 | + <script |
| 38 | + defer |
| 39 | + src="/__/firebase/12.8.0/firebase-performance-compat.js" |
| 40 | + ></script> |
| 41 | + <!-- |
| 42 | + initialize the SDK after all desired features are loaded, set useEmulator to false |
| 43 | + to avoid connecting the SDK to running emulators. |
| 44 | + --> |
| 45 | + <script defer src="/__/firebase/init.js?useEmulator=true"></script> |
| 46 | + |
| 47 | + <style media="screen"> |
| 48 | + body { |
| 49 | + background: #eceff1; |
| 50 | + color: rgba(0, 0, 0, 0.87); |
| 51 | + font-family: Roboto, Helvetica, Arial, sans-serif; |
| 52 | + margin: 0; |
| 53 | + padding: 0; |
| 54 | + } |
| 55 | + #message { |
| 56 | + background: white; |
| 57 | + max-width: 360px; |
| 58 | + margin: 100px auto 16px; |
| 59 | + padding: 32px 24px; |
| 60 | + border-radius: 3px; |
| 61 | + } |
| 62 | + #message h2 { |
| 63 | + color: #ffa100; |
| 64 | + font-weight: bold; |
| 65 | + font-size: 16px; |
| 66 | + margin: 0 0 8px; |
| 67 | + } |
| 68 | + #message h1 { |
| 69 | + font-size: 22px; |
| 70 | + font-weight: 300; |
| 71 | + color: rgba(0, 0, 0, 0.6); |
| 72 | + margin: 0 0 16px; |
| 73 | + } |
| 74 | + #message p { |
| 75 | + line-height: 140%; |
| 76 | + margin: 16px 0 24px; |
| 77 | + font-size: 14px; |
| 78 | + } |
| 79 | + #message a { |
| 80 | + display: block; |
| 81 | + text-align: center; |
| 82 | + background: #039be5; |
| 83 | + text-transform: uppercase; |
| 84 | + text-decoration: none; |
| 85 | + color: white; |
| 86 | + padding: 16px; |
| 87 | + border-radius: 4px; |
| 88 | + } |
| 89 | + #message, |
| 90 | + #message a { |
| 91 | + box-shadow: |
| 92 | + 0 1px 3px rgba(0, 0, 0, 0.12), |
| 93 | + 0 1px 2px rgba(0, 0, 0, 0.24); |
| 94 | + } |
| 95 | + #load { |
| 96 | + color: rgba(0, 0, 0, 0.4); |
| 97 | + text-align: center; |
| 98 | + font-size: 13px; |
| 99 | + } |
| 100 | + @media (max-width: 600px) { |
| 101 | + body, |
| 102 | + #message { |
| 103 | + margin-top: 0; |
| 104 | + background: white; |
| 105 | + box-shadow: none; |
| 106 | + } |
| 107 | + body { |
| 108 | + border-top: 16px solid #ffa100; |
| 109 | + } |
| 110 | + } |
| 111 | + </style> |
| 112 | + </head> |
| 113 | + <body> |
| 114 | + <div id="message"> |
| 115 | + <h2>Welcome</h2> |
| 116 | + <h1>Firebase Hosting Setup Complete</h1> |
| 117 | + <p> |
| 118 | + You're seeing this because you've successfully setup Firebase Hosting. |
| 119 | + Now it's time to go build something extraordinary! |
| 120 | + </p> |
| 121 | + <a |
| 122 | + rel="noopener" |
| 123 | + target="_blank" |
| 124 | + href="https://firebase.google.com/docs/hosting/" |
| 125 | + >Open Hosting Documentation</a |
| 126 | + > |
| 127 | + </div> |
| 128 | + <p id="load">Firebase SDK Loading…</p> |
| 129 | + |
| 130 | + <script> |
| 131 | + document.addEventListener("DOMContentLoaded", function () { |
| 132 | + const loadEl = document.querySelector("#load"); |
| 133 | + // // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 |
| 134 | + // // The Firebase SDK is initialized and available here! |
| 135 | + // |
| 136 | + // firebase.auth().onAuthStateChanged(user => { }); |
| 137 | + // firebase.database().ref('/path/to/ref').on('value', snapshot => { }); |
| 138 | + // firebase.firestore().doc('/foo/bar').get().then(() => { }); |
| 139 | + // firebase.functions().httpsCallable('yourFunction')().then(() => { }); |
| 140 | + // firebase.messaging().requestPermission().then(() => { }); |
| 141 | + // firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { }); |
| 142 | + // firebase.analytics(); // call to activate |
| 143 | + // firebase.analytics().logEvent('tutorial_completed'); |
| 144 | + // firebase.performance(); // call to activate |
| 145 | + // |
| 146 | + // // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 |
| 147 | + |
| 148 | + try { |
| 149 | + let app = firebase.app(); |
| 150 | + let features = [ |
| 151 | + "auth", |
| 152 | + "database", |
| 153 | + "firestore", |
| 154 | + "functions", |
| 155 | + "messaging", |
| 156 | + "storage", |
| 157 | + "analytics", |
| 158 | + "remoteConfig", |
| 159 | + "performance", |
| 160 | + ].filter(feature => typeof app[feature] === "function"); |
| 161 | + loadEl.textContent = `Firebase SDK loaded with ${features.join(", ")}`; |
| 162 | + } catch (e) { |
| 163 | + console.error(e); |
| 164 | + loadEl.textContent = |
| 165 | + "Error loading the Firebase SDK, check the console."; |
| 166 | + } |
| 167 | + }); |
| 168 | + </script> |
| 169 | + </body> |
| 170 | +</html> |
0 commit comments