Add new theme: Gum
This commit is contained in:
BIN
gum/static/fonts/icons/entypo.eot
Normal file
BIN
gum/static/fonts/icons/entypo.eot
Normal file
Binary file not shown.
BIN
gum/static/fonts/icons/entypo.ttf
Normal file
BIN
gum/static/fonts/icons/entypo.ttf
Normal file
Binary file not shown.
BIN
gum/static/fonts/icons/entypo.woff
Normal file
BIN
gum/static/fonts/icons/entypo.woff
Normal file
Binary file not shown.
7097
gum/static/gumby.css
Normal file
7097
gum/static/gumby.css
Normal file
File diff suppressed because it is too large
Load Diff
27
gum/static/js/libs/gumby.init.js
Normal file
27
gum/static/js/libs/gumby.init.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Gumby Init
|
||||
*/
|
||||
|
||||
// test for touch event support
|
||||
Modernizr.load({
|
||||
test: Modernizr.touch,
|
||||
|
||||
// if present load custom jQuery mobile build and update Gumby.click
|
||||
yep: 'js/libs/jquery.mobile.custom.min.js',
|
||||
callback: function(url, result, key) {
|
||||
// check jQuery mobile has successfully loaded before using tap events
|
||||
if($.mobile) {
|
||||
window.Gumby.click = 'tap';
|
||||
}
|
||||
},
|
||||
|
||||
// either way initialize Gumby
|
||||
complete: function() {
|
||||
window.Gumby.init();
|
||||
|
||||
// if AMD return Gumby object to define
|
||||
if(typeof define == "function" && define.amd) {
|
||||
define(window.Gumby);
|
||||
}
|
||||
}
|
||||
});
|
||||
145
gum/static/js/libs/gumby.js
Normal file
145
gum/static/js/libs/gumby.js
Normal file
@@ -0,0 +1,145 @@
|
||||
/**
|
||||
* Gumby Framework
|
||||
* ---------------
|
||||
*
|
||||
* Follow @gumbycss on twitter and spread the love.
|
||||
* We worked super hard on making this awesome and released it to the web.
|
||||
* All we ask is you leave this intact. #gumbyisawesome
|
||||
*
|
||||
* Gumby Framework
|
||||
* http://gumbyframework.com
|
||||
*
|
||||
* Built with love by your friends @digitalsurgeons
|
||||
* http://www.digitalsurgeons.com
|
||||
*
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
!function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
function Gumby() {
|
||||
this.$dom = $(document);
|
||||
this.isOldie = !!this.$dom.find('html').hasClass('oldie');
|
||||
this.click = 'click';
|
||||
this.onReady = this.onOldie = this.onTouch = false;
|
||||
this.uiModules = {};
|
||||
this.inits = {};
|
||||
}
|
||||
|
||||
// initialize Gumby
|
||||
Gumby.prototype.init = function() {
|
||||
// init UI modules
|
||||
this.initUIModules();
|
||||
|
||||
var scope = this;
|
||||
|
||||
// call ready() code when dom is ready
|
||||
this.$dom.ready(function() {
|
||||
if(scope.onReady) {
|
||||
scope.onReady();
|
||||
}
|
||||
|
||||
// call oldie() callback if applicable
|
||||
if(scope.isOldie && scope.onOldie) {
|
||||
scope.onOldie();
|
||||
}
|
||||
|
||||
// call touch() callback if applicable
|
||||
if(Modernizr.touch && scope.onTouch) {
|
||||
scope.onTouch();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// public helper - set Gumby ready callback
|
||||
Gumby.prototype.ready = function(code) {
|
||||
if(code && typeof code === 'function') {
|
||||
this.onReady = code;
|
||||
}
|
||||
};
|
||||
|
||||
// public helper - set oldie callback
|
||||
Gumby.prototype.oldie = function(code) {
|
||||
if(code && typeof code === 'function') {
|
||||
this.onOldie = code;
|
||||
}
|
||||
};
|
||||
|
||||
// public helper - set touch callback
|
||||
Gumby.prototype.touch = function(code) {
|
||||
if(code && typeof code === 'function') {
|
||||
this.onTouch = code;
|
||||
}
|
||||
};
|
||||
|
||||
// public helper - return debuggin object including uiModules object
|
||||
Gumby.prototype.debug = function() {
|
||||
return {
|
||||
$dom: this.$dom,
|
||||
isOldie: this.isOldie,
|
||||
uiModules: this.uiModules,
|
||||
click: this.click
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// grab attribute value, testing data- gumby- and no prefix
|
||||
Gumby.prototype.selectAttr = function() {
|
||||
var i = 0;
|
||||
|
||||
// any number of attributes can be passed
|
||||
for(; i < arguments.length; i++) {
|
||||
// various formats
|
||||
var attr = arguments[i],
|
||||
dataAttr = 'data-'+arguments[i],
|
||||
gumbyAttr = 'gumby-'+arguments[i];
|
||||
|
||||
// first test for data-attr
|
||||
if(this.attr(dataAttr)) {
|
||||
return this.attr(dataAttr);
|
||||
|
||||
// next test for gumby-attr
|
||||
} else if(this.attr(gumbyAttr)) {
|
||||
return this.attr(gumbyAttr);
|
||||
|
||||
// finally no prefix
|
||||
} else if(this.attr(attr)) {
|
||||
return this.attr(attr);
|
||||
}
|
||||
}
|
||||
|
||||
// none found
|
||||
return false;
|
||||
};
|
||||
|
||||
// add an initialisation method
|
||||
Gumby.prototype.addInitalisation = function(ref, code) {
|
||||
this.inits[ref] = code;
|
||||
};
|
||||
|
||||
// initialize a uiModule
|
||||
Gumby.prototype.initialize = function(ref) {
|
||||
if(this.inits[ref] && typeof this.inits[ref] === 'function') {
|
||||
this.inits[ref]();
|
||||
}
|
||||
};
|
||||
|
||||
// store a UI module
|
||||
Gumby.prototype.UIModule = function(data) {
|
||||
var module = data.module;
|
||||
this.uiModules[module] = data;
|
||||
};
|
||||
|
||||
// loop round and init all UI modules
|
||||
Gumby.prototype.initUIModules = function() {
|
||||
var x;
|
||||
for(x in this.uiModules) {
|
||||
this.uiModules[x].init();
|
||||
}
|
||||
};
|
||||
|
||||
window.Gumby = new Gumby();
|
||||
|
||||
}();
|
||||
1
gum/static/js/libs/gumby.min.js
vendored
Normal file
1
gum/static/js/libs/gumby.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
gum/static/js/libs/jquery-1.9.1.min.js
vendored
Normal file
5
gum/static/js/libs/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
gum/static/js/libs/jquery.mobile.custom.min.js
vendored
Normal file
3
gum/static/js/libs/jquery.mobile.custom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
gum/static/js/libs/modernizr-2.6.2.min.js
vendored
Normal file
4
gum/static/js/libs/modernizr-2.6.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
69
gum/static/js/libs/ui/gumby.navbar.js
Normal file
69
gum/static/js/libs/ui/gumby.navbar.js
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Gumby Navbar
|
||||
*/
|
||||
!function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
// define module class and init only if we're on touch devices
|
||||
if(!Modernizr.touch) {
|
||||
return;
|
||||
}
|
||||
|
||||
function Navbar($el) {
|
||||
this.$el = $el;
|
||||
var scope = this;
|
||||
|
||||
// when navbar items are tapped hide/show dropdowns
|
||||
this.$el.find('li').on(Gumby.click, function(e) {
|
||||
var $this = $(this);
|
||||
|
||||
e.stopPropagation();
|
||||
|
||||
// prevent jump to top of page
|
||||
if(this.href === '#') {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
scope.dropdown($this);
|
||||
});
|
||||
}
|
||||
|
||||
// hide/show dropdowns
|
||||
Navbar.prototype.dropdown = function($this) {
|
||||
// we have dropdowns so open/cose
|
||||
if($this.children('.dropdown').length) {
|
||||
if($this.hasClass('active')) {
|
||||
$this.removeClass('active');
|
||||
} else {
|
||||
$this.addClass('active');
|
||||
}
|
||||
// no dropdown so close others
|
||||
} else {
|
||||
this.$items.removeClass('active');
|
||||
}
|
||||
};
|
||||
|
||||
// add initialisation
|
||||
Gumby.addInitalisation('navbars', function() {
|
||||
$('.navbar').each(function() {
|
||||
var $this = $(this);
|
||||
// this element has already been initialized
|
||||
if($this.data('isNavbar')) {
|
||||
return true;
|
||||
}
|
||||
// mark element as initialized
|
||||
$this.data('isNavbar', true);
|
||||
new Navbar($this);
|
||||
});
|
||||
});
|
||||
|
||||
// register UI module
|
||||
Gumby.UIModule({
|
||||
module: 'navbar',
|
||||
events: [],
|
||||
init: function() {
|
||||
Gumby.initialize('navbars');
|
||||
}
|
||||
});
|
||||
}();
|
||||
8
gum/static/js/plugins.js
Normal file
8
gum/static/js/plugins.js
Normal file
@@ -0,0 +1,8 @@
|
||||
window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};
|
||||
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
|
||||
{console.log();return window.console;}catch(err){return window.console={};}})());
|
||||
|
||||
/*! http://mths.be/placeholder v2.0.7 by @mathias */
|
||||
;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery));
|
||||
|
||||
// place any jQuery/helper plugins in here, instead of separate, slower script files.
|
||||
201
gum/static/style.css
Normal file
201
gum/static/style.css
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
Author : Nick Rance
|
||||
|
||||
- Credits
|
||||
- Main CSS from Gumby framework
|
||||
- Some CSS from Twitter Bootstrap - http://twitter.github.io/bootstrap/
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* Code Highlighting */
|
||||
code,
|
||||
pre {
|
||||
padding: 0 3px 2px;
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
color: #d14;
|
||||
white-space: nowrap;
|
||||
background-color: #f7f7f9;
|
||||
border: 1px solid #e1e1e8;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
padding: 9.5px;
|
||||
margin: 0 0 10px;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
pre.prettyprint {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.pre-scrollable {
|
||||
max-height: 340px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Table
|
||||
--------------------------------------------------------- */
|
||||
|
||||
table {
|
||||
max-width: 100%;
|
||||
background-color: transparent;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 8px;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.table caption + thead tr:first-child th,
|
||||
.table caption + thead tr:first-child td,
|
||||
.table colgroup + thead tr:first-child th,
|
||||
.table colgroup + thead tr:first-child td,
|
||||
.table thead:first-child tr:first-child th,
|
||||
.table thead:first-child tr:first-child td {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.table tbody + tbody {
|
||||
border-top: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
.table .table {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.table-condensed th,
|
||||
.table-condensed td {
|
||||
padding: 4px 5px;
|
||||
}
|
||||
|
||||
.table-bordered {
|
||||
border: 1px solid #dddddd;
|
||||
border-collapse: separate;
|
||||
*border-collapse: collapse;
|
||||
border-left: 0;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.table-striped tbody > tr:nth-child(odd) > td,
|
||||
.table-striped tbody > tr:nth-child(odd) > th {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.table-hover tbody tr:hover > td,
|
||||
.table-hover tbody tr:hover > th {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
table td[class*="span"],
|
||||
table th[class*="span"],
|
||||
.row-fluid table td[class*="span"],
|
||||
.row-fluid table th[class*="span"] {
|
||||
display: table-cell;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Navigation
|
||||
--------------------------------------------------------- */
|
||||
#banner strong {display:block;}
|
||||
#banner h1 { font-size:3.25rem }
|
||||
|
||||
.no-touch .navbar ul li.active > a {
|
||||
|
||||
background: #868d92;
|
||||
|
||||
}
|
||||
/* Posts
|
||||
--------------------------------------------------------- */
|
||||
|
||||
#post-list { margin-left:0; }
|
||||
#post-list > li {list-style:none; border-bottom: 2px solid #ccc; margin-bottom: 20px; padding-bottom: 15px;}
|
||||
|
||||
.tag-row {margin-top:20px;}
|
||||
|
||||
address { font-size:14px; margin-bottom:10px;}
|
||||
|
||||
/* Typography
|
||||
--------------------------------------------------------- */
|
||||
|
||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
|
||||
color: #3498DB;
|
||||
}
|
||||
|
||||
a, a:hover { color: #3498DB; }
|
||||
a:focus { color: #34495E; }
|
||||
|
||||
.btn a:hover,
|
||||
.btn a:focus {color:#eee; }
|
||||
|
||||
.label:hover,
|
||||
.label:focus {color:#eee; }
|
||||
|
||||
/* Footer
|
||||
--------------------------------------------------------- */
|
||||
.bg { background:#eee; margin-top:35px; padding-top:25px; border-top:5px solid #3498DB; }
|
||||
|
||||
|
||||
|
||||
/* Responsive fixes
|
||||
--------------------------------------------------------- */
|
||||
@media only screen and (max-width: 600px) {
|
||||
#banner h1 a {font-size:22px!important; line-height:24px;}
|
||||
}
|
||||
Reference in New Issue
Block a user