-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
66 lines (57 loc) · 2.3 KB
/
index.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<title>This petition for net neutrality shows why we must defend net neutrality.</title>
<script src="https://unpkg.com/vue"></script>
<h1>This petition for net neutrality shows why we must defend net neutrality.</h1>
<p>FCC Chair Ajit Pai is about to announce a vote to slash America's net neutrality rules—meaning companies like Comcast & Verizon will be able to block apps, slow websites, and charge fees to control what you see & do online. <strong>The Internet is amazing because with really minimal knowledge you can mess around with super powerful tools like <a href="http://vuejs.org">Vue.js</a> and <a href="http://firebase.com">Firebase</a> to make janky online petitions like this.</strong> Don't let them take that away from us. Sign the petition now.</p>
<div id="app">
<input v-on:keyup.enter="submit" type="text" v-model="name" placeholder="Enter your name">
<button v-on:click="submit">Sign petition</button>
<p>Your name will display on this page. <-- Privacy Policy</p>
<h2>Illustrious petition signers</h2>
<ul>
<li v-for="name in myData">{{ name.name }}</li>
</ul>
</div>
<h2>What *is* Net Neutrality? Why does it matter?</h2>
<p><a href="http://battleforthenet.com">Visit battleforthenet.com to learn more.</a></p>
<script src="https://www.gstatic.com/firebasejs/4.5.1/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyARIIRIZOxAM56gVNQsgy3BYAtmkkiUWsE",
authDomain: "trying-vue-and-firebase.firebaseapp.com",
databaseURL: "https://trying-vue-and-firebase.firebaseio.com",
projectId: "trying-vue-and-firebase",
storageBucket: "",
messagingSenderId: "551507126011"
};
firebase.initializeApp(config);
var db = firebase.database()
</script>
<!-- VueFire -->
<script src="https://unpkg.com/vuefire/dist/vuefire.js"></script>
<script>
'use strict'
new Vue({
el: "#app",
firebase: {
myData: db.ref('/')
},
data: {
name: null
},
methods: {
// "submits" the number and changes the state (placeholder)
submit: function () {
// submits to firebase here
this.$firebaseRefs.myData.push({
name: this.name
})
// resets input field
this.name = null
}
}
});
</script>
</html>