├── .gitignore ├── LICENSE ├── Procfile ├── README.md ├── keystone.js ├── models ├── Enquiry.js ├── Gallery.js ├── Post.js ├── PostCategory.js ├── PostComment.js ├── Thing.js └── User.js ├── package.json ├── public ├── favicon.ico ├── fonts │ ├── entypo-social.eot │ ├── entypo-social.svg │ ├── entypo-social.ttf │ ├── entypo-social.woff │ ├── entypo.eot │ ├── entypo.svg │ ├── entypo.ttf │ ├── entypo.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── images │ ├── logo.png │ └── logo.svg ├── js │ └── lib │ │ ├── bootstrap │ │ ├── affix.js │ │ ├── alert.js │ │ ├── button.js │ │ ├── carousel.js │ │ ├── collapse.js │ │ ├── dropdown.js │ │ ├── modal.js │ │ ├── popover.js │ │ ├── scrollspy.js │ │ ├── tab.js │ │ ├── tooltip.js │ │ └── transition.js │ │ ├── fancybox │ │ ├── blank.gif │ │ ├── fancybox_loading.gif │ │ ├── fancybox_loading@2x.gif │ │ ├── fancybox_overlay.png │ │ ├── fancybox_sprite.png │ │ ├── fancybox_sprite@2x.png │ │ ├── helpers │ │ │ ├── fancybox_buttons.png │ │ │ ├── jquery.fancybox-buttons.css │ │ │ ├── jquery.fancybox-buttons.js │ │ │ ├── jquery.fancybox-media.js │ │ │ ├── jquery.fancybox-thumbs.css │ │ │ └── jquery.fancybox-thumbs.js │ │ ├── jquery.fancybox.css │ │ ├── jquery.fancybox.js │ │ └── jquery.fancybox.pack.js │ │ └── jquery │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ └── jquery-1.10.2.min.map ├── robots.txt └── styles │ ├── bootstrap │ ├── alerts.less │ ├── badges.less │ ├── bootstrap.less │ ├── breadcrumbs.less │ ├── button-groups.less │ ├── buttons.less │ ├── carousel.less │ ├── close.less │ ├── code.less │ ├── component-animations.less │ ├── dropdowns.less │ ├── forms.less │ ├── glyphicons.less │ ├── grid.less │ ├── input-groups.less │ ├── jumbotron.less │ ├── labels.less │ ├── list-group.less │ ├── media.less │ ├── mixins.less │ ├── mixins │ │ ├── alerts.less │ │ ├── background-variant.less │ │ ├── border-radius.less │ │ ├── buttons.less │ │ ├── center-block.less │ │ ├── clearfix.less │ │ ├── forms.less │ │ ├── gradients.less │ │ ├── grid-framework.less │ │ ├── grid.less │ │ ├── hide-text.less │ │ ├── image.less │ │ ├── labels.less │ │ ├── list-group.less │ │ ├── nav-divider.less │ │ ├── nav-vertical-align.less │ │ ├── opacity.less │ │ ├── pagination.less │ │ ├── panels.less │ │ ├── progress-bar.less │ │ ├── reset-filter.less │ │ ├── reset-text.less │ │ ├── resize.less │ │ ├── responsive-visibility.less │ │ ├── size.less │ │ ├── tab-focus.less │ │ ├── table-row.less │ │ ├── text-emphasis.less │ │ ├── text-overflow.less │ │ └── vendor-prefixes.less │ ├── modals.less │ ├── navbar.less │ ├── navs.less │ ├── normalize.less │ ├── pager.less │ ├── pagination.less │ ├── panels.less │ ├── popovers.less │ ├── print.less │ ├── progress-bars.less │ ├── responsive-embed.less │ ├── responsive-utilities.less │ ├── scaffolding.less │ ├── tables.less │ ├── theme.less │ ├── thumbnails.less │ ├── tooltip.less │ ├── type.less │ ├── utilities.less │ ├── variables.less │ └── wells.less │ ├── site.less │ ├── site │ └── layout.less │ └── themes │ ├── Bootstrap.less │ ├── Cerulean.less │ ├── Cosmo.less │ ├── Cyborg.less │ ├── Darkly.less │ ├── Flatly.less │ ├── Journal.less │ ├── Lumen.less │ ├── Paper.less │ ├── Readable.less │ ├── Sandstone.less │ ├── Simplex.less │ ├── Slate.less │ ├── Spacelab.less │ ├── Superhero.less │ ├── United.less │ └── Yeti.less ├── routes ├── download │ └── users.js ├── index.js ├── middleware.js └── views │ ├── blog.js │ ├── contact.js │ ├── gallery.js │ ├── index.js │ └── post.js ├── templates ├── layouts │ └── default.pug ├── mixins │ ├── commenting.pug │ ├── flash-messages.pug │ └── post.pug └── views │ ├── blog.pug │ ├── contact.pug │ ├── errors │ ├── 404.pug │ └── 500.pug │ ├── gallery.pug │ ├── index.pug │ └── post.pug └── updates └── 0.0.1-admins.js /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | *.min.css 11 | 12 | pids 13 | logs 14 | results 15 | 16 | npm-debug.log 17 | .DS_Store 18 | 19 | node_modules 20 | ACCOUNTS 21 | 22 | .env 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jed Watson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node keystone.js 2 | -------------------------------------------------------------------------------- /keystone.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | 3 | keystone.init({ 4 | 5 | 'name': 'Keystone Demo', 6 | 'brand': 'Demo', 7 | 8 | 'favicon': 'public/favicon.ico', 9 | 'less': 'public', 10 | 'static': 'public', 11 | 12 | 'views': 'templates/views', 13 | 'view engine': 'pug', 14 | 15 | 'auto update': true, 16 | 'mongo': process.env.MONGO_URI || process.env.MONGOLAB_URI || 'mongodb://localhost/keystone-demo', 17 | 'cloudinary config': 'cloudinary://333779167276662:_8jbSi9FB3sWYrfimcl8VKh34rI@keystone-demo', 18 | 19 | 'session': true, 20 | 'auth': true, 21 | 'user model': 'User', 22 | 'cookie secret': process.env.COOKIE_SECRET || 'demo', 23 | 24 | 'ga property': process.env.GA_PROPERTY, 25 | 'ga domain': process.env.GA_DOMAIN, 26 | 27 | 'chartbeat property': process.env.CHARTBEAT_PROPERTY, 28 | 'chartbeat domain': process.env.CHARTBEAT_DOMAIN 29 | 30 | }); 31 | 32 | keystone.import('models'); 33 | 34 | keystone.set('locals', { 35 | _: require('lodash'), 36 | env: keystone.get('env'), 37 | utils: keystone.utils, 38 | editable: keystone.content.editable, 39 | ga_property: keystone.get('ga property'), 40 | ga_domain: keystone.get('ga domain'), 41 | chartbeat_property: keystone.get('chartbeat property'), 42 | chartbeat_domain: keystone.get('chartbeat domain') 43 | }); 44 | 45 | keystone.set('routes', require('./routes')); 46 | 47 | keystone.set('nav', { 48 | 'posts': ['posts', 'post-comments', 'post-categories'], 49 | 'galleries': 'galleries', 50 | 'enquiries': 'enquiries', 51 | 'users': 'users', 52 | 'field-tests': 'things' 53 | }); 54 | 55 | keystone.start(); 56 | -------------------------------------------------------------------------------- /models/Enquiry.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var Enquiry = new keystone.List('Enquiry', { 5 | nocreate: true, 6 | }); 7 | 8 | Enquiry.add({ 9 | name: { type: Types.Name, required: true }, 10 | email: { type: Types.Email, required: true }, 11 | phone: { type: String }, 12 | enquiryType: { type: Types.Select, options: [ 13 | { value: 'message', label: "Just leaving a message" }, 14 | { value: 'question', label: "I've got a question" }, 15 | { value: 'other', label: "Something else..." }, 16 | ], required: true }, 17 | message: { type: Types.Textarea, required: true }, 18 | }); 19 | 20 | Enquiry.track = true; 21 | Enquiry.defaultSort = '-createdAt'; 22 | Enquiry.defaultColumns = 'name, email, enquiryType, createdAt'; 23 | Enquiry.register(); 24 | -------------------------------------------------------------------------------- /models/Gallery.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var Gallery = new keystone.List('Gallery', { 5 | autokey: { from: 'name', path: 'key', unique: true }, 6 | plural: 'Albums', 7 | singular: 'Album', 8 | }); 9 | 10 | Gallery.add({ 11 | name: { type: String, required: true }, 12 | publishedDate: { type: Types.Date, default: Date.now }, 13 | images: { type: Types.CloudinaryImages }, 14 | }); 15 | 16 | Gallery.track = true; 17 | Gallery.defaultSort = 'name'; 18 | Gallery.defaultColumns = 'name, publishedDate'; 19 | Gallery.register(); 20 | -------------------------------------------------------------------------------- /models/Post.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var Post = new keystone.List('Post', { 5 | autokey: { from: 'name', path: 'key', unique: true }, 6 | }); 7 | 8 | Post.add({ 9 | name: { type: String, required: true }, 10 | state: { type: Types.Select, options: 'draft, published, archived', default: 'draft', index: true }, 11 | author: { type: Types.Relationship, ref: 'User', index: true }, 12 | publishedDate: { type: Types.Date, index: true }, 13 | image: { type: Types.CloudinaryImage }, 14 | content: { 15 | brief: { type: Types.Html, wysiwyg: true, height: 150 }, 16 | extended: { type: Types.Html, wysiwyg: true, height: 400 }, 17 | }, 18 | categories: { type: Types.Relationship, ref: 'PostCategory', many: true }, 19 | }); 20 | 21 | Post.schema.virtual('content.full').get(function () { 22 | return this.content.extended || this.content.brief; 23 | }); 24 | 25 | Post.relationship({ path: 'comments', ref: 'PostComment', refPath: 'post' }); 26 | 27 | Post.track = true; 28 | Post.defaultColumns = 'name, state|20%, author|20%, publishedDate|20%'; 29 | Post.register(); 30 | -------------------------------------------------------------------------------- /models/PostCategory.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var PostCategory = new keystone.List('PostCategory', { 5 | autokey: { from: 'name', path: 'key', unique: true }, 6 | label: 'Categories', 7 | }); 8 | 9 | PostCategory.add({ 10 | name: { type: String, required: true }, 11 | }); 12 | 13 | PostCategory.relationship({ ref: 'Post', refPath: 'categories' }); 14 | 15 | PostCategory.track = true; 16 | PostCategory.register(); 17 | -------------------------------------------------------------------------------- /models/PostComment.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | /** 5 | Posts 6 | ===== 7 | */ 8 | 9 | var PostComment = new keystone.List('PostComment', { 10 | label: 'Comments', 11 | }); 12 | 13 | PostComment.add({ 14 | author: { type: Types.Relationship, initial: true, ref: 'User', index: true }, 15 | post: { type: Types.Relationship, initial: true, ref: 'Post', index: true }, 16 | commentState: { type: Types.Select, options: ['published', 'draft', 'archived'], default: 'published', index: true }, 17 | publishedOn: { type: Types.Date, default: Date.now, noedit: true, index: true }, 18 | }); 19 | 20 | PostComment.add('Content', { 21 | content: { type: Types.Html, wysiwyg: true, height: 300 }, 22 | }); 23 | 24 | PostComment.schema.pre('save', function (next) { 25 | this.wasNew = this.isNew; 26 | if (!this.isModified('publishedOn') && this.isModified('commentState') && this.commentState === 'published') { 27 | this.publishedOn = new Date(); 28 | } 29 | next(); 30 | }); 31 | 32 | PostComment.schema.post('save', function () { 33 | if (!this.wasNew) return; 34 | if (this.author) { 35 | keystone.list('User').model.findById(this.author).exec(function (err, user) { 36 | if (user) { 37 | user.wasActive().save(); 38 | } 39 | }); 40 | } 41 | }); 42 | 43 | PostComment.track = true; 44 | PostComment.defaultColumns = 'author, post, publishedOn, commentState'; 45 | PostComment.register(); 46 | -------------------------------------------------------------------------------- /models/Thing.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var Thing = new keystone.List('Thing', { 5 | label: 'All Fields', 6 | singular: 'Thing', 7 | plural: 'Things', 8 | autokey: { from: 'name', path: 'autokey', unique: true }, 9 | }); 10 | 11 | Thing.add( 12 | 'Simple Fields', { 13 | name: { type: String }, 14 | requiredString: { type: String, required: true, initial: true, note: 'This field is required.' }, 15 | defaultString: { type: String, default: 'Default Value' }, 16 | shortString: { type: String, width: 'small' }, 17 | mediumString: { type: String, width: 'medium' }, 18 | longString: { type: String, width: 'large' }, 19 | textarea: { type: Types.Textarea, initial: true }, 20 | key: { type: Types.Key }, 21 | email: { type: Types.Email }, 22 | url: { type: Types.Url }, 23 | number: { type: Types.Number }, 24 | money: { type: Types.Money }, 25 | checkbox: { type: Boolean, initial: true }, 26 | date: { type: Types.Date }, 27 | dateTime: { type: Date }, 28 | html: { type: Types.Html }, 29 | }, 'Complex Fields', { 30 | select: { type: Types.Select, options: 'first, second, third', initial: true }, 31 | indentedCheckbox: { type: Boolean, initial: true, indent: true, note: 'This checkbox is indented' }, 32 | customSelect: { type: Types.Select, options: [ 33 | { label: 'Option 1', value: 'one' }, 34 | { label: 'Option 2', value: 'two' }, 35 | { label: 'Option 3', value: 'three' }, 36 | ] }, 37 | numericSelect: { type: Types.Select, numeric: true, options: [ 38 | { label: 'Number 1', value: 1 }, 39 | { label: 'Number 2', value: 2 }, 40 | { label: 'Number 3', value: 3 }, 41 | ] }, 42 | splitName: { type: Types.Name, initial: true }, 43 | password: { type: Types.Password, initial: true }, 44 | cloudinaryImage: { type: Types.CloudinaryImage }, 45 | cloudinaryImages: { type: Types.CloudinaryImages }, 46 | location: { type: Types.Location }, 47 | wysiwygHtml: { type: Types.Html, wysiwyg: true }, 48 | shortWysiwygField: { type: Types.Html, wysiwyg: true, height: 100 }, 49 | //embedSrc: { type: String }, 50 | //embedData: { type: Types.Embedly, from: 'embedSrc' }, 51 | }, 'Dependent Fields', { 52 | otherSelect: { type: Types.Select, options: [ 53 | { label: 'Pre-defined Value', value: 'predefined' }, 54 | { label: 'Other Value', value: 'other' }, 55 | ]}, 56 | otherValue: { type: String, dependsOn: { otherSelect: 'other' } } 57 | }, 'Relationships', { 58 | user: { type: Types.Relationship, ref: 'User', initial: true }, 59 | users: { type: Types.Relationship, ref: 'User', many: true }, 60 | nested: { 61 | posts: { type: Types.Relationship, ref: 'Post' }, 62 | }, 63 | }, 'Uneditable Fields', { 64 | uneditableString: { type: String, noedit: true, default: "Not editable" }, 65 | uneditableCheckbox: { type: Boolean, noedit: true, default: true }, 66 | uneditableDate: { type: Types.Date, noedit: true, default: Date.now }, 67 | uneditableSelect: { type: Types.Select, noedit: true, options: 'Sydney, New York, London, Paris, Hong Kong', default: 'Sydney' }, 68 | uneditableLocation: { type: Types.Location, noedit: true, defaults: { street1: '283-285 Kent St', suburb: 'Sydney', state: 'NSW', postcode: '2000', country: 'Australia' } }, 69 | }); 70 | 71 | Thing.schema.virtual('otherSelectValue').get(function () { 72 | return (this.otherSelect === 'other') ? this.otherValue : this.otherSelect; 73 | }); 74 | 75 | Thing.track = true; 76 | Thing.register(); 77 | -------------------------------------------------------------------------------- /models/User.js: -------------------------------------------------------------------------------- 1 | var keystone = require('keystone'); 2 | var Types = keystone.Field.Types; 3 | 4 | var User = new keystone.List('User', { 5 | // nodelete prevents people deleting the demo admin user 6 | nodelete: true, 7 | }); 8 | 9 | User.add({ 10 | name: { type: Types.Name, required: true, index: true }, 11 | email: { type: Types.Email, initial: true, required: true, index: true, unique: true }, 12 | phone: { type: String, width: 'short' }, 13 | photo: { type: Types.CloudinaryImage, collapse: true }, 14 | password: { type: Types.Password, initial: true, required: false }, 15 | }, 'Permissions', { 16 | isProtected: { type: Boolean, noedit: true }, 17 | }); 18 | 19 | // Provide access to Keystone 20 | User.schema.virtual('canAccessKeystone').get(function () { 21 | return true; 22 | }); 23 | 24 | User.relationship({ ref: 'Post', path: 'posts', refPath: 'author' }); 25 | 26 | User.schema.methods.wasActive = function () { 27 | this.lastActiveOn = new Date(); 28 | return this; 29 | } 30 | 31 | /** 32 | * DEMO USER PROTECTION 33 | * The following code prevents anyone updating the default admin user 34 | * and breaking access to the demo 35 | */ 36 | 37 | function protect (path) { 38 | User.schema.path(path).set(function (value) { 39 | return (this.isProtected && this.get(path)) ? this.get(path) : value; 40 | }); 41 | } 42 | 43 | ['name.first', 'name.last', 'email', 'isProtected'].forEach(protect); 44 | 45 | User.schema.path('password').set(function (newValue) { 46 | // the setter for the password field is more complicated because it has to 47 | // emulate the setter on the password type, and ensure hashing before save 48 | // also, we can't currently escape the hash->set loop, so the hash is harcoded 49 | // for the demo user for now. 50 | if (this.isProtected) return '$2a$10$fMeQ6uNsJhJZnY/6soWfc.Mq8T3MwANJK52LQCK2jzw/NjE.JBHV2'; 51 | this.__password_needs_hashing = true; 52 | return newValue; 53 | }); 54 | 55 | /** 56 | * END DEMO USER PROTECTION 57 | */ 58 | 59 | User.track = true; 60 | User.defaultColumns = 'name, email, phone, photo'; 61 | User.register(); 62 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "keystone-demo", 3 | "version": "1.0.3", 4 | "private": true, 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/JedWatson/keystone-demo.git" 8 | }, 9 | "dependencies": { 10 | "async": "^2.6.1", 11 | "csv": "^3.1.0", 12 | "keystone": "^4.0.0", 13 | "lodash": "^4.17.10", 14 | "pug": "^2.0.3" 15 | }, 16 | "scripts": { 17 | "start": "node keystone.js" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/entypo-social.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo-social.eot -------------------------------------------------------------------------------- /public/fonts/entypo-social.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /public/fonts/entypo-social.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo-social.ttf -------------------------------------------------------------------------------- /public/fonts/entypo-social.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo-social.woff -------------------------------------------------------------------------------- /public/fonts/entypo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo.eot -------------------------------------------------------------------------------- /public/fonts/entypo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /public/fonts/entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo.ttf -------------------------------------------------------------------------------- /public/fonts/entypo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/entypo.woff -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/images/logo.png -------------------------------------------------------------------------------- /public/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 16 | 20 | 23 | 27 | 30 | 33 | 35 | 39 | 41 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/affix.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: affix.js v3.3.5 3 | * http://getbootstrap.com/javascript/#affix 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // AFFIX CLASS DEFINITION 14 | // ====================== 15 | 16 | var Affix = function (element, options) { 17 | this.options = $.extend({}, Affix.DEFAULTS, options) 18 | 19 | this.$target = $(this.options.target) 20 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 21 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 22 | 23 | this.$element = $(element) 24 | this.affixed = null 25 | this.unpin = null 26 | this.pinnedOffset = null 27 | 28 | this.checkPosition() 29 | } 30 | 31 | Affix.VERSION = '3.3.5' 32 | 33 | Affix.RESET = 'affix affix-top affix-bottom' 34 | 35 | Affix.DEFAULTS = { 36 | offset: 0, 37 | target: window 38 | } 39 | 40 | Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 41 | var scrollTop = this.$target.scrollTop() 42 | var position = this.$element.offset() 43 | var targetHeight = this.$target.height() 44 | 45 | if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 46 | 47 | if (this.affixed == 'bottom') { 48 | if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 49 | return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 50 | } 51 | 52 | var initializing = this.affixed == null 53 | var colliderTop = initializing ? scrollTop : position.top 54 | var colliderHeight = initializing ? targetHeight : height 55 | 56 | if (offsetTop != null && scrollTop <= offsetTop) return 'top' 57 | if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 58 | 59 | return false 60 | } 61 | 62 | Affix.prototype.getPinnedOffset = function () { 63 | if (this.pinnedOffset) return this.pinnedOffset 64 | this.$element.removeClass(Affix.RESET).addClass('affix') 65 | var scrollTop = this.$target.scrollTop() 66 | var position = this.$element.offset() 67 | return (this.pinnedOffset = position.top - scrollTop) 68 | } 69 | 70 | Affix.prototype.checkPositionWithEventLoop = function () { 71 | setTimeout($.proxy(this.checkPosition, this), 1) 72 | } 73 | 74 | Affix.prototype.checkPosition = function () { 75 | if (!this.$element.is(':visible')) return 76 | 77 | var height = this.$element.height() 78 | var offset = this.options.offset 79 | var offsetTop = offset.top 80 | var offsetBottom = offset.bottom 81 | var scrollHeight = Math.max($(document).height(), $(document.body).height()) 82 | 83 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 84 | if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 85 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 86 | 87 | var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 88 | 89 | if (this.affixed != affix) { 90 | if (this.unpin != null) this.$element.css('top', '') 91 | 92 | var affixType = 'affix' + (affix ? '-' + affix : '') 93 | var e = $.Event(affixType + '.bs.affix') 94 | 95 | this.$element.trigger(e) 96 | 97 | if (e.isDefaultPrevented()) return 98 | 99 | this.affixed = affix 100 | this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 101 | 102 | this.$element 103 | .removeClass(Affix.RESET) 104 | .addClass(affixType) 105 | .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 106 | } 107 | 108 | if (affix == 'bottom') { 109 | this.$element.offset({ 110 | top: scrollHeight - height - offsetBottom 111 | }) 112 | } 113 | } 114 | 115 | 116 | // AFFIX PLUGIN DEFINITION 117 | // ======================= 118 | 119 | function Plugin(option) { 120 | return this.each(function () { 121 | var $this = $(this) 122 | var data = $this.data('bs.affix') 123 | var options = typeof option == 'object' && option 124 | 125 | if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 126 | if (typeof option == 'string') data[option]() 127 | }) 128 | } 129 | 130 | var old = $.fn.affix 131 | 132 | $.fn.affix = Plugin 133 | $.fn.affix.Constructor = Affix 134 | 135 | 136 | // AFFIX NO CONFLICT 137 | // ================= 138 | 139 | $.fn.affix.noConflict = function () { 140 | $.fn.affix = old 141 | return this 142 | } 143 | 144 | 145 | // AFFIX DATA-API 146 | // ============== 147 | 148 | $(window).on('load', function () { 149 | $('[data-spy="affix"]').each(function () { 150 | var $spy = $(this) 151 | var data = $spy.data() 152 | 153 | data.offset = data.offset || {} 154 | 155 | if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 156 | if (data.offsetTop != null) data.offset.top = data.offsetTop 157 | 158 | Plugin.call($spy, data) 159 | }) 160 | }) 161 | 162 | }(jQuery); 163 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.3.5 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // ALERT CLASS DEFINITION 14 | // ====================== 15 | 16 | var dismiss = '[data-dismiss="alert"]' 17 | var Alert = function (el) { 18 | $(el).on('click', dismiss, this.close) 19 | } 20 | 21 | Alert.VERSION = '3.3.5' 22 | 23 | Alert.TRANSITION_DURATION = 150 24 | 25 | Alert.prototype.close = function (e) { 26 | var $this = $(this) 27 | var selector = $this.attr('data-target') 28 | 29 | if (!selector) { 30 | selector = $this.attr('href') 31 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 32 | } 33 | 34 | var $parent = $(selector) 35 | 36 | if (e) e.preventDefault() 37 | 38 | if (!$parent.length) { 39 | $parent = $this.closest('.alert') 40 | } 41 | 42 | $parent.trigger(e = $.Event('close.bs.alert')) 43 | 44 | if (e.isDefaultPrevented()) return 45 | 46 | $parent.removeClass('in') 47 | 48 | function removeElement() { 49 | // detach from parent, fire event then clean up data 50 | $parent.detach().trigger('closed.bs.alert').remove() 51 | } 52 | 53 | $.support.transition && $parent.hasClass('fade') ? 54 | $parent 55 | .one('bsTransitionEnd', removeElement) 56 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 57 | removeElement() 58 | } 59 | 60 | 61 | // ALERT PLUGIN DEFINITION 62 | // ======================= 63 | 64 | function Plugin(option) { 65 | return this.each(function () { 66 | var $this = $(this) 67 | var data = $this.data('bs.alert') 68 | 69 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 70 | if (typeof option == 'string') data[option].call($this) 71 | }) 72 | } 73 | 74 | var old = $.fn.alert 75 | 76 | $.fn.alert = Plugin 77 | $.fn.alert.Constructor = Alert 78 | 79 | 80 | // ALERT NO CONFLICT 81 | // ================= 82 | 83 | $.fn.alert.noConflict = function () { 84 | $.fn.alert = old 85 | return this 86 | } 87 | 88 | 89 | // ALERT DATA-API 90 | // ============== 91 | 92 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 93 | 94 | }(jQuery); 95 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/button.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: button.js v3.3.5 3 | * http://getbootstrap.com/javascript/#buttons 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // BUTTON PUBLIC CLASS DEFINITION 14 | // ============================== 15 | 16 | var Button = function (element, options) { 17 | this.$element = $(element) 18 | this.options = $.extend({}, Button.DEFAULTS, options) 19 | this.isLoading = false 20 | } 21 | 22 | Button.VERSION = '3.3.5' 23 | 24 | Button.DEFAULTS = { 25 | loadingText: 'loading...' 26 | } 27 | 28 | Button.prototype.setState = function (state) { 29 | var d = 'disabled' 30 | var $el = this.$element 31 | var val = $el.is('input') ? 'val' : 'html' 32 | var data = $el.data() 33 | 34 | state += 'Text' 35 | 36 | if (data.resetText == null) $el.data('resetText', $el[val]()) 37 | 38 | // push to event loop to allow forms to submit 39 | setTimeout($.proxy(function () { 40 | $el[val](data[state] == null ? this.options[state] : data[state]) 41 | 42 | if (state == 'loadingText') { 43 | this.isLoading = true 44 | $el.addClass(d).attr(d, d) 45 | } else if (this.isLoading) { 46 | this.isLoading = false 47 | $el.removeClass(d).removeAttr(d) 48 | } 49 | }, this), 0) 50 | } 51 | 52 | Button.prototype.toggle = function () { 53 | var changed = true 54 | var $parent = this.$element.closest('[data-toggle="buttons"]') 55 | 56 | if ($parent.length) { 57 | var $input = this.$element.find('input') 58 | if ($input.prop('type') == 'radio') { 59 | if ($input.prop('checked')) changed = false 60 | $parent.find('.active').removeClass('active') 61 | this.$element.addClass('active') 62 | } else if ($input.prop('type') == 'checkbox') { 63 | if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false 64 | this.$element.toggleClass('active') 65 | } 66 | $input.prop('checked', this.$element.hasClass('active')) 67 | if (changed) $input.trigger('change') 68 | } else { 69 | this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 70 | this.$element.toggleClass('active') 71 | } 72 | } 73 | 74 | 75 | // BUTTON PLUGIN DEFINITION 76 | // ======================== 77 | 78 | function Plugin(option) { 79 | return this.each(function () { 80 | var $this = $(this) 81 | var data = $this.data('bs.button') 82 | var options = typeof option == 'object' && option 83 | 84 | if (!data) $this.data('bs.button', (data = new Button(this, options))) 85 | 86 | if (option == 'toggle') data.toggle() 87 | else if (option) data.setState(option) 88 | }) 89 | } 90 | 91 | var old = $.fn.button 92 | 93 | $.fn.button = Plugin 94 | $.fn.button.Constructor = Button 95 | 96 | 97 | // BUTTON NO CONFLICT 98 | // ================== 99 | 100 | $.fn.button.noConflict = function () { 101 | $.fn.button = old 102 | return this 103 | } 104 | 105 | 106 | // BUTTON DATA-API 107 | // =============== 108 | 109 | $(document) 110 | .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 111 | var $btn = $(e.target) 112 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 113 | Plugin.call($btn, 'toggle') 114 | if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() 115 | }) 116 | .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 117 | $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 118 | }) 119 | 120 | }(jQuery); 121 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/dropdown.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: dropdown.js v3.3.5 3 | * http://getbootstrap.com/javascript/#dropdowns 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // DROPDOWN CLASS DEFINITION 14 | // ========================= 15 | 16 | var backdrop = '.dropdown-backdrop' 17 | var toggle = '[data-toggle="dropdown"]' 18 | var Dropdown = function (element) { 19 | $(element).on('click.bs.dropdown', this.toggle) 20 | } 21 | 22 | Dropdown.VERSION = '3.3.5' 23 | 24 | function getParent($this) { 25 | var selector = $this.attr('data-target') 26 | 27 | if (!selector) { 28 | selector = $this.attr('href') 29 | selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 30 | } 31 | 32 | var $parent = selector && $(selector) 33 | 34 | return $parent && $parent.length ? $parent : $this.parent() 35 | } 36 | 37 | function clearMenus(e) { 38 | if (e && e.which === 3) return 39 | $(backdrop).remove() 40 | $(toggle).each(function () { 41 | var $this = $(this) 42 | var $parent = getParent($this) 43 | var relatedTarget = { relatedTarget: this } 44 | 45 | if (!$parent.hasClass('open')) return 46 | 47 | if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return 48 | 49 | $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 50 | 51 | if (e.isDefaultPrevented()) return 52 | 53 | $this.attr('aria-expanded', 'false') 54 | $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) 55 | }) 56 | } 57 | 58 | Dropdown.prototype.toggle = function (e) { 59 | var $this = $(this) 60 | 61 | if ($this.is('.disabled, :disabled')) return 62 | 63 | var $parent = getParent($this) 64 | var isActive = $parent.hasClass('open') 65 | 66 | clearMenus() 67 | 68 | if (!isActive) { 69 | if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 70 | // if mobile we use a backdrop because click events don't delegate 71 | $(document.createElement('div')) 72 | .addClass('dropdown-backdrop') 73 | .insertAfter($(this)) 74 | .on('click', clearMenus) 75 | } 76 | 77 | var relatedTarget = { relatedTarget: this } 78 | $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 79 | 80 | if (e.isDefaultPrevented()) return 81 | 82 | $this 83 | .trigger('focus') 84 | .attr('aria-expanded', 'true') 85 | 86 | $parent 87 | .toggleClass('open') 88 | .trigger('shown.bs.dropdown', relatedTarget) 89 | } 90 | 91 | return false 92 | } 93 | 94 | Dropdown.prototype.keydown = function (e) { 95 | if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return 96 | 97 | var $this = $(this) 98 | 99 | e.preventDefault() 100 | e.stopPropagation() 101 | 102 | if ($this.is('.disabled, :disabled')) return 103 | 104 | var $parent = getParent($this) 105 | var isActive = $parent.hasClass('open') 106 | 107 | if (!isActive && e.which != 27 || isActive && e.which == 27) { 108 | if (e.which == 27) $parent.find(toggle).trigger('focus') 109 | return $this.trigger('click') 110 | } 111 | 112 | var desc = ' li:not(.disabled):visible a' 113 | var $items = $parent.find('.dropdown-menu' + desc) 114 | 115 | if (!$items.length) return 116 | 117 | var index = $items.index(e.target) 118 | 119 | if (e.which == 38 && index > 0) index-- // up 120 | if (e.which == 40 && index < $items.length - 1) index++ // down 121 | if (!~index) index = 0 122 | 123 | $items.eq(index).trigger('focus') 124 | } 125 | 126 | 127 | // DROPDOWN PLUGIN DEFINITION 128 | // ========================== 129 | 130 | function Plugin(option) { 131 | return this.each(function () { 132 | var $this = $(this) 133 | var data = $this.data('bs.dropdown') 134 | 135 | if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 136 | if (typeof option == 'string') data[option].call($this) 137 | }) 138 | } 139 | 140 | var old = $.fn.dropdown 141 | 142 | $.fn.dropdown = Plugin 143 | $.fn.dropdown.Constructor = Dropdown 144 | 145 | 146 | // DROPDOWN NO CONFLICT 147 | // ==================== 148 | 149 | $.fn.dropdown.noConflict = function () { 150 | $.fn.dropdown = old 151 | return this 152 | } 153 | 154 | 155 | // APPLY TO STANDARD DROPDOWN ELEMENTS 156 | // =================================== 157 | 158 | $(document) 159 | .on('click.bs.dropdown.data-api', clearMenus) 160 | .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 161 | .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 162 | .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) 163 | .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) 164 | 165 | }(jQuery); 166 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/popover.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: popover.js v3.3.5 3 | * http://getbootstrap.com/javascript/#popovers 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // POPOVER PUBLIC CLASS DEFINITION 14 | // =============================== 15 | 16 | var Popover = function (element, options) { 17 | this.init('popover', element, options) 18 | } 19 | 20 | if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 21 | 22 | Popover.VERSION = '3.3.5' 23 | 24 | Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 25 | placement: 'right', 26 | trigger: 'click', 27 | content: '', 28 | template: '' 29 | }) 30 | 31 | 32 | // NOTE: POPOVER EXTENDS tooltip.js 33 | // ================================ 34 | 35 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 36 | 37 | Popover.prototype.constructor = Popover 38 | 39 | Popover.prototype.getDefaults = function () { 40 | return Popover.DEFAULTS 41 | } 42 | 43 | Popover.prototype.setContent = function () { 44 | var $tip = this.tip() 45 | var title = this.getTitle() 46 | var content = this.getContent() 47 | 48 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 49 | $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events 50 | this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 51 | ](content) 52 | 53 | $tip.removeClass('fade top bottom left right in') 54 | 55 | // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 56 | // this manually by checking the contents. 57 | if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 58 | } 59 | 60 | Popover.prototype.hasContent = function () { 61 | return this.getTitle() || this.getContent() 62 | } 63 | 64 | Popover.prototype.getContent = function () { 65 | var $e = this.$element 66 | var o = this.options 67 | 68 | return $e.attr('data-content') 69 | || (typeof o.content == 'function' ? 70 | o.content.call($e[0]) : 71 | o.content) 72 | } 73 | 74 | Popover.prototype.arrow = function () { 75 | return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 76 | } 77 | 78 | 79 | // POPOVER PLUGIN DEFINITION 80 | // ========================= 81 | 82 | function Plugin(option) { 83 | return this.each(function () { 84 | var $this = $(this) 85 | var data = $this.data('bs.popover') 86 | var options = typeof option == 'object' && option 87 | 88 | if (!data && /destroy|hide/.test(option)) return 89 | if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | var old = $.fn.popover 95 | 96 | $.fn.popover = Plugin 97 | $.fn.popover.Constructor = Popover 98 | 99 | 100 | // POPOVER NO CONFLICT 101 | // =================== 102 | 103 | $.fn.popover.noConflict = function () { 104 | $.fn.popover = old 105 | return this 106 | } 107 | 108 | }(jQuery); 109 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: scrollspy.js v3.3.5 3 | * http://getbootstrap.com/javascript/#scrollspy 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // SCROLLSPY CLASS DEFINITION 14 | // ========================== 15 | 16 | function ScrollSpy(element, options) { 17 | this.$body = $(document.body) 18 | this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 19 | this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 20 | this.selector = (this.options.target || '') + ' .nav li > a' 21 | this.offsets = [] 22 | this.targets = [] 23 | this.activeTarget = null 24 | this.scrollHeight = 0 25 | 26 | this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 27 | this.refresh() 28 | this.process() 29 | } 30 | 31 | ScrollSpy.VERSION = '3.3.5' 32 | 33 | ScrollSpy.DEFAULTS = { 34 | offset: 10 35 | } 36 | 37 | ScrollSpy.prototype.getScrollHeight = function () { 38 | return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 39 | } 40 | 41 | ScrollSpy.prototype.refresh = function () { 42 | var that = this 43 | var offsetMethod = 'offset' 44 | var offsetBase = 0 45 | 46 | this.offsets = [] 47 | this.targets = [] 48 | this.scrollHeight = this.getScrollHeight() 49 | 50 | if (!$.isWindow(this.$scrollElement[0])) { 51 | offsetMethod = 'position' 52 | offsetBase = this.$scrollElement.scrollTop() 53 | } 54 | 55 | this.$body 56 | .find(this.selector) 57 | .map(function () { 58 | var $el = $(this) 59 | var href = $el.data('target') || $el.attr('href') 60 | var $href = /^#./.test(href) && $(href) 61 | 62 | return ($href 63 | && $href.length 64 | && $href.is(':visible') 65 | && [[$href[offsetMethod]().top + offsetBase, href]]) || null 66 | }) 67 | .sort(function (a, b) { return a[0] - b[0] }) 68 | .each(function () { 69 | that.offsets.push(this[0]) 70 | that.targets.push(this[1]) 71 | }) 72 | } 73 | 74 | ScrollSpy.prototype.process = function () { 75 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 76 | var scrollHeight = this.getScrollHeight() 77 | var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 78 | var offsets = this.offsets 79 | var targets = this.targets 80 | var activeTarget = this.activeTarget 81 | var i 82 | 83 | if (this.scrollHeight != scrollHeight) { 84 | this.refresh() 85 | } 86 | 87 | if (scrollTop >= maxScroll) { 88 | return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 89 | } 90 | 91 | if (activeTarget && scrollTop < offsets[0]) { 92 | this.activeTarget = null 93 | return this.clear() 94 | } 95 | 96 | for (i = offsets.length; i--;) { 97 | activeTarget != targets[i] 98 | && scrollTop >= offsets[i] 99 | && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) 100 | && this.activate(targets[i]) 101 | } 102 | } 103 | 104 | ScrollSpy.prototype.activate = function (target) { 105 | this.activeTarget = target 106 | 107 | this.clear() 108 | 109 | var selector = this.selector + 110 | '[data-target="' + target + '"],' + 111 | this.selector + '[href="' + target + '"]' 112 | 113 | var active = $(selector) 114 | .parents('li') 115 | .addClass('active') 116 | 117 | if (active.parent('.dropdown-menu').length) { 118 | active = active 119 | .closest('li.dropdown') 120 | .addClass('active') 121 | } 122 | 123 | active.trigger('activate.bs.scrollspy') 124 | } 125 | 126 | ScrollSpy.prototype.clear = function () { 127 | $(this.selector) 128 | .parentsUntil(this.options.target, '.active') 129 | .removeClass('active') 130 | } 131 | 132 | 133 | // SCROLLSPY PLUGIN DEFINITION 134 | // =========================== 135 | 136 | function Plugin(option) { 137 | return this.each(function () { 138 | var $this = $(this) 139 | var data = $this.data('bs.scrollspy') 140 | var options = typeof option == 'object' && option 141 | 142 | if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 143 | if (typeof option == 'string') data[option]() 144 | }) 145 | } 146 | 147 | var old = $.fn.scrollspy 148 | 149 | $.fn.scrollspy = Plugin 150 | $.fn.scrollspy.Constructor = ScrollSpy 151 | 152 | 153 | // SCROLLSPY NO CONFLICT 154 | // ===================== 155 | 156 | $.fn.scrollspy.noConflict = function () { 157 | $.fn.scrollspy = old 158 | return this 159 | } 160 | 161 | 162 | // SCROLLSPY DATA-API 163 | // ================== 164 | 165 | $(window).on('load.bs.scrollspy.data-api', function () { 166 | $('[data-spy="scroll"]').each(function () { 167 | var $spy = $(this) 168 | Plugin.call($spy, $spy.data()) 169 | }) 170 | }) 171 | 172 | }(jQuery); 173 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/tab.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: tab.js v3.3.5 3 | * http://getbootstrap.com/javascript/#tabs 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // TAB CLASS DEFINITION 14 | // ==================== 15 | 16 | var Tab = function (element) { 17 | // jscs:disable requireDollarBeforejQueryAssignment 18 | this.element = $(element) 19 | // jscs:enable requireDollarBeforejQueryAssignment 20 | } 21 | 22 | Tab.VERSION = '3.3.5' 23 | 24 | Tab.TRANSITION_DURATION = 150 25 | 26 | Tab.prototype.show = function () { 27 | var $this = this.element 28 | var $ul = $this.closest('ul:not(.dropdown-menu)') 29 | var selector = $this.data('target') 30 | 31 | if (!selector) { 32 | selector = $this.attr('href') 33 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 34 | } 35 | 36 | if ($this.parent('li').hasClass('active')) return 37 | 38 | var $previous = $ul.find('.active:last a') 39 | var hideEvent = $.Event('hide.bs.tab', { 40 | relatedTarget: $this[0] 41 | }) 42 | var showEvent = $.Event('show.bs.tab', { 43 | relatedTarget: $previous[0] 44 | }) 45 | 46 | $previous.trigger(hideEvent) 47 | $this.trigger(showEvent) 48 | 49 | if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return 50 | 51 | var $target = $(selector) 52 | 53 | this.activate($this.closest('li'), $ul) 54 | this.activate($target, $target.parent(), function () { 55 | $previous.trigger({ 56 | type: 'hidden.bs.tab', 57 | relatedTarget: $this[0] 58 | }) 59 | $this.trigger({ 60 | type: 'shown.bs.tab', 61 | relatedTarget: $previous[0] 62 | }) 63 | }) 64 | } 65 | 66 | Tab.prototype.activate = function (element, container, callback) { 67 | var $active = container.find('> .active') 68 | var transition = callback 69 | && $.support.transition 70 | && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) 71 | 72 | function next() { 73 | $active 74 | .removeClass('active') 75 | .find('> .dropdown-menu > .active') 76 | .removeClass('active') 77 | .end() 78 | .find('[data-toggle="tab"]') 79 | .attr('aria-expanded', false) 80 | 81 | element 82 | .addClass('active') 83 | .find('[data-toggle="tab"]') 84 | .attr('aria-expanded', true) 85 | 86 | if (transition) { 87 | element[0].offsetWidth // reflow for transition 88 | element.addClass('in') 89 | } else { 90 | element.removeClass('fade') 91 | } 92 | 93 | if (element.parent('.dropdown-menu').length) { 94 | element 95 | .closest('li.dropdown') 96 | .addClass('active') 97 | .end() 98 | .find('[data-toggle="tab"]') 99 | .attr('aria-expanded', true) 100 | } 101 | 102 | callback && callback() 103 | } 104 | 105 | $active.length && transition ? 106 | $active 107 | .one('bsTransitionEnd', next) 108 | .emulateTransitionEnd(Tab.TRANSITION_DURATION) : 109 | next() 110 | 111 | $active.removeClass('in') 112 | } 113 | 114 | 115 | // TAB PLUGIN DEFINITION 116 | // ===================== 117 | 118 | function Plugin(option) { 119 | return this.each(function () { 120 | var $this = $(this) 121 | var data = $this.data('bs.tab') 122 | 123 | if (!data) $this.data('bs.tab', (data = new Tab(this))) 124 | if (typeof option == 'string') data[option]() 125 | }) 126 | } 127 | 128 | var old = $.fn.tab 129 | 130 | $.fn.tab = Plugin 131 | $.fn.tab.Constructor = Tab 132 | 133 | 134 | // TAB NO CONFLICT 135 | // =============== 136 | 137 | $.fn.tab.noConflict = function () { 138 | $.fn.tab = old 139 | return this 140 | } 141 | 142 | 143 | // TAB DATA-API 144 | // ============ 145 | 146 | var clickHandler = function (e) { 147 | e.preventDefault() 148 | Plugin.call($(this), 'show') 149 | } 150 | 151 | $(document) 152 | .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) 153 | .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) 154 | 155 | }(jQuery); 156 | -------------------------------------------------------------------------------- /public/js/lib/bootstrap/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.3.5 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /public/js/lib/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/blank.gif -------------------------------------------------------------------------------- /public/js/lib/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /public/js/lib/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /public/js/lib/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /public/js/lib/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /public/js/lib/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keystonejs/keystone-demo/fe4ad2a6cc3a344c6376309a6f70edb9b0956f00/public/js/lib/fancybox/helpers/fancybox_buttons.png -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/jquery.fancybox-buttons.css: -------------------------------------------------------------------------------- 1 | #fancybox-buttons { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | z-index: 8050; 6 | } 7 | 8 | #fancybox-buttons.top { 9 | top: 10px; 10 | } 11 | 12 | #fancybox-buttons.bottom { 13 | bottom: 10px; 14 | } 15 | 16 | #fancybox-buttons ul { 17 | display: block; 18 | width: 166px; 19 | height: 30px; 20 | margin: 0 auto; 21 | padding: 0; 22 | list-style: none; 23 | border: 1px solid #111; 24 | border-radius: 3px; 25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 28 | background: rgb(50,50,50); 29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); 30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); 31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); 36 | } 37 | 38 | #fancybox-buttons ul li { 39 | float: left; 40 | margin: 0; 41 | padding: 0; 42 | } 43 | 44 | #fancybox-buttons a { 45 | display: block; 46 | width: 30px; 47 | height: 30px; 48 | text-indent: -9999px; 49 | background-color: transparent; 50 | background-image: url('fancybox_buttons.png'); 51 | background-repeat: no-repeat; 52 | outline: none; 53 | opacity: 0.8; 54 | } 55 | 56 | #fancybox-buttons a:hover { 57 | opacity: 1; 58 | } 59 | 60 | #fancybox-buttons a.btnPrev { 61 | background-position: 5px 0; 62 | } 63 | 64 | #fancybox-buttons a.btnNext { 65 | background-position: -33px 0; 66 | border-right: 1px solid #3e3e3e; 67 | } 68 | 69 | #fancybox-buttons a.btnPlay { 70 | background-position: 0 -30px; 71 | } 72 | 73 | #fancybox-buttons a.btnPlayOn { 74 | background-position: -30px -30px; 75 | } 76 | 77 | #fancybox-buttons a.btnToggle { 78 | background-position: 3px -60px; 79 | border-left: 1px solid #111; 80 | border-right: 1px solid #3e3e3e; 81 | width: 35px 82 | } 83 | 84 | #fancybox-buttons a.btnToggleOn { 85 | background-position: -27px -60px; 86 | } 87 | 88 | #fancybox-buttons a.btnClose { 89 | border-left: 1px solid #111; 90 | width: 35px; 91 | background-position: -56px 0px; 92 | } 93 | 94 | #fancybox-buttons a.btnDisabled { 95 | opacity : 0.4; 96 | cursor: default; 97 | } -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | (function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '
' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/jquery.fancybox-media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Media helper for fancyBox 3 | * version: 1.0.6 (Fri, 14 Jun 2013) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * media: true 10 | * } 11 | * }); 12 | * 13 | * Set custom URL parameters: 14 | * $(".fancybox").fancybox({ 15 | * helpers : { 16 | * media: { 17 | * youtube : { 18 | * params : { 19 | * autoplay : 0 20 | * } 21 | * } 22 | * } 23 | * } 24 | * }); 25 | * 26 | * Or: 27 | * $(".fancybox").fancybox({, 28 | * helpers : { 29 | * media: true 30 | * }, 31 | * youtube : { 32 | * autoplay: 0 33 | * } 34 | * }); 35 | * 36 | * Supports: 37 | * 38 | * Youtube 39 | * http://www.youtube.com/watch?v=opj24KnzrWo 40 | * http://www.youtube.com/embed/opj24KnzrWo 41 | * http://youtu.be/opj24KnzrWo 42 | * http://www.youtube-nocookie.com/embed/opj24KnzrWo 43 | * Vimeo 44 | * http://vimeo.com/40648169 45 | * http://vimeo.com/channels/staffpicks/38843628 46 | * http://vimeo.com/groups/surrealism/videos/36516384 47 | * http://player.vimeo.com/video/45074303 48 | * Metacafe 49 | * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 50 | * http://www.metacafe.com/watch/7635964/ 51 | * Dailymotion 52 | * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 53 | * Twitvid 54 | * http://twitvid.com/QY7MD 55 | * Twitpic 56 | * http://twitpic.com/7p93st 57 | * Instagram 58 | * http://instagr.am/p/IejkuUGxQn/ 59 | * http://instagram.com/p/IejkuUGxQn/ 60 | * Google maps 61 | * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 62 | * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 63 | * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 64 | */ 65 | (function ($) { 66 | "use strict"; 67 | 68 | //Shortcut for fancyBox object 69 | var F = $.fancybox, 70 | format = function( url, rez, params ) { 71 | params = params || ''; 72 | 73 | if ( $.type( params ) === "object" ) { 74 | params = $.param(params, true); 75 | } 76 | 77 | $.each(rez, function(key, value) { 78 | url = url.replace( '$' + key, value || '' ); 79 | }); 80 | 81 | if (params.length) { 82 | url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 83 | } 84 | 85 | return url; 86 | }; 87 | 88 | //Add helper object 89 | F.helpers.media = { 90 | defaults : { 91 | youtube : { 92 | matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 93 | params : { 94 | autoplay : 1, 95 | autohide : 1, 96 | fs : 1, 97 | rel : 0, 98 | hd : 1, 99 | wmode : 'opaque', 100 | enablejsapi : 1 101 | }, 102 | type : 'iframe', 103 | url : '//www.youtube.com/embed/$3' 104 | }, 105 | vimeo : { 106 | matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 107 | params : { 108 | autoplay : 1, 109 | hd : 1, 110 | show_title : 1, 111 | show_byline : 1, 112 | show_portrait : 0, 113 | fullscreen : 1 114 | }, 115 | type : 'iframe', 116 | url : '//player.vimeo.com/video/$1' 117 | }, 118 | metacafe : { 119 | matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 120 | params : { 121 | autoPlay : 'yes' 122 | }, 123 | type : 'swf', 124 | url : function( rez, params, obj ) { 125 | obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 126 | 127 | return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 128 | } 129 | }, 130 | dailymotion : { 131 | matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 132 | params : { 133 | additionalInfos : 0, 134 | autoStart : 1 135 | }, 136 | type : 'swf', 137 | url : '//www.dailymotion.com/swf/video/$1' 138 | }, 139 | twitvid : { 140 | matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 141 | params : { 142 | autoplay : 0 143 | }, 144 | type : 'iframe', 145 | url : '//www.twitvid.com/embed.php?guid=$1' 146 | }, 147 | twitpic : { 148 | matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 149 | type : 'image', 150 | url : '//twitpic.com/show/full/$1/' 151 | }, 152 | instagram : { 153 | matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 154 | type : 'image', 155 | url : '//$1/p/$2/media/?size=l' 156 | }, 157 | google_maps : { 158 | matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 159 | type : 'iframe', 160 | url : function( rez ) { 161 | return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 162 | } 163 | } 164 | }, 165 | 166 | beforeLoad : function(opts, obj) { 167 | var url = obj.href || '', 168 | type = false, 169 | what, 170 | item, 171 | rez, 172 | params; 173 | 174 | for (what in opts) { 175 | if (opts.hasOwnProperty(what)) { 176 | item = opts[ what ]; 177 | rez = url.match( item.matcher ); 178 | 179 | if (rez) { 180 | type = item.type; 181 | params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 182 | 183 | url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 184 | 185 | break; 186 | } 187 | } 188 | } 189 | 190 | if (type) { 191 | obj.href = url; 192 | obj.type = type; 193 | 194 | obj.autoHeight = false; 195 | } 196 | } 197 | }; 198 | 199 | }(jQuery)); -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /public/js/lib/fancybox/helpers/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /public/styles/bootstrap/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /public/styles/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: middle; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /public/styles/bootstrap/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | @import "variables.less"; 9 | @import "mixins.less"; 10 | 11 | // Reset and dependencies 12 | @import "normalize.less"; 13 | @import "print.less"; 14 | @import "glyphicons.less"; 15 | 16 | // Core CSS 17 | @import "scaffolding.less"; 18 | @import "type.less"; 19 | @import "code.less"; 20 | @import "grid.less"; 21 | @import "tables.less"; 22 | @import "forms.less"; 23 | @import "buttons.less"; 24 | 25 | // Components 26 | @import "component-animations.less"; 27 | @import "dropdowns.less"; 28 | @import "button-groups.less"; 29 | @import "input-groups.less"; 30 | @import "navs.less"; 31 | @import "navbar.less"; 32 | @import "breadcrumbs.less"; 33 | @import "pagination.less"; 34 | @import "pager.less"; 35 | @import "labels.less"; 36 | @import "badges.less"; 37 | @import "jumbotron.less"; 38 | @import "thumbnails.less"; 39 | @import "alerts.less"; 40 | @import "progress-bars.less"; 41 | @import "media.less"; 42 | @import "list-group.less"; 43 | @import "panels.less"; 44 | @import "responsive-embed.less"; 45 | @import "wells.less"; 46 | @import "close.less"; 47 | 48 | // Components w/ JavaScript 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "carousel.less"; 53 | 54 | // Utility classes 55 | @import "utilities.less"; 56 | @import "responsive-utilities.less"; 57 | -------------------------------------------------------------------------------- /public/styles/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/styles/bootstrap/buttons.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | .btn { 10 | display: inline-block; 11 | margin-bottom: 0; // For input.btn 12 | font-weight: @btn-font-weight; 13 | text-align: center; 14 | vertical-align: middle; 15 | touch-action: manipulation; 16 | cursor: pointer; 17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 18 | border: 1px solid transparent; 19 | white-space: nowrap; 20 | .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base); 21 | .user-select(none); 22 | 23 | &, 24 | &:active, 25 | &.active { 26 | &:focus, 27 | &.focus { 28 | .tab-focus(); 29 | } 30 | } 31 | 32 | &:hover, 33 | &:focus, 34 | &.focus { 35 | color: @btn-default-color; 36 | text-decoration: none; 37 | } 38 | 39 | &:active, 40 | &.active { 41 | outline: 0; 42 | background-image: none; 43 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 44 | } 45 | 46 | &.disabled, 47 | &[disabled], 48 | fieldset[disabled] & { 49 | cursor: @cursor-disabled; 50 | .opacity(.65); 51 | .box-shadow(none); 52 | } 53 | 54 | a& { 55 | &.disabled, 56 | fieldset[disabled] & { 57 | pointer-events: none; // Future-proof disabling of clicks on `` elements 58 | } 59 | } 60 | } 61 | 62 | 63 | // Alternate buttons 64 | // -------------------------------------------------- 65 | 66 | .btn-default { 67 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); 68 | } 69 | .btn-primary { 70 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); 71 | } 72 | // Success appears as green 73 | .btn-success { 74 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); 75 | } 76 | // Info appears as blue-green 77 | .btn-info { 78 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); 79 | } 80 | // Warning appears as orange 81 | .btn-warning { 82 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); 83 | } 84 | // Danger and error appear as red 85 | .btn-danger { 86 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); 87 | } 88 | 89 | 90 | // Link buttons 91 | // ------------------------- 92 | 93 | // Make a button look and behave like a link 94 | .btn-link { 95 | color: @link-color; 96 | font-weight: normal; 97 | border-radius: 0; 98 | 99 | &, 100 | &:active, 101 | &.active, 102 | &[disabled], 103 | fieldset[disabled] & { 104 | background-color: transparent; 105 | .box-shadow(none); 106 | } 107 | &, 108 | &:hover, 109 | &:focus, 110 | &:active { 111 | border-color: transparent; 112 | } 113 | &:hover, 114 | &:focus { 115 | color: @link-hover-color; 116 | text-decoration: @link-hover-decoration; 117 | background-color: transparent; 118 | } 119 | &[disabled], 120 | fieldset[disabled] & { 121 | &:hover, 122 | &:focus { 123 | color: @btn-link-disabled-color; 124 | text-decoration: none; 125 | } 126 | } 127 | } 128 | 129 | 130 | // Button Sizes 131 | // -------------------------------------------------- 132 | 133 | .btn-lg { 134 | // line-height: ensure even-numbered height of button next to large input 135 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large); 136 | } 137 | .btn-sm { 138 | // line-height: ensure proper height of button next to small input 139 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small); 140 | } 141 | .btn-xs { 142 | .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small); 143 | } 144 | 145 | 146 | // Block button 147 | // -------------------------------------------------- 148 | 149 | .btn-block { 150 | display: block; 151 | width: 100%; 152 | } 153 | 154 | // Vertically space out multiple block buttons 155 | .btn-block + .btn-block { 156 | margin-top: 5px; 157 | } 158 | 159 | // Specificity overrides 160 | input[type="submit"], 161 | input[type="reset"], 162 | input[type="button"] { 163 | &.btn-block { 164 | width: 100%; 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /public/styles/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/styles/bootstrap/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /public/styles/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /public/styles/bootstrap/dropdowns.less: -------------------------------------------------------------------------------- 1 | // 2 | // Dropdown menus 3 | // -------------------------------------------------- 4 | 5 | 6 | // Dropdown arrow/caret 7 | .caret { 8 | display: inline-block; 9 | width: 0; 10 | height: 0; 11 | margin-left: 2px; 12 | vertical-align: middle; 13 | border-top: @caret-width-base dashed; 14 | border-top: @caret-width-base solid ~"\9"; // IE8 15 | border-right: @caret-width-base solid transparent; 16 | border-left: @caret-width-base solid transparent; 17 | } 18 | 19 | // The dropdown wrapper (div) 20 | .dropup, 21 | .dropdown { 22 | position: relative; 23 | } 24 | 25 | // Prevent the focus on the dropdown toggle when closing dropdowns 26 | .dropdown-toggle:focus { 27 | outline: 0; 28 | } 29 | 30 | // The dropdown menu (ul) 31 | .dropdown-menu { 32 | position: absolute; 33 | top: 100%; 34 | left: 0; 35 | z-index: @zindex-dropdown; 36 | display: none; // none by default, but block on "open" of the menu 37 | float: left; 38 | min-width: 160px; 39 | padding: 5px 0; 40 | margin: 2px 0 0; // override default ul 41 | list-style: none; 42 | font-size: @font-size-base; 43 | text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) 44 | background-color: @dropdown-bg; 45 | border: 1px solid @dropdown-fallback-border; // IE8 fallback 46 | border: 1px solid @dropdown-border; 47 | border-radius: @border-radius-base; 48 | .box-shadow(0 6px 12px rgba(0,0,0,.175)); 49 | background-clip: padding-box; 50 | 51 | // Aligns the dropdown menu to right 52 | // 53 | // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` 54 | &.pull-right { 55 | right: 0; 56 | left: auto; 57 | } 58 | 59 | // Dividers (basically an hr) within the dropdown 60 | .divider { 61 | .nav-divider(@dropdown-divider-bg); 62 | } 63 | 64 | // Links within the dropdown menu 65 | > li > a { 66 | display: block; 67 | padding: 3px 20px; 68 | clear: both; 69 | font-weight: normal; 70 | line-height: @line-height-base; 71 | color: @dropdown-link-color; 72 | white-space: nowrap; // prevent links from randomly breaking onto new lines 73 | } 74 | } 75 | 76 | // Hover/Focus state 77 | .dropdown-menu > li > a { 78 | &:hover, 79 | &:focus { 80 | text-decoration: none; 81 | color: @dropdown-link-hover-color; 82 | background-color: @dropdown-link-hover-bg; 83 | } 84 | } 85 | 86 | // Active state 87 | .dropdown-menu > .active > a { 88 | &, 89 | &:hover, 90 | &:focus { 91 | color: @dropdown-link-active-color; 92 | text-decoration: none; 93 | outline: 0; 94 | background-color: @dropdown-link-active-bg; 95 | } 96 | } 97 | 98 | // Disabled state 99 | // 100 | // Gray out text and ensure the hover/focus state remains gray 101 | 102 | .dropdown-menu > .disabled > a { 103 | &, 104 | &:hover, 105 | &:focus { 106 | color: @dropdown-link-disabled-color; 107 | } 108 | 109 | // Nuke hover/focus effects 110 | &:hover, 111 | &:focus { 112 | text-decoration: none; 113 | background-color: transparent; 114 | background-image: none; // Remove CSS gradient 115 | .reset-filter(); 116 | cursor: @cursor-disabled; 117 | } 118 | } 119 | 120 | // Open state for the dropdown 121 | .open { 122 | // Show the menu 123 | > .dropdown-menu { 124 | display: block; 125 | } 126 | 127 | // Remove the outline when :focus is triggered 128 | > a { 129 | outline: 0; 130 | } 131 | } 132 | 133 | // Menu positioning 134 | // 135 | // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown 136 | // menu with the parent. 137 | .dropdown-menu-right { 138 | left: auto; // Reset the default from `.dropdown-menu` 139 | right: 0; 140 | } 141 | // With v3, we enabled auto-flipping if you have a dropdown within a right 142 | // aligned nav component. To enable the undoing of that, we provide an override 143 | // to restore the default dropdown menu alignment. 144 | // 145 | // This is only for left-aligning a dropdown menu within a `.navbar-right` or 146 | // `.pull-right` nav component. 147 | .dropdown-menu-left { 148 | left: 0; 149 | right: auto; 150 | } 151 | 152 | // Dropdown section headers 153 | .dropdown-header { 154 | display: block; 155 | padding: 3px 20px; 156 | font-size: @font-size-small; 157 | line-height: @line-height-base; 158 | color: @dropdown-header-color; 159 | white-space: nowrap; // as with > li > a 160 | } 161 | 162 | // Backdrop to catch body clicks on mobile, etc. 163 | .dropdown-backdrop { 164 | position: fixed; 165 | left: 0; 166 | right: 0; 167 | bottom: 0; 168 | top: 0; 169 | z-index: (@zindex-dropdown - 10); 170 | } 171 | 172 | // Right aligned dropdowns 173 | .pull-right > .dropdown-menu { 174 | right: 0; 175 | left: auto; 176 | } 177 | 178 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 179 | // 180 | // Just add .dropup after the standard .dropdown class and you're set, bro. 181 | // TODO: abstract this so that the navbar fixed styles are not placed here? 182 | 183 | .dropup, 184 | .navbar-fixed-bottom .dropdown { 185 | // Reverse the caret 186 | .caret { 187 | border-top: 0; 188 | border-bottom: @caret-width-base dashed; 189 | border-bottom: @caret-width-base solid ~"\9"; // IE8 190 | content: ""; 191 | } 192 | // Different positioning for bottom up menu 193 | .dropdown-menu { 194 | top: auto; 195 | bottom: 100%; 196 | margin-bottom: 2px; 197 | } 198 | } 199 | 200 | 201 | // Component alignment 202 | // 203 | // Reiterate per navbar.less and the modified component alignment there. 204 | 205 | @media (min-width: @grid-float-breakpoint) { 206 | .navbar-right { 207 | .dropdown-menu { 208 | .dropdown-menu-right(); 209 | } 210 | // Necessary for overrides of the default right aligned menu. 211 | // Will remove come v4 in all likelihood. 212 | .dropdown-menu-left { 213 | .dropdown-menu-left(); 214 | } 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /public/styles/bootstrap/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /public/styles/bootstrap/input-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Input groups 3 | // -------------------------------------------------- 4 | 5 | // Base styles 6 | // ------------------------- 7 | .input-group { 8 | position: relative; // For dropdowns 9 | display: table; 10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table 11 | 12 | // Undo padding and float of grid classes 13 | &[class*="col-"] { 14 | float: none; 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | 19 | .form-control { 20 | // Ensure that the input is always above the *appended* addon button for 21 | // proper border colors. 22 | position: relative; 23 | z-index: 2; 24 | 25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on 26 | // select elements in input groups. To fix it, we float the input. Details: 27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 28 | float: left; 29 | 30 | width: 100%; 31 | margin-bottom: 0; 32 | } 33 | } 34 | 35 | // Sizing options 36 | // 37 | // Remix the default form control sizing classes into new ones for easier 38 | // manipulation. 39 | 40 | .input-group-lg > .form-control, 41 | .input-group-lg > .input-group-addon, 42 | .input-group-lg > .input-group-btn > .btn { 43 | .input-lg(); 44 | } 45 | .input-group-sm > .form-control, 46 | .input-group-sm > .input-group-addon, 47 | .input-group-sm > .input-group-btn > .btn { 48 | .input-sm(); 49 | } 50 | 51 | 52 | // Display as table-cell 53 | // ------------------------- 54 | .input-group-addon, 55 | .input-group-btn, 56 | .input-group .form-control { 57 | display: table-cell; 58 | 59 | &:not(:first-child):not(:last-child) { 60 | border-radius: 0; 61 | } 62 | } 63 | // Addon and addon wrapper for buttons 64 | .input-group-addon, 65 | .input-group-btn { 66 | width: 1%; 67 | white-space: nowrap; 68 | vertical-align: middle; // Match the inputs 69 | } 70 | 71 | // Text input groups 72 | // ------------------------- 73 | .input-group-addon { 74 | padding: @padding-base-vertical @padding-base-horizontal; 75 | font-size: @font-size-base; 76 | font-weight: normal; 77 | line-height: 1; 78 | color: @input-color; 79 | text-align: center; 80 | background-color: @input-group-addon-bg; 81 | border: 1px solid @input-group-addon-border-color; 82 | border-radius: @border-radius-base; 83 | 84 | // Sizing 85 | &.input-sm { 86 | padding: @padding-small-vertical @padding-small-horizontal; 87 | font-size: @font-size-small; 88 | border-radius: @border-radius-small; 89 | } 90 | &.input-lg { 91 | padding: @padding-large-vertical @padding-large-horizontal; 92 | font-size: @font-size-large; 93 | border-radius: @border-radius-large; 94 | } 95 | 96 | // Nuke default margins from checkboxes and radios to vertically center within. 97 | input[type="radio"], 98 | input[type="checkbox"] { 99 | margin-top: 0; 100 | } 101 | } 102 | 103 | // Reset rounded corners 104 | .input-group .form-control:first-child, 105 | .input-group-addon:first-child, 106 | .input-group-btn:first-child > .btn, 107 | .input-group-btn:first-child > .btn-group > .btn, 108 | .input-group-btn:first-child > .dropdown-toggle, 109 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), 110 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { 111 | .border-right-radius(0); 112 | } 113 | .input-group-addon:first-child { 114 | border-right: 0; 115 | } 116 | .input-group .form-control:last-child, 117 | .input-group-addon:last-child, 118 | .input-group-btn:last-child > .btn, 119 | .input-group-btn:last-child > .btn-group > .btn, 120 | .input-group-btn:last-child > .dropdown-toggle, 121 | .input-group-btn:first-child > .btn:not(:first-child), 122 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { 123 | .border-left-radius(0); 124 | } 125 | .input-group-addon:last-child { 126 | border-left: 0; 127 | } 128 | 129 | // Button input groups 130 | // ------------------------- 131 | .input-group-btn { 132 | position: relative; 133 | // Jankily prevent input button groups from wrapping with `white-space` and 134 | // `font-size` in combination with `inline-block` on buttons. 135 | font-size: 0; 136 | white-space: nowrap; 137 | 138 | // Negative margin for spacing, position for bringing hovered/focused/actived 139 | // element above the siblings. 140 | > .btn { 141 | position: relative; 142 | + .btn { 143 | margin-left: -1px; 144 | } 145 | // Bring the "active" button to the front 146 | &:hover, 147 | &:focus, 148 | &:active { 149 | z-index: 2; 150 | } 151 | } 152 | 153 | // Negative margin to only have a 1px border between the two 154 | &:first-child { 155 | > .btn, 156 | > .btn-group { 157 | margin-right: -1px; 158 | } 159 | } 160 | &:last-child { 161 | > .btn, 162 | > .btn-group { 163 | z-index: 2; 164 | margin-left: -1px; 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /public/styles/bootstrap/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding-top: @jumbotron-padding; 8 | padding-bottom: @jumbotron-padding; 9 | margin-bottom: @jumbotron-padding; 10 | color: @jumbotron-color; 11 | background-color: @jumbotron-bg; 12 | 13 | h1, 14 | .h1 { 15 | color: @jumbotron-heading-color; 16 | } 17 | 18 | p { 19 | margin-bottom: (@jumbotron-padding / 2); 20 | font-size: @jumbotron-font-size; 21 | font-weight: 200; 22 | } 23 | 24 | > hr { 25 | border-top-color: darken(@jumbotron-bg, 10%); 26 | } 27 | 28 | .container &, 29 | .container-fluid & { 30 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 31 | } 32 | 33 | .container { 34 | max-width: 100%; 35 | } 36 | 37 | @media screen and (min-width: @screen-sm-min) { 38 | padding-top: (@jumbotron-padding * 1.6); 39 | padding-bottom: (@jumbotron-padding * 1.6); 40 | 41 | .container &, 42 | .container-fluid & { 43 | padding-left: (@jumbotron-padding * 2); 44 | padding-right: (@jumbotron-padding * 2); 45 | } 46 | 47 | h1, 48 | .h1 { 49 | font-size: @jumbotron-heading-font-size; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /public/styles/bootstrap/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /public/styles/bootstrap/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on