mirror of
https://github.com/jsbin/jsbin.git
synced 2026-01-25 15:38:56 +00:00
misc. js&css for account/*
This commit is contained in:
parent
abf503221d
commit
be4e0bb7e4
31
public/css/profile-settings.css
Normal file
31
public/css/profile-settings.css
Normal 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;
|
||||
}
|
||||
33
public/js/account-settings.js
Normal file
33
public/js/account-settings.js
Normal 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');
|
||||
|
||||
})//()
|
||||
5
public/js/editor-settings.js
Normal file
5
public/js/editor-settings.js
Normal file
@ -0,0 +1,5 @@
|
||||
var $textarea = $('textarea');
|
||||
|
||||
var editor = CodeMirror.fromTextArea($textarea[0], {
|
||||
mode: "javascript"
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user