Commit a858de47 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Add login skeleton

parent d1c5e18e
.idea
js/credentials.js
......@@ -46,4 +46,18 @@ form button {
font-size: 40pt;
margin-right: 40px;
padding: 10px 20px;
}
#login {
height: calc(100% - 110px);
padding-top: calc(50% - 90px);
padding-bottom: 50%;
}
#login form input, #login form label, #login form button {
width: 50%;
margin-left: auto;
margin-right: auto;
display: block;
text-align: center;
}
\ No newline at end of file
......@@ -12,26 +12,38 @@
<script type="application/javascript" src="js/moment-with-locales.min.js"></script>
<script type="application/javascript" src="js/bootstrap.min.js"></script>
<script type="application/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
<script type="application/javascript" src="js/credentials.js"></script>
<script type="application/javascript" src="js/trackmybank.js"></script>
</head>
<body>
<body onload="trackmybank.init();">
<h1>Track my bank!</h1>
<form action="#" id="add-form">
<label for="date_t">Date de la transaction</label>
<input id="date_t" class="datemask datepicker" autocomplete="off"/>
<label for="amount">Montant</label>
<input class="money decimal" id="amount"/>
<label for="category">Catégorie</label>
<select id="category" class="select2">
<option></option>
<option value="1">Catégorie 1</option>
<option value="2">Catégorie 2</option>
</select>
<button id="send">Envoyer</button>
<button id="add-subtr">Nouvel item</button>
<button id="reset">Annuler</button>
</form>
<div id="login">
<form action="#" id="login-form">
<label for="password">Pin</label>
<input id="password" type="password"/>
<button type="button" id="dologin">Se connecter</button>
</form>
</div>
<div id="logged" style="display: none;">
<form action="#" id="add-form">
<label for="date_t">Date de la transaction</label>
<input id="date_t" class="datemask datepicker" autocomplete="off"/>
<label for="amount">Montant</label>
<input class="money decimal" id="amount"/>
<label for="category">Catégorie</label>
<select id="category" class="select2">
<option></option>
<option value="1">Catégorie 1</option>
<option value="2">Catégorie 2</option>
</select>
<button id="send">Envoyer</button>
<button id="add-subtr">+ item</button>
<button id="reset">Annuler</button>
</form>
</div>
</body>
</html>
\ No newline at end of file
credentials = {
app_key: "",
username: ""
};
\ No newline at end of file
trackmybank = {};
trackmybank.init = function() {
$("#dologin").on("click touch", trackmybank.login);
};
trackmybank.login = function() {
$("#login").hide();
$("#logged").show();
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment