misc. js&css for account/*

This commit is contained in:
Fabien O'Carroll 2014-02-13 10:37:50 +00:00
parent abf503221d
commit be4e0bb7e4
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,31 @@
form input[type="submit"] {
width:60%;
margin:10px 20%;
font-family: "Helvetica Neue", "Arial";
font-size: 0.75em;
background: #f0f0f0;
background: linear-gradient(0deg, #f0f0f0, #fefefe);
box-shadow: 0 3px 2px 0px #eee;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 2px;
border-bottom:1px solid rgba(0,0,0,0.5);
padding: 5px 10px;
cursor: pointer;
display: inline;
-moz-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
text-decoration: none;
font-weight:600;
}
form input[type="submit"]:hover {
background: linear-gradient(0deg, #e8e8e8, #f8f8f8);
}
form input {
width:100%;
font-size:1.1em;
margin:0px 0px 15px;
}
form label {
font-size:0.9em;
}

View File

@ -0,0 +1,33 @@
;(function(){
function getHash(){
return window.location.hash.slice(1);
}
var $contents = $('#content article')
var $btns = $('.sidebar-btn').click(function(event){
$btns.removeClass('selected');
var hash = $(this).addClass('selected')[0].hash.slice(1);
$contents.hide().filter(function(i, el){
return el.id === hash
}).show();
});
// Kick it all off
if(!window.location.hash) {
window.location.hash = $btns.filter(function(i, el){
return el.attributes.default;
})[0].hash;
}
$contents.filter(function(i, el){
return el.id === getHash();
}).show();
$btns.filter(function(i, el){
return el.hash === window.location.hash;
}).addClass('selected');
})//()

View File

@ -0,0 +1,5 @@
var $textarea = $('textarea');
var editor = CodeMirror.fromTextArea($textarea[0], {
mode: "javascript"
});