Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit af73927

Browse files
Firebase Hosting demo
1 parent e47b75e commit af73927

4 files changed

Lines changed: 12 additions & 48 deletions

File tree

β€Ždemo/hosting/README.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Testing your site locally
2+
$ firebase serve --only hosting
3+
4+
## To deploy a new version
5+
$ firebase deploy [-m "release notes here"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pMBD8ywlcOw56fnfteQHiCwWoIQ3vpXk4Ue89U_OXBA.9EtfeywkqzBYb2g1zCDRsa-r9h-pB88OdzAPfihhjGw

β€Ždemo/hosting/public/index.htmlβ€Ž

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,21 @@
33
<head>
44
<meta charset="utf-8">
55
<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/7.4.0/firebase-app.js"></script>
10-
<!-- include only the Firebase features as you need -->
11-
<script defer src="/__/firebase/7.4.0/firebase-auth.js"></script>
12-
<script defer src="/__/firebase/7.4.0/firebase-database.js"></script>
13-
<script defer src="/__/firebase/7.4.0/firebase-messaging.js"></script>
14-
<script defer src="/__/firebase/7.4.0/firebase-storage.js"></script>
15-
<!-- initialize the SDK after all desired features are loaded -->
16-
<script defer src="/__/firebase/init.js"></script>
6+
<title>Firebase Hosting</title>
177

188
<style media="screen">
199
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
20-
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px; border-radius: 3px; }
21-
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; }
22-
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;}
23-
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; }
10+
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px; border-radius: 3px; text-align: center; }
11+
#message .logo { margin: 32px; }
2412
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; }
2513
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
26-
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; }
27-
@media (max-width: 600px) {
28-
body, #message { margin-top: 0; background: white; box-shadow: none; }
29-
body { border-top: 16px solid #ffa100; }
30-
}
3114
</style>
3215
</head>
3316
<body>
3417
<div id="message">
35-
<h2>Welcome</h2>
36-
<h1>Firebase Hosting Setup Complete</h1>
37-
<p>You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!</p>
18+
<img class="logo" src="media/NativeScript_logo.png" width="50%" height="50%"/>
19+
3820
<a target="_blank" href="https://firebase.google.com/docs/hosting/">Open Hosting Documentation</a>
3921
</div>
40-
<p id="load">Firebase SDK Loading&hellip;</p>
41-
42-
<script>
43-
document.addEventListener('DOMContentLoaded', function() {
44-
// // πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯
45-
// // The Firebase SDK is initialized and available here!
46-
//
47-
// firebase.auth().onAuthStateChanged(user => { });
48-
// firebase.database().ref('/path/to/ref').on('value', snapshot => { });
49-
// firebase.messaging().requestPermission().then(() => { });
50-
// firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { });
51-
//
52-
// // πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯
53-
54-
try {
55-
let app = firebase.app();
56-
let features = ['auth', 'database', 'messaging', 'storage'].filter(feature => typeof app[feature] === 'function');
57-
document.getElementById('load').innerHTML = `Firebase SDK loaded with ${features.join(', ')}`;
58-
} catch (e) {
59-
console.error(e);
60-
document.getElementById('load').innerHTML = 'Error loading the Firebase SDK, check the console.';
61-
}
62-
});
63-
</script>
6422
</body>
65-
</html>
23+
</html>
17.4 KB
Loading

0 commit comments

Comments
Β (0)