This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<link href="//fonts.googleapis.com/css?family=Arimo:400" rel="stylesheet"> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" /> | |
<script>document.write('<link href="css/login.css?v='+ Math.floor(Math.random()*9000) +'" rel="stylesheet" type="text/css" />');</script> | |
<script src="https://unpkg.com/vue"></script> | |
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script> | |
<script src="https://unpkg.com/vuex"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"> | |
<h1 class="text-center">titulo</h1> | |
<p class="text-center"> | |
<router-link to="/">HOME</router-link> | |
<router-link to="/profile">PROFILE</router-link> | |
<router-link to="/login">LOGIN</router-link> | |
<router-link to="/register">SIGN UP</router-link> | |
</p> | |
<div class="container"> | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install apisauce --save | |
var apisauce = require('apisauce'); | |
const api = apisauce.create({ | |
baseURL: 'https://api.carbonintensity.org.uk' | |
}); | |
api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
apiKey: "YOUR-API-KEY", | |
authDomain: "YOUR-DB-DOMAIN", | |
databaseURL: "YOUR-DB-URL", | |
projectId: "YOUR-PROJECT-ID", | |
storageBucket: "YOUR-STORE-BUCKET", | |
messagingSenderId: "YOUR-SENDER-ID" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const store = new Vuex.Store({ | |
state: { | |
isValid: 0, | |
mail: '', | |
password: '', | |
password2: '', | |
message: '' | |
}, | |
mutations: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const home = { | |
template: '#homeTpl' | |
} | |
const profile = { | |
template: '<div>PROFILE to be defined</div>' | |
} | |
const login = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/x-template" id="homeTpl"> | |
<div> | |
<hr class="prettyline"> | |
<center> | |
<h3 class="omb_authTitle">Vue + VueX + Vue-Router</h3> | |
<div class="row omb_row-sm-offset-3"> | |
<div class="col-xs-12 col-sm-6"> | |
<div class="imgwrapper"> | |
<img src="https://vuejs.org/images/logo.png" class="img-responsive"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new Vue({ | |
el: '#app', | |
router, | |
store | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> document.write("<script src='js/db.js?v=" + Date.now() + "'><\/script>"); </script> | |
<script> document.write("<script src='js/router.js?v=" + Date.now() + "'><\/script>"); </script> | |
<script> document.write("<script src='js/store.js?v=" + Date.now() + "'><\/script>"); </script> | |
<script> document.write("<script src='js/app.js?v=" + Date.now() + "'><\/script>"); </script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
apiKey: "....", | |
authDomain: "...", | |
databaseURL: "...", | |
projectId: "..", | |
storageBucket: "..", | |
messagingSenderId: ".." | |
}; | |
firebase.initializeApp(config); |
OlderNewer