index.html 4.5 KB

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