├── db ├── development.sqlite3 └── production.sqlite3 ├── public ├── js │ ├── script.js │ └── libs │ │ ├── prettify │ │ ├── lang-go.js │ │ ├── lang-ml.js │ │ ├── lang-vb.js │ │ ├── lang-lua.js │ │ ├── lang-sql.js │ │ ├── lang-tex.js │ │ ├── lang-vhdl.js │ │ ├── lang-wiki.js │ │ ├── lang-apollo.js │ │ ├── lang-scala.js │ │ ├── lang-proto.js │ │ ├── lang-yaml.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-css.js │ │ ├── lang-n.js │ │ ├── lang-clj.js │ │ ├── prettify.js │ │ └── lang-xq.js │ │ ├── html5.js │ │ └── bootstrap │ │ └── bootstrap.min.js ├── img │ ├── favicon.ico │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── robots.txt ├── css │ ├── style.css │ └── prettify.css └── less │ ├── style.less │ └── bootstrap │ ├── component-animations.less │ ├── wells.less │ ├── breadcrumbs.less │ ├── close.less │ ├── thumbnails.less │ ├── utilities.less │ ├── pager.less │ ├── bootstrap.less │ ├── labels.less │ ├── code.less │ ├── alerts.less │ ├── grid.less │ ├── progress-bars.less │ ├── print.less │ ├── pagination.less │ ├── tooltip.less │ ├── scaffolding.less │ ├── popovers.less │ ├── modals.less │ ├── buttons.less │ ├── tables.less │ ├── dropdowns.less │ ├── carousel.less │ ├── button-groups.less │ ├── navs.less │ ├── type.less │ ├── forms.less │ └── navbar.less ├── config.ru ├── app └── main.rb ├── modules ├── safe.rb ├── title.rb ├── markup.rb ├── string.rb ├── monkeypatches.rb ├── favour_erubis.rb └── static_assets.rb ├── views ├── _footer.erb ├── _header.erb ├── _flashes.erb ├── main.erb └── layout.erb ├── README.textile ├── app.rb ├── Gemfile ├── Rakefile ├── settings.rb └── Gemfile.lock /db/development.sqlite3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /db/production.sqlite3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/script.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require './app' 2 | 3 | run Sinatra::Application 4 | -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/img/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # http://code.google.com/web/controlcrawlindex/ 3 | 4 | User-agent: * 5 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-go.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-ml.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-vb.js -------------------------------------------------------------------------------- /public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-lua.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-sql.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-tex.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-vhdl.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-wiki.js -------------------------------------------------------------------------------- /app/main.rb: -------------------------------------------------------------------------------- 1 | get '/?' do 2 | title 'home' 3 | flash[:success] = 'Everything is fine.' 4 | erb :main 5 | end 6 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-apollo.js -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/js/libs/prettify/lang-scala.js -------------------------------------------------------------------------------- /public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rob-mcgrail/kickoff/HEAD/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /modules/safe.rb: -------------------------------------------------------------------------------- 1 | helpers do 2 | include Rack::Utils 3 | alias_method :safe, :escape_html 4 | alias_method :h, :escape_html 5 | end 6 | -------------------------------------------------------------------------------- /modules/title.rb: -------------------------------------------------------------------------------- 1 | helpers do 2 | def title(arg = nil) 3 | @title = arg ? 'Kickoff | ' + arg : @title = 'Kickoff' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /views/_footer.erb: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /modules/markup.rb: -------------------------------------------------------------------------------- 1 | helpers do 2 | # http://rack.rubyforge.org/doc/classes/Rack/MethodOverride.html 3 | def form_method(method) 4 | "" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /views/_header.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Kickoff

4 |

A simple template for HTML5 Sinatra apps

5 |
6 |
7 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* ===== Primary Styles ======================================================== 4 | Author: 5 | ========================================================================== */ 6 | 7 | 8 | .alert {margin-bottom:0px;} 9 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /README.textile: -------------------------------------------------------------------------------- 1 | h1. Kickoff 2 | 3 | h2. A simple template for HTML5 "Sinatra":http://www.sinatrarb.com/documentation apps. 4 | 5 | @$ git clone git://github.com/robomc/kickoff.git@ 6 | 7 | @$ cd kickoff@ 8 | 9 | @$ gem install bundler@ 10 | 11 | @$ bundle install@ 12 | 13 | @$ rake server@ 14 | 15 | Visit http://0.0.0.0:9000 16 | -------------------------------------------------------------------------------- /modules/string.rb: -------------------------------------------------------------------------------- 1 | # Helpers added to String 2 | 3 | class String 4 | def parameterize(delimeter = '-') 5 | self.gsub(/[^a-z0-9\-_!?]+/i, delimeter).downcase 6 | end 7 | 8 | def encrypt 9 | BCrypt::Password.create(self) 10 | end 11 | 12 | def make_matchable 13 | BCrypt::Password.new(self) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'bundler/setup' 3 | 4 | Bundler.require(:default) 5 | Bundler.require(:dev) if settings.development? 6 | Bundler.require(:production) if settings.production? 7 | 8 | require './settings' 9 | 10 | Dir['./modules/*.rb'].each {|file| require file } 11 | Dir['./app/*.rb'].each {|file| require file } 12 | 13 | DataMapper.finalize 14 | -------------------------------------------------------------------------------- /public/less/style.less: -------------------------------------------------------------------------------- 1 | @import "bootstrap/bootstrap.less"; 2 | 3 | body { 4 | padding-top: 30px; 5 | padding-bottom: 40px; 6 | } 7 | 8 | 9 | /* ===== Primary Styles ======================================================== 10 | Author: 11 | ========================================================================== */ 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /modules/monkeypatches.rb: -------------------------------------------------------------------------------- 1 | # Over-riding a warning about #options being deprecated. 2 | # 3 | # Some library is calling #options still. 4 | # Check some time in the future that this is 5 | # still the case. 6 | 7 | class Sinatra::Base 8 | def options 9 | settings 10 | end 11 | end 12 | 13 | # 1.8.7-head freaks out when it sees 14 | # calls to #id, which is annoying because 15 | # it's a perfectly normal datamapper method... 16 | 17 | class Object 18 | def id 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /modules/favour_erubis.rb: -------------------------------------------------------------------------------- 1 | # Strongly encourages sinatra to render .erb files 2 | # with the much-faster erubis library 3 | 4 | module Sinatra::Erb 5 | def erb(content, options={}) 6 | begin 7 | require 'erubis' 8 | @@erb_class = Erubis::Eruby 9 | rescue LoadError 10 | require "erb" 11 | @@erb_class = ::ERB 12 | end 13 | render(:erb, content, options) 14 | end 15 | 16 | private 17 | 18 | def render_erb(content, options = {}) 19 | @@erb_class.new(content).result(binding) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | 3 | gem "sinatra" 4 | gem "sinatra-flash" 5 | gem "dm-core", ">=1.2" 6 | gem "dm-do-adapter", ">=1.2" 7 | gem "dm-timestamps", ">=1.2" 8 | gem "dm-validations", ">=1.2" 9 | gem "dm-migrations", ">=1.2" 10 | gem "erubis" 11 | gem "haml" 12 | gem "RedCloth" 13 | gem "warden" 14 | gem "bcrypt-ruby" 15 | gem "trollop" 16 | 17 | group :dev do 18 | gem "thin" 19 | gem "dm-sqlite-adapter", ">=1.2" 20 | end 21 | 22 | group :production do 23 | gem "dm-mysql-adapter", ">=1.2" 24 | end 25 | 26 | 27 | group :test do 28 | gem "minitest", :platforms => :mri_18 29 | gem "minitest-colorize" 30 | gem "webmock" 31 | end 32 | -------------------------------------------------------------------------------- /public/less/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/twitter/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 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | .transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /public/less/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /public/less/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/js/libs/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /public/less/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 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /public/less/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .linenums .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 18px; 29 | text-shadow: 0 1px 0 #fff; 30 | } 31 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | 3 | task :default => [:test] 4 | 5 | env = ENV["env"] || "development" 6 | 7 | task :test do 8 | require './app' 9 | Bundler.require(:test) 10 | require 'minitest/autorun' 11 | Dir['./test/test_*.rb'].each {|file| require file } 12 | end 13 | 14 | namespace :db do 15 | require './app' 16 | set :environment, env.to_sym 17 | load './settings.rb' 18 | 19 | task :update do 20 | puts "\nNon-destructively updating:\n\n" 21 | puts settings.db 22 | DataMapper.auto_upgrade! 23 | end 24 | 25 | task :migrate do 26 | puts "\nDestructively update #{env} database? Y/N\n" 27 | if $stdin.gets.chomp.downcase == 'y' 28 | puts "\nDestructively updating:\n\n" 29 | puts settings.db 30 | DataMapper.auto_migrate! 31 | end 32 | end 33 | end 34 | 35 | task :server do 36 | system("bundle exec rackup -p 9000 -s thin") 37 | end 38 | 39 | task :install do 40 | system("bundle install") 41 | Rake::Task["test"].invoke 42 | Rake::Task["db:migrate"].invoke 43 | end 44 | -------------------------------------------------------------------------------- /public/less/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /public/less/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /views/_flashes.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if flash[:default] %> 4 |
5 | <%= link_to 'x', '#', {:class => 'close', 'data-dismiss' => 'alert'} %> 6 | <%= flash[:default] %> 7 |
8 | <% end %> 9 | 10 | <% if flash[:info] %> 11 |
12 | <%= link_to 'x', '#', {:class => 'close', 'data-dismiss' => 'alert'} %> 13 | <%= flash[:info] %> 14 |
15 | <% end %> 16 | 17 | <% if flash[:success] %> 18 |
19 | <%= link_to 'x', '#', {:class => 'close', 'data-dismiss' => 'alert'} %> 20 | <%= flash[:success] %> 21 |
22 | <% end %> 23 | 24 | <% if flash[:error] %> 25 |
26 | <%= link_to 'x', '#', {:class => 'close', 'data-dismiss' => 'alert'} %> 27 | <%= flash[:error] %> 28 |
29 | <% end %> 30 |
31 |
32 | -------------------------------------------------------------------------------- /public/less/bootstrap/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | 9 | // Core CSS 10 | @import "scaffolding.less"; 11 | @import "type.less"; 12 | @import "code.less"; 13 | @import "grid.less"; 14 | @import "tables.less"; 15 | @import "forms.less"; 16 | @import "buttons.less"; 17 | 18 | // Components 19 | @import "component-animations.less"; 20 | @import "glyphicons.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "wells.less"; 39 | @import "close.less"; 40 | 41 | // Components w/ JavaScript 42 | @import "modals.less"; 43 | @import "tooltip.less"; 44 | @import "popovers.less"; 45 | @import "carousel.less"; 46 | 47 | // Utility classes 48 | @import "utilities.less"; 49 | @import "responsive-utilities.less"; 50 | -------------------------------------------------------------------------------- /public/less/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 | &[href] { 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/js/libs/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /views/main.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | $ git clone git://github.com/robomc/kickoff.git 5 |
6 |
7 |
8 |
9 |
10 |

Useful front-end defaults

11 | 18 |
19 |
20 |

Backend essentials and tweaks

21 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /public/less/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 | white-space: nowrap; 21 | border-radius: @border-radius-base; 22 | } 23 | 24 | // User input typically entered via keyboard 25 | kbd { 26 | padding: 2px 4px; 27 | font-size: 90%; 28 | color: @kbd-color; 29 | background-color: @kbd-bg; 30 | border-radius: @border-radius-small; 31 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 32 | } 33 | 34 | // Blocks of code 35 | pre { 36 | display: block; 37 | padding: ((@line-height-computed - 1) / 2); 38 | margin: 0 0 (@line-height-computed / 2); 39 | font-size: (@font-size-base - 1); // 14px to 13px 40 | line-height: @line-height-base; 41 | word-break: break-all; 42 | word-wrap: break-word; 43 | color: @pre-color; 44 | background-color: @pre-bg; 45 | border: 1px solid @pre-border-color; 46 | border-radius: @border-radius-base; 47 | 48 | // Account for some code outputs that place code tags in pre tags 49 | code { 50 | padding: 0; 51 | font-size: inherit; 52 | color: inherit; 53 | white-space: pre-wrap; 54 | background-color: transparent; 55 | border-radius: 0; 56 | } 57 | } 58 | 59 | // Enable scrollable blocks of code 60 | .pre-scrollable { 61 | max-height: @pre-scrollable-max-height; 62 | overflow-y: scroll; 63 | } 64 | -------------------------------------------------------------------------------- /public/less/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 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: (@alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 58 | } 59 | .alert-info { 60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 61 | } 62 | .alert-warning { 63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 64 | } 65 | .alert-danger { 66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /public/less/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 | -------------------------------------------------------------------------------- /settings.rb: -------------------------------------------------------------------------------- 1 | configure do 2 | set :method_override, true # For HTTP verbs 3 | set :logging, false # stops annoying double log messages. 4 | set :static, false # see config.ru for dev mode static file serving 5 | set :asset_timestamps, false # true for ?9879879 asset stamps 6 | end 7 | 8 | configure :development do 9 | set :asset_timestamps, true 10 | set :db, 'sqlite3://' + settings.root + '/db/development.sqlite3' 11 | set :raise_errors, true 12 | set :show_exceptions, true 13 | set :haml, {:format => :html5, :ugly => false, :escape_html => true} 14 | end 15 | 16 | configure :production do 17 | set :db, 'mysql://user:password@hostname/database' 18 | set :raise_errors, false 19 | set :show_exceptions, false 20 | set :haml, {:format => :html5, :ugly => true, :escape_html => true} 21 | end 22 | 23 | configure :test do 24 | set :db, 'sqlite3://' + settings.root + '/db/test.sqlite3' 25 | end 26 | 27 | # Rack configuration 28 | # Serve static files in dev 29 | if settings.development? 30 | use Rack::Static, :urls => ['/css', '/img', '/js', '/less', '/fonts', '/robots.txt', '/favicons.ico'], :root => "public" 31 | end 32 | 33 | # Authentication middleware 34 | # https://github.com/hassox/warden/wiki/overview 35 | use Warden::Manager do |mgmt| 36 | mgmt.default_strategies :password 37 | mgmt.failure_app = Sinatra::Application 38 | end 39 | 40 | use Rack::Session::Cookie, :key => 'kickoff.session', 41 | :path => '/', 42 | :expire_after => 2592000, # In seconds 43 | :secret => 'change_me_in_production' 44 | 45 | # Database 46 | # http://datamapper.rubyforge.org/dm-core/DataMapper.html 47 | 48 | DataMapper.setup(:default, settings.db) 49 | 50 | DataMapper::Property::String.length(255) 51 | DataMapper::Logger.new($stdout, :info) if settings.development? 52 | -------------------------------------------------------------------------------- /public/less/bootstrap/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | 23 | // Bar itself 24 | // ------------------------- 25 | 26 | // Outer container 27 | .progress { 28 | overflow: hidden; 29 | height: @line-height-computed; 30 | margin-bottom: @line-height-computed; 31 | background-color: @progress-bg; 32 | border-radius: @border-radius-base; 33 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 34 | } 35 | 36 | // Bar of progress 37 | .progress-bar { 38 | float: left; 39 | width: 0%; 40 | height: 100%; 41 | font-size: @font-size-small; 42 | line-height: @line-height-computed; 43 | color: @progress-bar-color; 44 | text-align: center; 45 | background-color: @progress-bar-bg; 46 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 47 | .transition(width .6s ease); 48 | } 49 | 50 | // Striped bars 51 | .progress-striped .progress-bar { 52 | #gradient > .striped(); 53 | background-size: 40px 40px; 54 | } 55 | 56 | // Call animation for the active one 57 | .progress.active .progress-bar { 58 | .animation(progress-bar-stripes 2s linear infinite); 59 | } 60 | 61 | 62 | 63 | // Variations 64 | // ------------------------- 65 | 66 | .progress-bar-success { 67 | .progress-bar-variant(@progress-bar-success-bg); 68 | } 69 | 70 | .progress-bar-info { 71 | .progress-bar-variant(@progress-bar-info-bg); 72 | } 73 | 74 | .progress-bar-warning { 75 | .progress-bar-variant(@progress-bar-warning-bg); 76 | } 77 | 78 | .progress-bar-danger { 79 | .progress-bar-variant(@progress-bar-danger-bg); 80 | } 81 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: http://rubygems.org/ 3 | specs: 4 | RedCloth (4.2.8) 5 | addressable (2.2.6) 6 | bcrypt-ruby (2.1.4) 7 | crack (0.3.1) 8 | daemons (1.1.4) 9 | data_objects (0.10.8) 10 | addressable (~> 2.1) 11 | dm-core (1.2.0) 12 | addressable (~> 2.2.6) 13 | dm-do-adapter (1.2.0) 14 | data_objects (~> 0.10.6) 15 | dm-core (~> 1.2.0) 16 | dm-migrations (1.2.0) 17 | dm-core (~> 1.2.0) 18 | dm-mysql-adapter (1.2.0) 19 | dm-do-adapter (~> 1.2.0) 20 | do_mysql (~> 0.10.6) 21 | dm-sqlite-adapter (1.2.0) 22 | dm-do-adapter (~> 1.2.0) 23 | do_sqlite3 (~> 0.10.6) 24 | dm-timestamps (1.2.0) 25 | dm-core (~> 1.2.0) 26 | dm-validations (1.2.0) 27 | dm-core (~> 1.2.0) 28 | do_mysql (0.10.8) 29 | data_objects (= 0.10.8) 30 | do_sqlite3 (0.10.8) 31 | data_objects (= 0.10.8) 32 | erubis (2.7.0) 33 | eventmachine (0.12.10) 34 | haml (3.1.3) 35 | minitest (2.12.1) 36 | minitest-colorize (0.0.4) 37 | minitest (~> 2.0) 38 | rack (1.3.4) 39 | rack-protection (1.1.4) 40 | rack 41 | sinatra (1.3.1) 42 | rack (~> 1.3, >= 1.3.4) 43 | rack-protection (~> 1.1, >= 1.1.2) 44 | tilt (~> 1.3, >= 1.3.3) 45 | sinatra-flash (0.3.0) 46 | sinatra (>= 1.0.0) 47 | thin (1.2.11) 48 | daemons (>= 1.0.9) 49 | eventmachine (>= 0.12.6) 50 | rack (>= 1.0.0) 51 | tilt (1.3.3) 52 | trollop (1.16.2) 53 | warden (1.0.6) 54 | rack (>= 1.0) 55 | webmock (1.7.10) 56 | addressable (~> 2.2, > 2.2.5) 57 | crack (>= 0.1.7) 58 | 59 | PLATFORMS 60 | ruby 61 | 62 | DEPENDENCIES 63 | RedCloth 64 | bcrypt-ruby 65 | dm-core (>= 1.2) 66 | dm-do-adapter (>= 1.2) 67 | dm-migrations (>= 1.2) 68 | dm-mysql-adapter (>= 1.2) 69 | dm-sqlite-adapter (>= 1.2) 70 | dm-timestamps (>= 1.2) 71 | dm-validations (>= 1.2) 72 | erubis 73 | haml 74 | minitest 75 | minitest-colorize 76 | sinatra 77 | sinatra-flash 78 | thin 79 | trollop 80 | warden 81 | webmock 82 | -------------------------------------------------------------------------------- /public/less/bootstrap/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | a[href^="javascript:"]:after, 30 | a[href^="#"]:after { 31 | content: ""; 32 | } 33 | 34 | pre, 35 | blockquote { 36 | border: 1px solid #999; 37 | page-break-inside: avoid; 38 | } 39 | 40 | thead { 41 | display: table-header-group; // h5bp.com/t 42 | } 43 | 44 | tr, 45 | img { 46 | page-break-inside: avoid; 47 | } 48 | 49 | img { 50 | max-width: 100% !important; 51 | } 52 | 53 | p, 54 | h2, 55 | h3 { 56 | orphans: 3; 57 | widows: 3; 58 | } 59 | 60 | h2, 61 | h3 { 62 | page-break-after: avoid; 63 | } 64 | 65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 66 | // Once fixed, we can just straight up remove this. 67 | select { 68 | background: #fff !important; 69 | } 70 | 71 | // Bootstrap components 72 | .navbar { 73 | display: none; 74 | } 75 | .table { 76 | td, 77 | th { 78 | background-color: #fff !important; 79 | } 80 | } 81 | .btn, 82 | .dropup > .btn { 83 | > .caret { 84 | border-top-color: #000 !important; 85 | } 86 | } 87 | .label { 88 | border: 1px solid #000; 89 | } 90 | 91 | .table { 92 | border-collapse: collapse !important; 93 | } 94 | .table-bordered { 95 | th, 96 | td { 97 | border: 1px solid #ddd !important; 98 | } 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /public/less/bootstrap/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: not-allowed; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /views/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <%= @title || '' %> 12 | 13 | 14 | 15 | 16 | <% if settings.development? %> 17 | 18 | <%= javascript_tag "/js/libs/less-1.7.0.min.js" %> 19 | <% end %> 20 | 21 | <% if settings.production? %> 22 | <%= stylesheet_tag "/css/bootstrap.min.css" %> 23 | <% end %> 24 | 25 | <%= stylesheet_tag "/css/prettify.css" %> 26 | <%= stylesheet_tag "/css/style.css" %> 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 | <%= erb :_header %> 40 |
41 | 42 |
43 | <%= erb :_flashes %> 44 |
45 | 46 |
47 | <%= yield if block_given? %> 48 |
49 | 50 | 53 |
54 | 55 | 56 | 57 | 58 | 59 | <%= javascript_tag "/js/libs/prettify/prettify.js" %> 60 | 61 | 62 | <%= javascript_tag "/js/libs/bootstrap/bootstrap.min.js" %> 63 | 64 | <%= javascript_tag "/js/script.js" %> 65 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /public/less/bootstrap/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindex-tooltip; 10 | display: block; 11 | visibility: visible; 12 | font-size: @font-size-small; 13 | line-height: 1.4; 14 | .opacity(0); 15 | 16 | &.in { .opacity(@tooltip-opacity); } 17 | &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } 18 | &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } 19 | &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } 20 | &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; } 21 | } 22 | 23 | // Wrapper for the tooltip content 24 | .tooltip-inner { 25 | max-width: @tooltip-max-width; 26 | padding: 3px 8px; 27 | color: @tooltip-color; 28 | text-align: center; 29 | text-decoration: none; 30 | background-color: @tooltip-bg; 31 | border-radius: @border-radius-base; 32 | } 33 | 34 | // Arrows 35 | .tooltip-arrow { 36 | position: absolute; 37 | width: 0; 38 | height: 0; 39 | border-color: transparent; 40 | border-style: solid; 41 | } 42 | .tooltip { 43 | &.top .tooltip-arrow { 44 | bottom: 0; 45 | left: 50%; 46 | margin-left: -@tooltip-arrow-width; 47 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 48 | border-top-color: @tooltip-arrow-color; 49 | } 50 | &.top-left .tooltip-arrow { 51 | bottom: 0; 52 | left: @tooltip-arrow-width; 53 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 54 | border-top-color: @tooltip-arrow-color; 55 | } 56 | &.top-right .tooltip-arrow { 57 | bottom: 0; 58 | right: @tooltip-arrow-width; 59 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 60 | border-top-color: @tooltip-arrow-color; 61 | } 62 | &.right .tooltip-arrow { 63 | top: 50%; 64 | left: 0; 65 | margin-top: -@tooltip-arrow-width; 66 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0; 67 | border-right-color: @tooltip-arrow-color; 68 | } 69 | &.left .tooltip-arrow { 70 | top: 50%; 71 | right: 0; 72 | margin-top: -@tooltip-arrow-width; 73 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width; 74 | border-left-color: @tooltip-arrow-color; 75 | } 76 | &.bottom .tooltip-arrow { 77 | top: 0; 78 | left: 50%; 79 | margin-left: -@tooltip-arrow-width; 80 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 81 | border-bottom-color: @tooltip-arrow-color; 82 | } 83 | &.bottom-left .tooltip-arrow { 84 | top: 0; 85 | left: @tooltip-arrow-width; 86 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 87 | border-bottom-color: @tooltip-arrow-color; 88 | } 89 | &.bottom-right .tooltip-arrow { 90 | top: 0; 91 | right: @tooltip-arrow-width; 92 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 93 | border-bottom-color: @tooltip-arrow-color; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /public/less/bootstrap/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Reset the box-sizing 7 | // 8 | // Heads up! This reset may cause conflicts with some third-party widgets. 9 | // For recommendations on resolving such conflicts, see 10 | // http://getbootstrap.com/getting-started/#third-box-sizing 11 | * { 12 | .box-sizing(border-box); 13 | } 14 | *:before, 15 | *:after { 16 | .box-sizing(border-box); 17 | } 18 | 19 | 20 | // Body reset 21 | 22 | html { 23 | font-size: 62.5%; 24 | -webkit-tap-highlight-color: rgba(0,0,0,0); 25 | } 26 | 27 | body { 28 | font-family: @font-family-base; 29 | font-size: @font-size-base; 30 | line-height: @line-height-base; 31 | color: @text-color; 32 | background-color: @body-bg; 33 | } 34 | 35 | // Reset fonts for relevant elements 36 | input, 37 | button, 38 | select, 39 | textarea { 40 | font-family: inherit; 41 | font-size: inherit; 42 | line-height: inherit; 43 | } 44 | 45 | 46 | // Links 47 | 48 | a { 49 | color: @link-color; 50 | text-decoration: none; 51 | 52 | &:hover, 53 | &:focus { 54 | color: @link-hover-color; 55 | text-decoration: underline; 56 | } 57 | 58 | &:focus { 59 | .tab-focus(); 60 | } 61 | } 62 | 63 | 64 | // Figures 65 | // 66 | // We reset this here because previously Normalize had no `figure` margins. This 67 | // ensures we don't break anyone's use of the element. 68 | 69 | figure { 70 | margin: 0; 71 | } 72 | 73 | 74 | // Images 75 | 76 | img { 77 | vertical-align: middle; 78 | } 79 | 80 | // Responsive images (ensure images don't scale beyond their parents) 81 | .img-responsive { 82 | .img-responsive(); 83 | } 84 | 85 | // Rounded corners 86 | .img-rounded { 87 | border-radius: @border-radius-large; 88 | } 89 | 90 | // Image thumbnails 91 | // 92 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`. 93 | .img-thumbnail { 94 | padding: @thumbnail-padding; 95 | line-height: @line-height-base; 96 | background-color: @thumbnail-bg; 97 | border: 1px solid @thumbnail-border; 98 | border-radius: @thumbnail-border-radius; 99 | .transition(all .2s ease-in-out); 100 | 101 | // Keep them at most 100% wide 102 | .img-responsive(inline-block); 103 | } 104 | 105 | // Perfect circle 106 | .img-circle { 107 | border-radius: 50%; // set radius in percents 108 | } 109 | 110 | 111 | // Horizontal rules 112 | 113 | hr { 114 | margin-top: @line-height-computed; 115 | margin-bottom: @line-height-computed; 116 | border: 0; 117 | border-top: 1px solid @hr-border; 118 | } 119 | 120 | 121 | // Only display content to screen readers 122 | // 123 | // See: http://a11yproject.com/posts/how-to-hide-content/ 124 | 125 | .sr-only { 126 | position: absolute; 127 | width: 1px; 128 | height: 1px; 129 | margin: -1px; 130 | padding: 0; 131 | overflow: hidden; 132 | clip: rect(0,0,0,0); 133 | border: 0; 134 | } 135 | -------------------------------------------------------------------------------- /public/js/libs/html5.js: -------------------------------------------------------------------------------- 1 | // HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed 2 | // Uncompressed source: https://github.com/aFarkas/html5shiv 3 | (function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c .arrow { 52 | &, 53 | &:after { 54 | position: absolute; 55 | display: block; 56 | width: 0; 57 | height: 0; 58 | border-color: transparent; 59 | border-style: solid; 60 | } 61 | } 62 | .popover > .arrow { 63 | border-width: @popover-arrow-outer-width; 64 | } 65 | .popover > .arrow:after { 66 | border-width: @popover-arrow-width; 67 | content: ""; 68 | } 69 | 70 | .popover { 71 | &.top > .arrow { 72 | left: 50%; 73 | margin-left: -@popover-arrow-outer-width; 74 | border-bottom-width: 0; 75 | border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback 76 | border-top-color: @popover-arrow-outer-color; 77 | bottom: -@popover-arrow-outer-width; 78 | &:after { 79 | content: " "; 80 | bottom: 1px; 81 | margin-left: -@popover-arrow-width; 82 | border-bottom-width: 0; 83 | border-top-color: @popover-arrow-color; 84 | } 85 | } 86 | &.right > .arrow { 87 | top: 50%; 88 | left: -@popover-arrow-outer-width; 89 | margin-top: -@popover-arrow-outer-width; 90 | border-left-width: 0; 91 | border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback 92 | border-right-color: @popover-arrow-outer-color; 93 | &:after { 94 | content: " "; 95 | left: 1px; 96 | bottom: -@popover-arrow-width; 97 | border-left-width: 0; 98 | border-right-color: @popover-arrow-color; 99 | } 100 | } 101 | &.bottom > .arrow { 102 | left: 50%; 103 | margin-left: -@popover-arrow-outer-width; 104 | border-top-width: 0; 105 | border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback 106 | border-bottom-color: @popover-arrow-outer-color; 107 | top: -@popover-arrow-outer-width; 108 | &:after { 109 | content: " "; 110 | top: 1px; 111 | margin-left: -@popover-arrow-width; 112 | border-top-width: 0; 113 | border-bottom-color: @popover-arrow-color; 114 | } 115 | } 116 | 117 | &.left > .arrow { 118 | top: 50%; 119 | right: -@popover-arrow-outer-width; 120 | margin-top: -@popover-arrow-outer-width; 121 | border-right-width: 0; 122 | border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback 123 | border-left-color: @popover-arrow-outer-color; 124 | &:after { 125 | content: " "; 126 | right: 1px; 127 | border-right-width: 0; 128 | border-left-color: @popover-arrow-color; 129 | bottom: -@popover-arrow-width; 130 | } 131 | } 132 | 133 | } 134 | -------------------------------------------------------------------------------- /public/less/bootstrap/modals.less: -------------------------------------------------------------------------------- 1 | // 2 | // Modals 3 | // -------------------------------------------------- 4 | 5 | // .modal-open - body class for killing the scroll 6 | // .modal - container to scroll within 7 | // .modal-dialog - positioning shell for the actual modal 8 | // .modal-content - actual modal w/ bg and corners and shit 9 | 10 | // Kill the scroll on the body 11 | .modal-open { 12 | overflow: hidden; 13 | } 14 | 15 | // Container that the modal scrolls within 16 | .modal { 17 | display: none; 18 | overflow: auto; 19 | overflow-y: scroll; 20 | position: fixed; 21 | top: 0; 22 | right: 0; 23 | bottom: 0; 24 | left: 0; 25 | z-index: @zindex-modal; 26 | -webkit-overflow-scrolling: touch; 27 | 28 | // Prevent Chrome on Windows from adding a focus outline. For details, see 29 | // https://github.com/twbs/bootstrap/pull/10951. 30 | outline: 0; 31 | 32 | // When fading in the modal, animate it to slide down 33 | &.fade .modal-dialog { 34 | .translate(0, -25%); 35 | .transition-transform(~"0.3s ease-out"); 36 | } 37 | &.in .modal-dialog { .translate(0, 0)} 38 | } 39 | 40 | // Shell div to position the modal with bottom padding 41 | .modal-dialog { 42 | position: relative; 43 | width: auto; 44 | margin: 10px; 45 | } 46 | 47 | // Actual modal 48 | .modal-content { 49 | position: relative; 50 | background-color: @modal-content-bg; 51 | border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) 52 | border: 1px solid @modal-content-border-color; 53 | border-radius: @border-radius-large; 54 | .box-shadow(0 3px 9px rgba(0,0,0,.5)); 55 | background-clip: padding-box; 56 | // Remove focus outline from opened modal 57 | outline: none; 58 | } 59 | 60 | // Modal background 61 | .modal-backdrop { 62 | position: fixed; 63 | top: 0; 64 | right: 0; 65 | bottom: 0; 66 | left: 0; 67 | z-index: @zindex-modal-background; 68 | background-color: @modal-backdrop-bg; 69 | // Fade for backdrop 70 | &.fade { .opacity(0); } 71 | &.in { .opacity(@modal-backdrop-opacity); } 72 | } 73 | 74 | // Modal header 75 | // Top section of the modal w/ title and dismiss 76 | .modal-header { 77 | padding: @modal-title-padding; 78 | border-bottom: 1px solid @modal-header-border-color; 79 | min-height: (@modal-title-padding + @modal-title-line-height); 80 | } 81 | // Close icon 82 | .modal-header .close { 83 | margin-top: -2px; 84 | } 85 | 86 | // Title text within header 87 | .modal-title { 88 | margin: 0; 89 | line-height: @modal-title-line-height; 90 | } 91 | 92 | // Modal body 93 | // Where all modal content resides (sibling of .modal-header and .modal-footer) 94 | .modal-body { 95 | position: relative; 96 | padding: @modal-inner-padding; 97 | } 98 | 99 | // Footer (for actions) 100 | .modal-footer { 101 | margin-top: 15px; 102 | padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding; 103 | text-align: right; // right align buttons 104 | border-top: 1px solid @modal-footer-border-color; 105 | &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons 106 | 107 | // Properly space out buttons 108 | .btn + .btn { 109 | margin-left: 5px; 110 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 111 | } 112 | // but override that for button groups 113 | .btn-group .btn + .btn { 114 | margin-left: -1px; 115 | } 116 | // and override it for block buttons as well 117 | .btn-block + .btn-block { 118 | margin-left: 0; 119 | } 120 | } 121 | 122 | // Scale up the modal 123 | @media (min-width: @screen-sm-min) { 124 | // Automatically set modal's width for larger viewports 125 | .modal-dialog { 126 | width: @modal-md; 127 | margin: 30px auto; 128 | } 129 | .modal-content { 130 | .box-shadow(0 5px 15px rgba(0,0,0,.5)); 131 | } 132 | 133 | // Modal sizes 134 | .modal-sm { width: @modal-sm; } 135 | } 136 | 137 | @media (min-width: @screen-md-min) { 138 | .modal-lg { width: @modal-lg; } 139 | } 140 | -------------------------------------------------------------------------------- /modules/static_assets.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra/base' 2 | 3 | # https://github.com/wbzyl/sinatra-static-assets 4 | # 5 | # Find it convenient to include this under modules rather than 6 | # as a gem - acts as documentation, and occasionally you'll want to tweak it. 7 | # 8 | # This fork applies timestamp param to images too. 9 | 10 | module Sinatra 11 | module StaticAssets 12 | module Helpers 13 | 14 | @@asset_timestamps_cache = {} 15 | @@asset_mutex ||= Mutex.new 16 | 17 | # In HTML and tags have no end tag. 18 | # In XHTML, on the contrary, these tags must be properly closed. 19 | # 20 | # We can choose the appropriate behaviour with +closed+ option: 21 | # 22 | # image_tag "/images/foo.png", :alt => "Foo itself", :closed => true 23 | # 24 | # The default value of +closed+ option is +false+. 25 | # 26 | def image_tag(source, options = {}) 27 | options[:src] = asset_url_for(source) 28 | tag("img", options) 29 | end 30 | 31 | def stylesheet_link_tag(*sources) 32 | list, options = extract_options(sources) 33 | list.collect { |source| stylesheet_tag(source, options) }.join("\n") 34 | end 35 | 36 | def javascript_script_tag(*sources) 37 | list, options = extract_options(sources) 38 | list.collect { |source| javascript_tag(source, options) }.join("\n") 39 | end 40 | 41 | alias :javascript_include_tag :javascript_script_tag 42 | 43 | def link_to(desc, url, options = {}) 44 | tag("a", options.merge(:href => url_for(url))) do 45 | desc 46 | end 47 | end 48 | 49 | private 50 | 51 | def url_for(addr, absolute = false) 52 | uri(addr, absolute == :full ? true : false, true) 53 | end 54 | 55 | def is_uri?(path) 56 | path =~ %r{^[-a-z]+://|^cid:|^//} 57 | end 58 | 59 | def asset_url_for(source) 60 | url = url_for(source) 61 | return url if is_uri?(source) 62 | if settings.asset_timestamps 63 | timestamp = asset_timestamp(source) 64 | url += "?#{timestamp}" unless timestamp.empty? 65 | end 66 | return url 67 | end 68 | 69 | def asset_timestamp(source) 70 | if timestamp = @@asset_timestamps_cache[source] 71 | return timestamp 72 | else 73 | path = asset_file_path(source) 74 | timestamp = File.exists?(path) ? File.mtime(path).to_i.to_s : '' 75 | @@asset_mutex.synchronize { 76 | @@asset_timestamps_cache[source] = timestamp 77 | } 78 | end 79 | end 80 | 81 | def asset_file_path(path) 82 | File.join(settings.root, 'public', path) 83 | end 84 | 85 | def tag(name, local_options = {}) 86 | start_tag = "<#{name}#{tag_options(local_options) if local_options}" 87 | if block_given? 88 | content = yield 89 | "#{start_tag}>#{content}" 90 | else 91 | "#{start_tag}#{"/" if settings.xhtml}>" 92 | end 93 | end 94 | 95 | def tag_options(options) 96 | unless options.empty? 97 | attrs = [] 98 | #attrs = options.map { |key, value| %(#{key}="#{Rack::Utils.escape_html(value)}") } 99 | attrs = options.map { |key, value| %(#{key}="#{value}") } 100 | " #{attrs.sort * ' '}" unless attrs.empty? 101 | end 102 | end 103 | 104 | def stylesheet_tag(source, options = {}) 105 | tag("link", { :type => "text/css", 106 | :charset => "utf-8", :media => "screen", :rel => "stylesheet", 107 | :href => asset_url_for(source) }.merge(options)) 108 | end 109 | 110 | def javascript_tag(source, options = {}) 111 | tag("script", { :type => "text/javascript", :charset => "utf-8", 112 | :src => asset_url_for(source) }.merge(options)) do 113 | end 114 | end 115 | 116 | def extract_options(a) 117 | opts = a.last.is_a?(::Hash) ? a.pop : {} 118 | [a, opts] 119 | end 120 | 121 | end 122 | 123 | def self.registered(app) 124 | app.helpers StaticAssets::Helpers 125 | app.disable :xhtml 126 | end 127 | end 128 | 129 | register StaticAssets 130 | end 131 | -------------------------------------------------------------------------------- /public/less/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 | cursor: pointer; 16 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 17 | border: 1px solid transparent; 18 | white-space: nowrap; 19 | .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); 20 | .user-select(none); 21 | 22 | &, 23 | &:active, 24 | &.active { 25 | &:focus { 26 | .tab-focus(); 27 | } 28 | } 29 | 30 | &:hover, 31 | &:focus { 32 | color: @btn-default-color; 33 | text-decoration: none; 34 | } 35 | 36 | &:active, 37 | &.active { 38 | outline: 0; 39 | background-image: none; 40 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 41 | } 42 | 43 | &.disabled, 44 | &[disabled], 45 | fieldset[disabled] & { 46 | cursor: not-allowed; 47 | pointer-events: none; // Future-proof disabling of clicks 48 | .opacity(.65); 49 | .box-shadow(none); 50 | } 51 | } 52 | 53 | 54 | // Alternate buttons 55 | // -------------------------------------------------- 56 | 57 | .btn-default { 58 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); 59 | } 60 | .btn-primary { 61 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); 62 | } 63 | // Success appears as green 64 | .btn-success { 65 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); 66 | } 67 | // Info appears as blue-green 68 | .btn-info { 69 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); 70 | } 71 | // Warning appears as orange 72 | .btn-warning { 73 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); 74 | } 75 | // Danger and error appear as red 76 | .btn-danger { 77 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); 78 | } 79 | 80 | 81 | // Link buttons 82 | // ------------------------- 83 | 84 | // Make a button look and behave like a link 85 | .btn-link { 86 | color: @link-color; 87 | font-weight: normal; 88 | cursor: pointer; 89 | border-radius: 0; 90 | 91 | &, 92 | &:active, 93 | &[disabled], 94 | fieldset[disabled] & { 95 | background-color: transparent; 96 | .box-shadow(none); 97 | } 98 | &, 99 | &:hover, 100 | &:focus, 101 | &:active { 102 | border-color: transparent; 103 | } 104 | &:hover, 105 | &:focus { 106 | color: @link-hover-color; 107 | text-decoration: underline; 108 | background-color: transparent; 109 | } 110 | &[disabled], 111 | fieldset[disabled] & { 112 | &:hover, 113 | &:focus { 114 | color: @btn-link-disabled-color; 115 | text-decoration: none; 116 | } 117 | } 118 | } 119 | 120 | 121 | // Button Sizes 122 | // -------------------------------------------------- 123 | 124 | .btn-lg { 125 | // line-height: ensure even-numbered height of button next to large input 126 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 127 | } 128 | .btn-sm { 129 | // line-height: ensure proper height of button next to small input 130 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 131 | } 132 | .btn-xs { 133 | .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); 134 | } 135 | 136 | 137 | // Block button 138 | // -------------------------------------------------- 139 | 140 | .btn-block { 141 | display: block; 142 | width: 100%; 143 | padding-left: 0; 144 | padding-right: 0; 145 | } 146 | 147 | // Vertically space out multiple block buttons 148 | .btn-block + .btn-block { 149 | margin-top: 5px; 150 | } 151 | 152 | // Specificity overrides 153 | input[type="submit"], 154 | input[type="reset"], 155 | input[type="button"] { 156 | &.btn-block { 157 | width: 100%; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /public/less/bootstrap/tables.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tables 3 | // -------------------------------------------------- 4 | 5 | 6 | table { 7 | max-width: 100%; 8 | background-color: @table-bg; 9 | } 10 | th { 11 | text-align: left; 12 | } 13 | 14 | 15 | // Baseline styles 16 | 17 | .table { 18 | width: 100%; 19 | margin-bottom: @line-height-computed; 20 | // Cells 21 | > thead, 22 | > tbody, 23 | > tfoot { 24 | > tr { 25 | > th, 26 | > td { 27 | padding: @table-cell-padding; 28 | line-height: @line-height-base; 29 | vertical-align: top; 30 | border-top: 1px solid @table-border-color; 31 | } 32 | } 33 | } 34 | // Bottom align for column headings 35 | > thead > tr > th { 36 | vertical-align: bottom; 37 | border-bottom: 2px solid @table-border-color; 38 | } 39 | // Remove top border from thead by default 40 | > caption + thead, 41 | > colgroup + thead, 42 | > thead:first-child { 43 | > tr:first-child { 44 | > th, 45 | > td { 46 | border-top: 0; 47 | } 48 | } 49 | } 50 | // Account for multiple tbody instances 51 | > tbody + tbody { 52 | border-top: 2px solid @table-border-color; 53 | } 54 | 55 | // Nesting 56 | .table { 57 | background-color: @body-bg; 58 | } 59 | } 60 | 61 | 62 | // Condensed table w/ half padding 63 | 64 | .table-condensed { 65 | > thead, 66 | > tbody, 67 | > tfoot { 68 | > tr { 69 | > th, 70 | > td { 71 | padding: @table-condensed-cell-padding; 72 | } 73 | } 74 | } 75 | } 76 | 77 | 78 | // Bordered version 79 | // 80 | // Add borders all around the table and between all the columns. 81 | 82 | .table-bordered { 83 | border: 1px solid @table-border-color; 84 | > thead, 85 | > tbody, 86 | > tfoot { 87 | > tr { 88 | > th, 89 | > td { 90 | border: 1px solid @table-border-color; 91 | } 92 | } 93 | } 94 | > thead > tr { 95 | > th, 96 | > td { 97 | border-bottom-width: 2px; 98 | } 99 | } 100 | } 101 | 102 | 103 | // Zebra-striping 104 | // 105 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 106 | 107 | .table-striped { 108 | > tbody > tr:nth-child(odd) { 109 | > td, 110 | > th { 111 | background-color: @table-bg-accent; 112 | } 113 | } 114 | } 115 | 116 | 117 | // Hover effect 118 | // 119 | // Placed here since it has to come after the potential zebra striping 120 | 121 | .table-hover { 122 | > tbody > tr:hover { 123 | > td, 124 | > th { 125 | background-color: @table-bg-hover; 126 | } 127 | } 128 | } 129 | 130 | 131 | // Table cell sizing 132 | // 133 | // Reset default table behavior 134 | 135 | table col[class*="col-"] { 136 | position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) 137 | float: none; 138 | display: table-column; 139 | } 140 | table { 141 | td, 142 | th { 143 | &[class*="col-"] { 144 | position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) 145 | float: none; 146 | display: table-cell; 147 | } 148 | } 149 | } 150 | 151 | 152 | // Table backgrounds 153 | // 154 | // Exact selectors below required to override `.table-striped` and prevent 155 | // inheritance to nested tables. 156 | 157 | // Generate the contextual variants 158 | .table-row-variant(active; @table-bg-active); 159 | .table-row-variant(success; @state-success-bg); 160 | .table-row-variant(info; @state-info-bg); 161 | .table-row-variant(warning; @state-warning-bg); 162 | .table-row-variant(danger; @state-danger-bg); 163 | 164 | 165 | // Responsive tables 166 | // 167 | // Wrap your tables in `.table-responsive` and we'll make them mobile friendly 168 | // by enabling horizontal scrolling. Only applies <768px. Everything above that 169 | // will display normally. 170 | 171 | @media (max-width: @screen-xs-max) { 172 | .table-responsive { 173 | width: 100%; 174 | margin-bottom: (@line-height-computed * 0.75); 175 | overflow-y: hidden; 176 | overflow-x: scroll; 177 | -ms-overflow-style: -ms-autohiding-scrollbar; 178 | border: 1px solid @table-border-color; 179 | -webkit-overflow-scrolling: touch; 180 | 181 | // Tighten up spacing 182 | > .table { 183 | margin-bottom: 0; 184 | 185 | // Ensure the content doesn't wrap 186 | > thead, 187 | > tbody, 188 | > tfoot { 189 | > tr { 190 | > th, 191 | > td { 192 | white-space: nowrap; 193 | } 194 | } 195 | } 196 | } 197 | 198 | // Special overrides for the bordered tables 199 | > .table-bordered { 200 | border: 0; 201 | 202 | // Nuke the appropriate borders so that the parent can handle them 203 | > thead, 204 | > tbody, 205 | > tfoot { 206 | > tr { 207 | > th:first-child, 208 | > td:first-child { 209 | border-left: 0; 210 | } 211 | > th:last-child, 212 | > td:last-child { 213 | border-right: 0; 214 | } 215 | } 216 | } 217 | 218 | // Only nuke the last row's bottom-border in `tbody` and `tfoot` since 219 | // chances are there will be only one `tr` in a `thead` and that would 220 | // remove the border altogether. 221 | > tbody, 222 | > tfoot { 223 | > tr:last-child { 224 | > th, 225 | > td { 226 | border-bottom: 0; 227 | } 228 | } 229 | } 230 | 231 | } 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /public/less/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 solid; 14 | border-right: @caret-width-base solid transparent; 15 | border-left: @caret-width-base solid transparent; 16 | } 17 | 18 | // The dropdown wrapper (div) 19 | .dropdown { 20 | position: relative; 21 | } 22 | 23 | // Prevent the focus on the dropdown toggle when closing dropdowns 24 | .dropdown-toggle:focus { 25 | outline: 0; 26 | } 27 | 28 | // The dropdown menu (ul) 29 | .dropdown-menu { 30 | position: absolute; 31 | top: 100%; 32 | left: 0; 33 | z-index: @zindex-dropdown; 34 | display: none; // none by default, but block on "open" of the menu 35 | float: left; 36 | min-width: 160px; 37 | padding: 5px 0; 38 | margin: 2px 0 0; // override default ul 39 | list-style: none; 40 | font-size: @font-size-base; 41 | background-color: @dropdown-bg; 42 | border: 1px solid @dropdown-fallback-border; // IE8 fallback 43 | border: 1px solid @dropdown-border; 44 | border-radius: @border-radius-base; 45 | .box-shadow(0 6px 12px rgba(0,0,0,.175)); 46 | background-clip: padding-box; 47 | 48 | // Aligns the dropdown menu to right 49 | // 50 | // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` 51 | &.pull-right { 52 | right: 0; 53 | left: auto; 54 | } 55 | 56 | // Dividers (basically an hr) within the dropdown 57 | .divider { 58 | .nav-divider(@dropdown-divider-bg); 59 | } 60 | 61 | // Links within the dropdown menu 62 | > li > a { 63 | display: block; 64 | padding: 3px 20px; 65 | clear: both; 66 | font-weight: normal; 67 | line-height: @line-height-base; 68 | color: @dropdown-link-color; 69 | white-space: nowrap; // prevent links from randomly breaking onto new lines 70 | } 71 | } 72 | 73 | // Hover/Focus state 74 | .dropdown-menu > li > a { 75 | &:hover, 76 | &:focus { 77 | text-decoration: none; 78 | color: @dropdown-link-hover-color; 79 | background-color: @dropdown-link-hover-bg; 80 | } 81 | } 82 | 83 | // Active state 84 | .dropdown-menu > .active > a { 85 | &, 86 | &:hover, 87 | &:focus { 88 | color: @dropdown-link-active-color; 89 | text-decoration: none; 90 | outline: 0; 91 | background-color: @dropdown-link-active-bg; 92 | } 93 | } 94 | 95 | // Disabled state 96 | // 97 | // Gray out text and ensure the hover/focus state remains gray 98 | 99 | .dropdown-menu > .disabled > a { 100 | &, 101 | &:hover, 102 | &:focus { 103 | color: @dropdown-link-disabled-color; 104 | } 105 | } 106 | // Nuke hover/focus effects 107 | .dropdown-menu > .disabled > a { 108 | &:hover, 109 | &:focus { 110 | text-decoration: none; 111 | background-color: transparent; 112 | background-image: none; // Remove CSS gradient 113 | .reset-filter(); 114 | cursor: not-allowed; 115 | } 116 | } 117 | 118 | // Open state for the dropdown 119 | .open { 120 | // Show the menu 121 | > .dropdown-menu { 122 | display: block; 123 | } 124 | 125 | // Remove the outline when :focus is triggered 126 | > a { 127 | outline: 0; 128 | } 129 | } 130 | 131 | // Menu positioning 132 | // 133 | // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown 134 | // menu with the parent. 135 | .dropdown-menu-right { 136 | left: auto; // Reset the default from `.dropdown-menu` 137 | right: 0; 138 | } 139 | // With v3, we enabled auto-flipping if you have a dropdown within a right 140 | // aligned nav component. To enable the undoing of that, we provide an override 141 | // to restore the default dropdown menu alignment. 142 | // 143 | // This is only for left-aligning a dropdown menu within a `.navbar-right` or 144 | // `.pull-right` nav component. 145 | .dropdown-menu-left { 146 | left: 0; 147 | right: auto; 148 | } 149 | 150 | // Dropdown section headers 151 | .dropdown-header { 152 | display: block; 153 | padding: 3px 20px; 154 | font-size: @font-size-small; 155 | line-height: @line-height-base; 156 | color: @dropdown-header-color; 157 | } 158 | 159 | // Backdrop to catch body clicks on mobile, etc. 160 | .dropdown-backdrop { 161 | position: fixed; 162 | left: 0; 163 | right: 0; 164 | bottom: 0; 165 | top: 0; 166 | z-index: (@zindex-dropdown - 10); 167 | } 168 | 169 | // Right aligned dropdowns 170 | .pull-right > .dropdown-menu { 171 | right: 0; 172 | left: auto; 173 | } 174 | 175 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 176 | // 177 | // Just add .dropup after the standard .dropdown class and you're set, bro. 178 | // TODO: abstract this so that the navbar fixed styles are not placed here? 179 | 180 | .dropup, 181 | .navbar-fixed-bottom .dropdown { 182 | // Reverse the caret 183 | .caret { 184 | border-top: 0; 185 | border-bottom: @caret-width-base solid; 186 | content: ""; 187 | } 188 | // Different positioning for bottom up menu 189 | .dropdown-menu { 190 | top: auto; 191 | bottom: 100%; 192 | margin-bottom: 1px; 193 | } 194 | } 195 | 196 | 197 | // Component alignment 198 | // 199 | // Reiterate per navbar.less and the modified component alignment there. 200 | 201 | @media (min-width: @grid-float-breakpoint) { 202 | .navbar-right { 203 | .dropdown-menu { 204 | .dropdown-menu-right(); 205 | } 206 | // Necessary for overrides of the default right aligned menu. 207 | // Will remove come v4 in all likelihood. 208 | .dropdown-menu-left { 209 | .dropdown-menu-left(); 210 | } 211 | } 212 | } 213 | 214 | -------------------------------------------------------------------------------- /public/less/bootstrap/carousel.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | // Wrapper for the slide container and indicators 7 | .carousel { 8 | position: relative; 9 | } 10 | 11 | .carousel-inner { 12 | position: relative; 13 | overflow: hidden; 14 | width: 100%; 15 | 16 | > .item { 17 | display: none; 18 | position: relative; 19 | .transition(.6s ease-in-out left); 20 | 21 | // Account for jankitude on images 22 | > img, 23 | > a > img { 24 | &:extend(.img-responsive); 25 | line-height: 1; 26 | } 27 | } 28 | 29 | > .active, 30 | > .next, 31 | > .prev { display: block; } 32 | 33 | > .active { 34 | left: 0; 35 | } 36 | 37 | > .next, 38 | > .prev { 39 | position: absolute; 40 | top: 0; 41 | width: 100%; 42 | } 43 | 44 | > .next { 45 | left: 100%; 46 | } 47 | > .prev { 48 | left: -100%; 49 | } 50 | > .next.left, 51 | > .prev.right { 52 | left: 0; 53 | } 54 | 55 | > .active.left { 56 | left: -100%; 57 | } 58 | > .active.right { 59 | left: 100%; 60 | } 61 | 62 | } 63 | 64 | // Left/right controls for nav 65 | // --------------------------- 66 | 67 | .carousel-control { 68 | position: absolute; 69 | top: 0; 70 | left: 0; 71 | bottom: 0; 72 | width: @carousel-control-width; 73 | .opacity(@carousel-control-opacity); 74 | font-size: @carousel-control-font-size; 75 | color: @carousel-control-color; 76 | text-align: center; 77 | text-shadow: @carousel-text-shadow; 78 | // We can't have this transition here because WebKit cancels the carousel 79 | // animation if you trip this while in the middle of another animation. 80 | 81 | // Set gradients for backgrounds 82 | &.left { 83 | #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); 84 | } 85 | &.right { 86 | left: auto; 87 | right: 0; 88 | #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); 89 | } 90 | 91 | // Hover/focus state 92 | &:hover, 93 | &:focus { 94 | outline: none; 95 | color: @carousel-control-color; 96 | text-decoration: none; 97 | .opacity(.9); 98 | } 99 | 100 | // Toggles 101 | .icon-prev, 102 | .icon-next, 103 | .glyphicon-chevron-left, 104 | .glyphicon-chevron-right { 105 | position: absolute; 106 | top: 50%; 107 | z-index: 5; 108 | display: inline-block; 109 | } 110 | .icon-prev, 111 | .glyphicon-chevron-left { 112 | left: 50%; 113 | } 114 | .icon-next, 115 | .glyphicon-chevron-right { 116 | right: 50%; 117 | } 118 | .icon-prev, 119 | .icon-next { 120 | width: 20px; 121 | height: 20px; 122 | margin-top: -10px; 123 | margin-left: -10px; 124 | font-family: serif; 125 | } 126 | 127 | .icon-prev { 128 | &:before { 129 | content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) 130 | } 131 | } 132 | .icon-next { 133 | &:before { 134 | content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) 135 | } 136 | } 137 | } 138 | 139 | // Optional indicator pips 140 | // 141 | // Add an unordered list with the following class and add a list item for each 142 | // slide your carousel holds. 143 | 144 | .carousel-indicators { 145 | position: absolute; 146 | bottom: 10px; 147 | left: 50%; 148 | z-index: 15; 149 | width: 60%; 150 | margin-left: -30%; 151 | padding-left: 0; 152 | list-style: none; 153 | text-align: center; 154 | 155 | li { 156 | display: inline-block; 157 | width: 10px; 158 | height: 10px; 159 | margin: 1px; 160 | text-indent: -999px; 161 | border: 1px solid @carousel-indicator-border-color; 162 | border-radius: 10px; 163 | cursor: pointer; 164 | 165 | // IE8-9 hack for event handling 166 | // 167 | // Internet Explorer 8-9 does not support clicks on elements without a set 168 | // `background-color`. We cannot use `filter` since that's not viewed as a 169 | // background color by the browser. Thus, a hack is needed. 170 | // 171 | // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we 172 | // set alpha transparency for the best results possible. 173 | background-color: #000 \9; // IE8 174 | background-color: rgba(0,0,0,0); // IE9 175 | } 176 | .active { 177 | margin: 0; 178 | width: 12px; 179 | height: 12px; 180 | background-color: @carousel-indicator-active-bg; 181 | } 182 | } 183 | 184 | // Optional captions 185 | // ----------------------------- 186 | // Hidden by default for smaller viewports 187 | .carousel-caption { 188 | position: absolute; 189 | left: 15%; 190 | right: 15%; 191 | bottom: 20px; 192 | z-index: 10; 193 | padding-top: 20px; 194 | padding-bottom: 20px; 195 | color: @carousel-caption-color; 196 | text-align: center; 197 | text-shadow: @carousel-text-shadow; 198 | & .btn { 199 | text-shadow: none; // No shadow for button elements in carousel-caption 200 | } 201 | } 202 | 203 | 204 | // Scale up controls for tablets and up 205 | @media screen and (min-width: @screen-sm-min) { 206 | 207 | // Scale up the controls a smidge 208 | .carousel-control { 209 | .glyphicon-chevron-left, 210 | .glyphicon-chevron-right, 211 | .icon-prev, 212 | .icon-next { 213 | width: 30px; 214 | height: 30px; 215 | margin-top: -15px; 216 | margin-left: -15px; 217 | font-size: 30px; 218 | } 219 | } 220 | 221 | // Show and left align the captions 222 | .carousel-caption { 223 | left: 20%; 224 | right: 20%; 225 | padding-bottom: 30px; 226 | } 227 | 228 | // Move up the indicators 229 | .carousel-indicators { 230 | bottom: 20px; 231 | } 232 | } 233 | -------------------------------------------------------------------------------- /public/less/bootstrap/button-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Button groups 3 | // -------------------------------------------------- 4 | 5 | // Make the div behave like a button 6 | .btn-group, 7 | .btn-group-vertical { 8 | position: relative; 9 | display: inline-block; 10 | vertical-align: middle; // match .btn alignment given font-size hack above 11 | > .btn { 12 | position: relative; 13 | float: left; 14 | // Bring the "active" button to the front 15 | &:hover, 16 | &:focus, 17 | &:active, 18 | &.active { 19 | z-index: 2; 20 | } 21 | &:focus { 22 | // Remove focus outline when dropdown JS adds it after closing the menu 23 | outline: none; 24 | } 25 | } 26 | } 27 | 28 | // Prevent double borders when buttons are next to each other 29 | .btn-group { 30 | .btn + .btn, 31 | .btn + .btn-group, 32 | .btn-group + .btn, 33 | .btn-group + .btn-group { 34 | margin-left: -1px; 35 | } 36 | } 37 | 38 | // Optional: Group multiple button groups together for a toolbar 39 | .btn-toolbar { 40 | margin-left: -5px; // Offset the first child's margin 41 | &:extend(.clearfix all); 42 | 43 | .btn-group, 44 | .input-group { 45 | float: left; 46 | } 47 | > .btn, 48 | > .btn-group, 49 | > .input-group { 50 | margin-left: 5px; 51 | } 52 | } 53 | 54 | .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { 55 | border-radius: 0; 56 | } 57 | 58 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match 59 | .btn-group > .btn:first-child { 60 | margin-left: 0; 61 | &:not(:last-child):not(.dropdown-toggle) { 62 | .border-right-radius(0); 63 | } 64 | } 65 | // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it 66 | .btn-group > .btn:last-child:not(:first-child), 67 | .btn-group > .dropdown-toggle:not(:first-child) { 68 | .border-left-radius(0); 69 | } 70 | 71 | // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) 72 | .btn-group > .btn-group { 73 | float: left; 74 | } 75 | .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { 76 | border-radius: 0; 77 | } 78 | .btn-group > .btn-group:first-child { 79 | > .btn:last-child, 80 | > .dropdown-toggle { 81 | .border-right-radius(0); 82 | } 83 | } 84 | .btn-group > .btn-group:last-child > .btn:first-child { 85 | .border-left-radius(0); 86 | } 87 | 88 | // On active and open, don't show outline 89 | .btn-group .dropdown-toggle:active, 90 | .btn-group.open .dropdown-toggle { 91 | outline: 0; 92 | } 93 | 94 | 95 | // Sizing 96 | // 97 | // Remix the default button sizing classes into new ones for easier manipulation. 98 | 99 | .btn-group-xs > .btn { &:extend(.btn-xs); } 100 | .btn-group-sm > .btn { &:extend(.btn-sm); } 101 | .btn-group-lg > .btn { &:extend(.btn-lg); } 102 | 103 | 104 | // Split button dropdowns 105 | // ---------------------- 106 | 107 | // Give the line between buttons some depth 108 | .btn-group > .btn + .dropdown-toggle { 109 | padding-left: 8px; 110 | padding-right: 8px; 111 | } 112 | .btn-group > .btn-lg + .dropdown-toggle { 113 | padding-left: 12px; 114 | padding-right: 12px; 115 | } 116 | 117 | // The clickable button for toggling the menu 118 | // Remove the gradient and set the same inset shadow as the :active state 119 | .btn-group.open .dropdown-toggle { 120 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 121 | 122 | // Show no shadow for `.btn-link` since it has no other button styles. 123 | &.btn-link { 124 | .box-shadow(none); 125 | } 126 | } 127 | 128 | 129 | // Reposition the caret 130 | .btn .caret { 131 | margin-left: 0; 132 | } 133 | // Carets in other button sizes 134 | .btn-lg .caret { 135 | border-width: @caret-width-large @caret-width-large 0; 136 | border-bottom-width: 0; 137 | } 138 | // Upside down carets for .dropup 139 | .dropup .btn-lg .caret { 140 | border-width: 0 @caret-width-large @caret-width-large; 141 | } 142 | 143 | 144 | // Vertical button groups 145 | // ---------------------- 146 | 147 | .btn-group-vertical { 148 | > .btn, 149 | > .btn-group, 150 | > .btn-group > .btn { 151 | display: block; 152 | float: none; 153 | width: 100%; 154 | max-width: 100%; 155 | } 156 | 157 | // Clear floats so dropdown menus can be properly placed 158 | > .btn-group { 159 | &:extend(.clearfix all); 160 | > .btn { 161 | float: none; 162 | } 163 | } 164 | 165 | > .btn + .btn, 166 | > .btn + .btn-group, 167 | > .btn-group + .btn, 168 | > .btn-group + .btn-group { 169 | margin-top: -1px; 170 | margin-left: 0; 171 | } 172 | } 173 | 174 | .btn-group-vertical > .btn { 175 | &:not(:first-child):not(:last-child) { 176 | border-radius: 0; 177 | } 178 | &:first-child:not(:last-child) { 179 | border-top-right-radius: @border-radius-base; 180 | .border-bottom-radius(0); 181 | } 182 | &:last-child:not(:first-child) { 183 | border-bottom-left-radius: @border-radius-base; 184 | .border-top-radius(0); 185 | } 186 | } 187 | .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { 188 | border-radius: 0; 189 | } 190 | .btn-group-vertical > .btn-group:first-child:not(:last-child) { 191 | > .btn:last-child, 192 | > .dropdown-toggle { 193 | .border-bottom-radius(0); 194 | } 195 | } 196 | .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { 197 | .border-top-radius(0); 198 | } 199 | 200 | 201 | 202 | // Justified button groups 203 | // ---------------------- 204 | 205 | .btn-group-justified { 206 | display: table; 207 | width: 100%; 208 | table-layout: fixed; 209 | border-collapse: separate; 210 | > .btn, 211 | > .btn-group { 212 | float: none; 213 | display: table-cell; 214 | width: 1%; 215 | } 216 | > .btn-group .btn { 217 | width: 100%; 218 | } 219 | } 220 | 221 | 222 | // Checkbox and radio options 223 | [data-toggle="buttons"] > .btn > input[type="radio"], 224 | [data-toggle="buttons"] > .btn > input[type="checkbox"] { 225 | display: none; 226 | } 227 | -------------------------------------------------------------------------------- /public/less/bootstrap/navs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Navs 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // -------------------------------------------------- 8 | 9 | .nav { 10 | margin-bottom: 0; 11 | padding-left: 0; // Override default ul/ol 12 | list-style: none; 13 | &:extend(.clearfix all); 14 | 15 | > li { 16 | position: relative; 17 | display: block; 18 | 19 | > a { 20 | position: relative; 21 | display: block; 22 | padding: @nav-link-padding; 23 | &:hover, 24 | &:focus { 25 | text-decoration: none; 26 | background-color: @nav-link-hover-bg; 27 | } 28 | } 29 | 30 | // Disabled state sets text to gray and nukes hover/tab effects 31 | &.disabled > a { 32 | color: @nav-disabled-link-color; 33 | 34 | &:hover, 35 | &:focus { 36 | color: @nav-disabled-link-hover-color; 37 | text-decoration: none; 38 | background-color: transparent; 39 | cursor: not-allowed; 40 | } 41 | } 42 | } 43 | 44 | // Open dropdowns 45 | .open > a { 46 | &, 47 | &:hover, 48 | &:focus { 49 | background-color: @nav-link-hover-bg; 50 | border-color: @link-color; 51 | } 52 | } 53 | 54 | // Nav dividers (deprecated with v3.0.1) 55 | // 56 | // This should have been removed in v3 with the dropping of `.nav-list`, but 57 | // we missed it. We don't currently support this anywhere, but in the interest 58 | // of maintaining backward compatibility in case you use it, it's deprecated. 59 | .nav-divider { 60 | .nav-divider(); 61 | } 62 | 63 | // Prevent IE8 from misplacing imgs 64 | // 65 | // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 66 | > li > a > img { 67 | max-width: none; 68 | } 69 | } 70 | 71 | 72 | // Tabs 73 | // ------------------------- 74 | 75 | // Give the tabs something to sit on 76 | .nav-tabs { 77 | border-bottom: 1px solid @nav-tabs-border-color; 78 | > li { 79 | float: left; 80 | // Make the list-items overlay the bottom border 81 | margin-bottom: -1px; 82 | 83 | // Actual tabs (as links) 84 | > a { 85 | margin-right: 2px; 86 | line-height: @line-height-base; 87 | border: 1px solid transparent; 88 | border-radius: @border-radius-base @border-radius-base 0 0; 89 | &:hover { 90 | border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; 91 | } 92 | } 93 | 94 | // Active state, and its :hover to override normal :hover 95 | &.active > a { 96 | &, 97 | &:hover, 98 | &:focus { 99 | color: @nav-tabs-active-link-hover-color; 100 | background-color: @nav-tabs-active-link-hover-bg; 101 | border: 1px solid @nav-tabs-active-link-hover-border-color; 102 | border-bottom-color: transparent; 103 | cursor: default; 104 | } 105 | } 106 | } 107 | // pulling this in mainly for less shorthand 108 | &.nav-justified { 109 | .nav-justified(); 110 | .nav-tabs-justified(); 111 | } 112 | } 113 | 114 | 115 | // Pills 116 | // ------------------------- 117 | .nav-pills { 118 | > li { 119 | float: left; 120 | 121 | // Links rendered as pills 122 | > a { 123 | border-radius: @nav-pills-border-radius; 124 | } 125 | + li { 126 | margin-left: 2px; 127 | } 128 | 129 | // Active state 130 | &.active > a { 131 | &, 132 | &:hover, 133 | &:focus { 134 | color: @nav-pills-active-link-hover-color; 135 | background-color: @nav-pills-active-link-hover-bg; 136 | } 137 | } 138 | } 139 | } 140 | 141 | 142 | // Stacked pills 143 | .nav-stacked { 144 | > li { 145 | float: none; 146 | + li { 147 | margin-top: 2px; 148 | margin-left: 0; // no need for this gap between nav items 149 | } 150 | } 151 | } 152 | 153 | 154 | // Nav variations 155 | // -------------------------------------------------- 156 | 157 | // Justified nav links 158 | // ------------------------- 159 | 160 | .nav-justified { 161 | width: 100%; 162 | 163 | > li { 164 | float: none; 165 | > a { 166 | text-align: center; 167 | margin-bottom: 5px; 168 | } 169 | } 170 | 171 | > .dropdown .dropdown-menu { 172 | top: auto; 173 | left: auto; 174 | } 175 | 176 | @media (min-width: @screen-sm-min) { 177 | > li { 178 | display: table-cell; 179 | width: 1%; 180 | > a { 181 | margin-bottom: 0; 182 | } 183 | } 184 | } 185 | } 186 | 187 | // Move borders to anchors instead of bottom of list 188 | // 189 | // Mixin for adding on top the shared `.nav-justified` styles for our tabs 190 | .nav-tabs-justified { 191 | border-bottom: 0; 192 | 193 | > li > a { 194 | // Override margin from .nav-tabs 195 | margin-right: 0; 196 | border-radius: @border-radius-base; 197 | } 198 | 199 | > .active > a, 200 | > .active > a:hover, 201 | > .active > a:focus { 202 | border: 1px solid @nav-tabs-justified-link-border-color; 203 | } 204 | 205 | @media (min-width: @screen-sm-min) { 206 | > li > a { 207 | border-bottom: 1px solid @nav-tabs-justified-link-border-color; 208 | border-radius: @border-radius-base @border-radius-base 0 0; 209 | } 210 | > .active > a, 211 | > .active > a:hover, 212 | > .active > a:focus { 213 | border-bottom-color: @nav-tabs-justified-active-link-border-color; 214 | } 215 | } 216 | } 217 | 218 | 219 | // Tabbable tabs 220 | // ------------------------- 221 | 222 | // Hide tabbable panes to start, show them when `.active` 223 | .tab-content { 224 | > .tab-pane { 225 | display: none; 226 | } 227 | > .active { 228 | display: block; 229 | } 230 | } 231 | 232 | 233 | // Dropdowns 234 | // ------------------------- 235 | 236 | // Specific dropdowns 237 | .nav-tabs .dropdown-menu { 238 | // make dropdown border overlap tab border 239 | margin-top: -1px; 240 | // Remove the top rounded corners here since there is a hard edge above the menu 241 | .border-top-radius(0); 242 | } 243 | -------------------------------------------------------------------------------- /public/less/bootstrap/type.less: -------------------------------------------------------------------------------- 1 | // 2 | // Typography 3 | // -------------------------------------------------- 4 | 5 | 6 | // Headings 7 | // ------------------------- 8 | 9 | h1, h2, h3, h4, h5, h6, 10 | .h1, .h2, .h3, .h4, .h5, .h6 { 11 | font-family: @headings-font-family; 12 | font-weight: @headings-font-weight; 13 | line-height: @headings-line-height; 14 | color: @headings-color; 15 | 16 | small, 17 | .small { 18 | font-weight: normal; 19 | line-height: 1; 20 | color: @headings-small-color; 21 | } 22 | } 23 | 24 | h1, .h1, 25 | h2, .h2, 26 | h3, .h3 { 27 | margin-top: @line-height-computed; 28 | margin-bottom: (@line-height-computed / 2); 29 | 30 | small, 31 | .small { 32 | font-size: 65%; 33 | } 34 | } 35 | h4, .h4, 36 | h5, .h5, 37 | h6, .h6 { 38 | margin-top: (@line-height-computed / 2); 39 | margin-bottom: (@line-height-computed / 2); 40 | 41 | small, 42 | .small { 43 | font-size: 75%; 44 | } 45 | } 46 | 47 | h1, .h1 { font-size: @font-size-h1; } 48 | h2, .h2 { font-size: @font-size-h2; } 49 | h3, .h3 { font-size: @font-size-h3; } 50 | h4, .h4 { font-size: @font-size-h4; } 51 | h5, .h5 { font-size: @font-size-h5; } 52 | h6, .h6 { font-size: @font-size-h6; } 53 | 54 | 55 | // Body text 56 | // ------------------------- 57 | 58 | p { 59 | margin: 0 0 (@line-height-computed / 2); 60 | } 61 | 62 | .lead { 63 | margin-bottom: @line-height-computed; 64 | font-size: floor((@font-size-base * 1.15)); 65 | font-weight: 200; 66 | line-height: 1.4; 67 | 68 | @media (min-width: @screen-sm-min) { 69 | font-size: (@font-size-base * 1.5); 70 | } 71 | } 72 | 73 | 74 | // Emphasis & misc 75 | // ------------------------- 76 | 77 | // Ex: 14px base font * 85% = about 12px 78 | small, 79 | .small { font-size: 85%; } 80 | 81 | // Undo browser default styling 82 | cite { font-style: normal; } 83 | 84 | // Alignment 85 | .text-left { text-align: left; } 86 | .text-right { text-align: right; } 87 | .text-center { text-align: center; } 88 | .text-justify { text-align: justify; } 89 | 90 | // Contextual colors 91 | .text-muted { 92 | color: @text-muted; 93 | } 94 | .text-primary { 95 | .text-emphasis-variant(@brand-primary); 96 | } 97 | .text-success { 98 | .text-emphasis-variant(@state-success-text); 99 | } 100 | .text-info { 101 | .text-emphasis-variant(@state-info-text); 102 | } 103 | .text-warning { 104 | .text-emphasis-variant(@state-warning-text); 105 | } 106 | .text-danger { 107 | .text-emphasis-variant(@state-danger-text); 108 | } 109 | 110 | // Contextual backgrounds 111 | // For now we'll leave these alongside the text classes until v4 when we can 112 | // safely shift things around (per SemVer rules). 113 | .bg-primary { 114 | // Given the contrast here, this is the only class to have its color inverted 115 | // automatically. 116 | color: #fff; 117 | .bg-variant(@brand-primary); 118 | } 119 | .bg-success { 120 | .bg-variant(@state-success-bg); 121 | } 122 | .bg-info { 123 | .bg-variant(@state-info-bg); 124 | } 125 | .bg-warning { 126 | .bg-variant(@state-warning-bg); 127 | } 128 | .bg-danger { 129 | .bg-variant(@state-danger-bg); 130 | } 131 | 132 | 133 | // Page header 134 | // ------------------------- 135 | 136 | .page-header { 137 | padding-bottom: ((@line-height-computed / 2) - 1); 138 | margin: (@line-height-computed * 2) 0 @line-height-computed; 139 | border-bottom: 1px solid @page-header-border-color; 140 | } 141 | 142 | 143 | // Lists 144 | // -------------------------------------------------- 145 | 146 | // Unordered and Ordered lists 147 | ul, 148 | ol { 149 | margin-top: 0; 150 | margin-bottom: (@line-height-computed / 2); 151 | ul, 152 | ol { 153 | margin-bottom: 0; 154 | } 155 | } 156 | 157 | // List options 158 | 159 | // Unstyled keeps list items block level, just removes default browser padding and list-style 160 | .list-unstyled { 161 | padding-left: 0; 162 | list-style: none; 163 | } 164 | 165 | // Inline turns list items into inline-block 166 | .list-inline { 167 | .list-unstyled(); 168 | margin-left: -5px; 169 | 170 | > li { 171 | display: inline-block; 172 | padding-left: 5px; 173 | padding-right: 5px; 174 | } 175 | } 176 | 177 | // Description Lists 178 | dl { 179 | margin-top: 0; // Remove browser default 180 | margin-bottom: @line-height-computed; 181 | } 182 | dt, 183 | dd { 184 | line-height: @line-height-base; 185 | } 186 | dt { 187 | font-weight: bold; 188 | } 189 | dd { 190 | margin-left: 0; // Undo browser default 191 | } 192 | 193 | // Horizontal description lists 194 | // 195 | // Defaults to being stacked without any of the below styles applied, until the 196 | // grid breakpoint is reached (default of ~768px). 197 | 198 | @media (min-width: @grid-float-breakpoint) { 199 | .dl-horizontal { 200 | dt { 201 | float: left; 202 | width: (@component-offset-horizontal - 20); 203 | clear: left; 204 | text-align: right; 205 | .text-overflow(); 206 | } 207 | dd { 208 | margin-left: @component-offset-horizontal; 209 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present 210 | } 211 | } 212 | } 213 | 214 | // MISC 215 | // ---- 216 | 217 | // Abbreviations and acronyms 218 | abbr[title], 219 | // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257 220 | abbr[data-original-title] { 221 | cursor: help; 222 | border-bottom: 1px dotted @abbr-border-color; 223 | } 224 | .initialism { 225 | font-size: 90%; 226 | text-transform: uppercase; 227 | } 228 | 229 | // Blockquotes 230 | blockquote { 231 | padding: (@line-height-computed / 2) @line-height-computed; 232 | margin: 0 0 @line-height-computed; 233 | font-size: @blockquote-font-size; 234 | border-left: 5px solid @blockquote-border-color; 235 | 236 | p, 237 | ul, 238 | ol { 239 | &:last-child { 240 | margin-bottom: 0; 241 | } 242 | } 243 | 244 | // Note: Deprecated small and .small as of v3.1.0 245 | // Context: https://github.com/twbs/bootstrap/issues/11660 246 | footer, 247 | small, 248 | .small { 249 | display: block; 250 | font-size: 80%; // back to default font-size 251 | line-height: @line-height-base; 252 | color: @blockquote-small-color; 253 | 254 | &:before { 255 | content: '\2014 \00A0'; // em dash, nbsp 256 | } 257 | } 258 | } 259 | 260 | // Opposite alignment of blockquote 261 | // 262 | // Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0. 263 | .blockquote-reverse, 264 | blockquote.pull-right { 265 | padding-right: 15px; 266 | padding-left: 0; 267 | border-right: 5px solid @blockquote-border-color; 268 | border-left: 0; 269 | text-align: right; 270 | 271 | // Account for citation 272 | footer, 273 | small, 274 | .small { 275 | &:before { content: ''; } 276 | &:after { 277 | content: '\00A0 \2014'; // nbsp, em dash 278 | } 279 | } 280 | } 281 | 282 | // Quotes 283 | blockquote:before, 284 | blockquote:after { 285 | content: ""; 286 | } 287 | 288 | // Addresses 289 | address { 290 | margin-bottom: @line-height-computed; 291 | font-style: normal; 292 | line-height: @line-height-base; 293 | } 294 | -------------------------------------------------------------------------------- /public/less/bootstrap/forms.less: -------------------------------------------------------------------------------- 1 | // 2 | // Forms 3 | // -------------------------------------------------- 4 | 5 | 6 | // Normalize non-controls 7 | // 8 | // Restyle and baseline non-control form elements. 9 | 10 | fieldset { 11 | padding: 0; 12 | margin: 0; 13 | border: 0; 14 | // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets, 15 | // so we reset that to ensure it behaves more like a standard block element. 16 | // See https://github.com/twbs/bootstrap/issues/12359. 17 | min-width: 0; 18 | } 19 | 20 | legend { 21 | display: block; 22 | width: 100%; 23 | padding: 0; 24 | margin-bottom: @line-height-computed; 25 | font-size: (@font-size-base * 1.5); 26 | line-height: inherit; 27 | color: @legend-color; 28 | border: 0; 29 | border-bottom: 1px solid @legend-border-color; 30 | } 31 | 32 | label { 33 | display: inline-block; 34 | margin-bottom: 5px; 35 | font-weight: bold; 36 | } 37 | 38 | 39 | // Normalize form controls 40 | // 41 | // While most of our form styles require extra classes, some basic normalization 42 | // is required to ensure optimum display with or without those classes to better 43 | // address browser inconsistencies. 44 | 45 | // Override content-box in Normalize (* isn't specific enough) 46 | input[type="search"] { 47 | .box-sizing(border-box); 48 | } 49 | 50 | // Position radios and checkboxes better 51 | input[type="radio"], 52 | input[type="checkbox"] { 53 | margin: 4px 0 0; 54 | margin-top: 1px \9; /* IE8-9 */ 55 | line-height: normal; 56 | } 57 | 58 | // Set the height of file controls to match text inputs 59 | input[type="file"] { 60 | display: block; 61 | } 62 | 63 | // Make range inputs behave like textual form controls 64 | input[type="range"] { 65 | display: block; 66 | width: 100%; 67 | } 68 | 69 | // Make multiple select elements height not fixed 70 | select[multiple], 71 | select[size] { 72 | height: auto; 73 | } 74 | 75 | // Focus for file, radio, and checkbox 76 | input[type="file"]:focus, 77 | input[type="radio"]:focus, 78 | input[type="checkbox"]:focus { 79 | .tab-focus(); 80 | } 81 | 82 | // Adjust output element 83 | output { 84 | display: block; 85 | padding-top: (@padding-base-vertical + 1); 86 | font-size: @font-size-base; 87 | line-height: @line-height-base; 88 | color: @input-color; 89 | } 90 | 91 | 92 | // Common form controls 93 | // 94 | // Shared size and type resets for form controls. Apply `.form-control` to any 95 | // of the following form controls: 96 | // 97 | // select 98 | // textarea 99 | // input[type="text"] 100 | // input[type="password"] 101 | // input[type="datetime"] 102 | // input[type="datetime-local"] 103 | // input[type="date"] 104 | // input[type="month"] 105 | // input[type="time"] 106 | // input[type="week"] 107 | // input[type="number"] 108 | // input[type="email"] 109 | // input[type="url"] 110 | // input[type="search"] 111 | // input[type="tel"] 112 | // input[type="color"] 113 | 114 | .form-control { 115 | display: block; 116 | width: 100%; 117 | height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) 118 | padding: @padding-base-vertical @padding-base-horizontal; 119 | font-size: @font-size-base; 120 | line-height: @line-height-base; 121 | color: @input-color; 122 | background-color: @input-bg; 123 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 124 | border: 1px solid @input-border; 125 | border-radius: @input-border-radius; 126 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); 127 | .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); 128 | 129 | // Customize the `:focus` state to imitate native WebKit styles. 130 | .form-control-focus(); 131 | 132 | // Placeholder 133 | .placeholder(); 134 | 135 | // Disabled and read-only inputs 136 | // 137 | // HTML5 says that controls under a fieldset > legend:first-child won't be 138 | // disabled if the fieldset is disabled. Due to implementation difficulty, we 139 | // don't honor that edge case; we style them as disabled anyway. 140 | &[disabled], 141 | &[readonly], 142 | fieldset[disabled] & { 143 | cursor: not-allowed; 144 | background-color: @input-bg-disabled; 145 | opacity: 1; // iOS fix for unreadable disabled content 146 | } 147 | 148 | // Reset height for `textarea`s 149 | textarea& { 150 | height: auto; 151 | } 152 | } 153 | 154 | 155 | // Search inputs in iOS 156 | // 157 | // This overrides the extra rounded corners on search inputs in iOS so that our 158 | // `.form-control` class can properly style them. Note that this cannot simply 159 | // be added to `.form-control` as it's not specific enough. For details, see 160 | // https://github.com/twbs/bootstrap/issues/11586. 161 | 162 | input[type="search"] { 163 | -webkit-appearance: none; 164 | } 165 | 166 | 167 | // Special styles for iOS date input 168 | // 169 | // In Mobile Safari, date inputs require a pixel line-height that matches the 170 | // given height of the input. 171 | 172 | input[type="date"] { 173 | line-height: @input-height-base; 174 | } 175 | 176 | 177 | // Form groups 178 | // 179 | // Designed to help with the organization and spacing of vertical forms. For 180 | // horizontal forms, use the predefined grid classes. 181 | 182 | .form-group { 183 | margin-bottom: 15px; 184 | } 185 | 186 | 187 | // Checkboxes and radios 188 | // 189 | // Indent the labels to position radios/checkboxes as hanging controls. 190 | 191 | .radio, 192 | .checkbox { 193 | display: block; 194 | min-height: @line-height-computed; // clear the floating input if there is no label text 195 | margin-top: 10px; 196 | margin-bottom: 10px; 197 | padding-left: 20px; 198 | label { 199 | display: inline; 200 | font-weight: normal; 201 | cursor: pointer; 202 | } 203 | } 204 | .radio input[type="radio"], 205 | .radio-inline input[type="radio"], 206 | .checkbox input[type="checkbox"], 207 | .checkbox-inline input[type="checkbox"] { 208 | float: left; 209 | margin-left: -20px; 210 | } 211 | .radio + .radio, 212 | .checkbox + .checkbox { 213 | margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing 214 | } 215 | 216 | // Radios and checkboxes on same line 217 | .radio-inline, 218 | .checkbox-inline { 219 | display: inline-block; 220 | padding-left: 20px; 221 | margin-bottom: 0; 222 | vertical-align: middle; 223 | font-weight: normal; 224 | cursor: pointer; 225 | } 226 | .radio-inline + .radio-inline, 227 | .checkbox-inline + .checkbox-inline { 228 | margin-top: 0; 229 | margin-left: 10px; // space out consecutive inline controls 230 | } 231 | 232 | // Apply same disabled cursor tweak as for inputs 233 | // 234 | // Note: Neither radios nor checkboxes can be readonly. 235 | input[type="radio"], 236 | input[type="checkbox"], 237 | .radio, 238 | .radio-inline, 239 | .checkbox, 240 | .checkbox-inline { 241 | &[disabled], 242 | fieldset[disabled] & { 243 | cursor: not-allowed; 244 | } 245 | } 246 | 247 | 248 | // Form control sizing 249 | // 250 | // Build on `.form-control` with modifier classes to decrease or increase the 251 | // height and font-size of form controls. 252 | 253 | .input-sm { 254 | .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 255 | } 256 | 257 | .input-lg { 258 | .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 259 | } 260 | 261 | 262 | // Form control feedback states 263 | // 264 | // Apply contextual and semantic states to individual form controls. 265 | 266 | .has-feedback { 267 | // Enable absolute positioning 268 | position: relative; 269 | 270 | // Ensure icons don't overlap text 271 | .form-control { 272 | padding-right: (@input-height-base * 1.25); 273 | } 274 | 275 | // Feedback icon (requires .glyphicon classes) 276 | .form-control-feedback { 277 | position: absolute; 278 | top: (@line-height-computed + 5); // Height of the `label` and its margin 279 | right: 0; 280 | display: block; 281 | width: @input-height-base; 282 | height: @input-height-base; 283 | line-height: @input-height-base; 284 | text-align: center; 285 | } 286 | } 287 | 288 | // Feedback states 289 | .has-success { 290 | .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); 291 | } 292 | .has-warning { 293 | .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); 294 | } 295 | .has-error { 296 | .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); 297 | } 298 | 299 | 300 | // Static form control text 301 | // 302 | // Apply class to a `p` element to make any string of text align with labels in 303 | // a horizontal form layout. 304 | 305 | .form-control-static { 306 | margin-bottom: 0; // Remove default margin from `p` 307 | } 308 | 309 | 310 | // Help text 311 | // 312 | // Apply to any element you wish to create light text for placement immediately 313 | // below a form control. Use for general help, formatting, or instructional text. 314 | 315 | .help-block { 316 | display: block; // account for any element using help-block 317 | margin-top: 5px; 318 | margin-bottom: 10px; 319 | color: lighten(@text-color, 25%); // lighten the text some for contrast 320 | } 321 | 322 | 323 | 324 | // Inline forms 325 | // 326 | // Make forms appear inline(-block) by adding the `.form-inline` class. Inline 327 | // forms begin stacked on extra small (mobile) devices and then go inline when 328 | // viewports reach <768px. 329 | // 330 | // Requires wrapping inputs and labels with `.form-group` for proper display of 331 | // default HTML form controls and our custom form controls (e.g., input groups). 332 | // 333 | // Heads up! This is mixin-ed into `.navbar-form` in navbars.less. 334 | 335 | .form-inline { 336 | 337 | // Kick in the inline 338 | @media (min-width: @screen-sm-min) { 339 | // Inline-block all the things for "inline" 340 | .form-group { 341 | display: inline-block; 342 | margin-bottom: 0; 343 | vertical-align: middle; 344 | } 345 | 346 | // In navbar-form, allow folks to *not* use `.form-group` 347 | .form-control { 348 | display: inline-block; 349 | width: auto; // Prevent labels from stacking above inputs in `.form-group` 350 | vertical-align: middle; 351 | } 352 | // Input groups need that 100% width though 353 | .input-group > .form-control { 354 | width: 100%; 355 | } 356 | 357 | .control-label { 358 | margin-bottom: 0; 359 | vertical-align: middle; 360 | } 361 | 362 | // Remove default margin on radios/checkboxes that were used for stacking, and 363 | // then undo the floating of radios and checkboxes to match (which also avoids 364 | // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). 365 | .radio, 366 | .checkbox { 367 | display: inline-block; 368 | margin-top: 0; 369 | margin-bottom: 0; 370 | padding-left: 0; 371 | vertical-align: middle; 372 | } 373 | .radio input[type="radio"], 374 | .checkbox input[type="checkbox"] { 375 | float: none; 376 | margin-left: 0; 377 | } 378 | 379 | // Validation states 380 | // 381 | // Reposition the icon because it's now within a grid column and columns have 382 | // `position: relative;` on them. Also accounts for the grid gutter padding. 383 | .has-feedback .form-control-feedback { 384 | top: 0; 385 | } 386 | } 387 | } 388 | 389 | 390 | // Horizontal forms 391 | // 392 | // Horizontal forms are built on grid classes and allow you to create forms with 393 | // labels on the left and inputs on the right. 394 | 395 | .form-horizontal { 396 | 397 | // Consistent vertical alignment of labels, radios, and checkboxes 398 | .control-label, 399 | .radio, 400 | .checkbox, 401 | .radio-inline, 402 | .checkbox-inline { 403 | margin-top: 0; 404 | margin-bottom: 0; 405 | padding-top: (@padding-base-vertical + 1); // Default padding plus a border 406 | } 407 | // Account for padding we're adding to ensure the alignment and of help text 408 | // and other content below items 409 | .radio, 410 | .checkbox { 411 | min-height: (@line-height-computed + (@padding-base-vertical + 1)); 412 | } 413 | 414 | // Make form groups behave like rows 415 | .form-group { 416 | .make-row(); 417 | } 418 | 419 | .form-control-static { 420 | padding-top: (@padding-base-vertical + 1); 421 | } 422 | 423 | // Only right align form labels here when the columns stop stacking 424 | @media (min-width: @screen-sm-min) { 425 | .control-label { 426 | text-align: right; 427 | } 428 | } 429 | 430 | // Validation states 431 | // 432 | // Reposition the icon because it's now within a grid column and columns have 433 | // `position: relative;` on them. Also accounts for the grid gutter padding. 434 | .has-feedback .form-control-feedback { 435 | top: 0; 436 | right: (@grid-gutter-width / 2); 437 | } 438 | } 439 | -------------------------------------------------------------------------------- /public/js/libs/prettify/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p .navbar-header, 99 | > .navbar-collapse { 100 | margin-right: -@navbar-padding-horizontal; 101 | margin-left: -@navbar-padding-horizontal; 102 | 103 | @media (min-width: @grid-float-breakpoint) { 104 | margin-right: 0; 105 | margin-left: 0; 106 | } 107 | } 108 | } 109 | 110 | 111 | // 112 | // Navbar alignment options 113 | // 114 | // Display the navbar across the entirety of the page or fixed it to the top or 115 | // bottom of the page. 116 | 117 | // Static top (unfixed, but 100% wide) navbar 118 | .navbar-static-top { 119 | z-index: @zindex-navbar; 120 | border-width: 0 0 1px; 121 | 122 | @media (min-width: @grid-float-breakpoint) { 123 | border-radius: 0; 124 | } 125 | } 126 | 127 | // Fix the top/bottom navbars when screen real estate supports it 128 | .navbar-fixed-top, 129 | .navbar-fixed-bottom { 130 | position: fixed; 131 | right: 0; 132 | left: 0; 133 | z-index: @zindex-navbar-fixed; 134 | 135 | // Undo the rounded corners 136 | @media (min-width: @grid-float-breakpoint) { 137 | border-radius: 0; 138 | } 139 | } 140 | .navbar-fixed-top { 141 | top: 0; 142 | border-width: 0 0 1px; 143 | } 144 | .navbar-fixed-bottom { 145 | bottom: 0; 146 | margin-bottom: 0; // override .navbar defaults 147 | border-width: 1px 0 0; 148 | } 149 | 150 | 151 | // Brand/project name 152 | 153 | .navbar-brand { 154 | float: left; 155 | padding: @navbar-padding-vertical @navbar-padding-horizontal; 156 | font-size: @font-size-large; 157 | line-height: @line-height-computed; 158 | height: @navbar-height; 159 | 160 | &:hover, 161 | &:focus { 162 | text-decoration: none; 163 | } 164 | 165 | @media (min-width: @grid-float-breakpoint) { 166 | .navbar > .container &, 167 | .navbar > .container-fluid & { 168 | margin-left: -@navbar-padding-horizontal; 169 | } 170 | } 171 | } 172 | 173 | 174 | // Navbar toggle 175 | // 176 | // Custom button for toggling the `.navbar-collapse`, powered by the collapse 177 | // JavaScript plugin. 178 | 179 | .navbar-toggle { 180 | position: relative; 181 | float: right; 182 | margin-right: @navbar-padding-horizontal; 183 | padding: 9px 10px; 184 | .navbar-vertical-align(34px); 185 | background-color: transparent; 186 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 187 | border: 1px solid transparent; 188 | border-radius: @border-radius-base; 189 | 190 | // We remove the `outline` here, but later compensate by attaching `:hover` 191 | // styles to `:focus`. 192 | &:focus { 193 | outline: none; 194 | } 195 | 196 | // Bars 197 | .icon-bar { 198 | display: block; 199 | width: 22px; 200 | height: 2px; 201 | border-radius: 1px; 202 | } 203 | .icon-bar + .icon-bar { 204 | margin-top: 4px; 205 | } 206 | 207 | @media (min-width: @grid-float-breakpoint) { 208 | display: none; 209 | } 210 | } 211 | 212 | 213 | // Navbar nav links 214 | // 215 | // Builds on top of the `.nav` components with its own modifier class to make 216 | // the nav the full height of the horizontal nav (above 768px). 217 | 218 | .navbar-nav { 219 | margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal; 220 | 221 | > li > a { 222 | padding-top: 10px; 223 | padding-bottom: 10px; 224 | line-height: @line-height-computed; 225 | } 226 | 227 | @media (max-width: @grid-float-breakpoint-max) { 228 | // Dropdowns get custom display when collapsed 229 | .open .dropdown-menu { 230 | position: static; 231 | float: none; 232 | width: auto; 233 | margin-top: 0; 234 | background-color: transparent; 235 | border: 0; 236 | box-shadow: none; 237 | > li > a, 238 | .dropdown-header { 239 | padding: 5px 15px 5px 25px; 240 | } 241 | > li > a { 242 | line-height: @line-height-computed; 243 | &:hover, 244 | &:focus { 245 | background-image: none; 246 | } 247 | } 248 | } 249 | } 250 | 251 | // Uncollapse the nav 252 | @media (min-width: @grid-float-breakpoint) { 253 | float: left; 254 | margin: 0; 255 | 256 | > li { 257 | float: left; 258 | > a { 259 | padding-top: @navbar-padding-vertical; 260 | padding-bottom: @navbar-padding-vertical; 261 | } 262 | } 263 | 264 | &.navbar-right:last-child { 265 | margin-right: -@navbar-padding-horizontal; 266 | } 267 | } 268 | } 269 | 270 | 271 | // Component alignment 272 | // 273 | // Repurpose the pull utilities as their own navbar utilities to avoid specificity 274 | // issues with parents and chaining. Only do this when the navbar is uncollapsed 275 | // though so that navbar contents properly stack and align in mobile. 276 | 277 | @media (min-width: @grid-float-breakpoint) { 278 | .navbar-left { .pull-left(); } 279 | .navbar-right { .pull-right(); } 280 | } 281 | 282 | 283 | // Navbar form 284 | // 285 | // Extension of the `.form-inline` with some extra flavor for optimum display in 286 | // our navbars. 287 | 288 | .navbar-form { 289 | margin-left: -@navbar-padding-horizontal; 290 | margin-right: -@navbar-padding-horizontal; 291 | padding: 10px @navbar-padding-horizontal; 292 | border-top: 1px solid transparent; 293 | border-bottom: 1px solid transparent; 294 | @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); 295 | .box-shadow(@shadow); 296 | 297 | // Mixin behavior for optimum display 298 | .form-inline(); 299 | 300 | .form-group { 301 | @media (max-width: @grid-float-breakpoint-max) { 302 | margin-bottom: 5px; 303 | } 304 | } 305 | 306 | // Vertically center in expanded, horizontal navbar 307 | .navbar-vertical-align(@input-height-base); 308 | 309 | // Undo 100% width for pull classes 310 | @media (min-width: @grid-float-breakpoint) { 311 | width: auto; 312 | border: 0; 313 | margin-left: 0; 314 | margin-right: 0; 315 | padding-top: 0; 316 | padding-bottom: 0; 317 | .box-shadow(none); 318 | 319 | // Outdent the form if last child to line up with content down the page 320 | &.navbar-right:last-child { 321 | margin-right: -@navbar-padding-horizontal; 322 | } 323 | } 324 | } 325 | 326 | 327 | // Dropdown menus 328 | 329 | // Menu position and menu carets 330 | .navbar-nav > li > .dropdown-menu { 331 | margin-top: 0; 332 | .border-top-radius(0); 333 | } 334 | // Menu position and menu caret support for dropups via extra dropup class 335 | .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { 336 | .border-bottom-radius(0); 337 | } 338 | 339 | 340 | // Buttons in navbars 341 | // 342 | // Vertically center a button within a navbar (when *not* in a form). 343 | 344 | .navbar-btn { 345 | .navbar-vertical-align(@input-height-base); 346 | 347 | &.btn-sm { 348 | .navbar-vertical-align(@input-height-small); 349 | } 350 | &.btn-xs { 351 | .navbar-vertical-align(22); 352 | } 353 | } 354 | 355 | 356 | // Text in navbars 357 | // 358 | // Add a class to make any element properly align itself vertically within the navbars. 359 | 360 | .navbar-text { 361 | .navbar-vertical-align(@line-height-computed); 362 | 363 | @media (min-width: @grid-float-breakpoint) { 364 | float: left; 365 | margin-left: @navbar-padding-horizontal; 366 | margin-right: @navbar-padding-horizontal; 367 | 368 | // Outdent the form if last child to line up with content down the page 369 | &.navbar-right:last-child { 370 | margin-right: 0; 371 | } 372 | } 373 | } 374 | 375 | // Alternate navbars 376 | // -------------------------------------------------- 377 | 378 | // Default navbar 379 | .navbar-default { 380 | background-color: @navbar-default-bg; 381 | border-color: @navbar-default-border; 382 | 383 | .navbar-brand { 384 | color: @navbar-default-brand-color; 385 | &:hover, 386 | &:focus { 387 | color: @navbar-default-brand-hover-color; 388 | background-color: @navbar-default-brand-hover-bg; 389 | } 390 | } 391 | 392 | .navbar-text { 393 | color: @navbar-default-color; 394 | } 395 | 396 | .navbar-nav { 397 | > li > a { 398 | color: @navbar-default-link-color; 399 | 400 | &:hover, 401 | &:focus { 402 | color: @navbar-default-link-hover-color; 403 | background-color: @navbar-default-link-hover-bg; 404 | } 405 | } 406 | > .active > a { 407 | &, 408 | &:hover, 409 | &:focus { 410 | color: @navbar-default-link-active-color; 411 | background-color: @navbar-default-link-active-bg; 412 | } 413 | } 414 | > .disabled > a { 415 | &, 416 | &:hover, 417 | &:focus { 418 | color: @navbar-default-link-disabled-color; 419 | background-color: @navbar-default-link-disabled-bg; 420 | } 421 | } 422 | } 423 | 424 | .navbar-toggle { 425 | border-color: @navbar-default-toggle-border-color; 426 | &:hover, 427 | &:focus { 428 | background-color: @navbar-default-toggle-hover-bg; 429 | } 430 | .icon-bar { 431 | background-color: @navbar-default-toggle-icon-bar-bg; 432 | } 433 | } 434 | 435 | .navbar-collapse, 436 | .navbar-form { 437 | border-color: @navbar-default-border; 438 | } 439 | 440 | // Dropdown menu items 441 | .navbar-nav { 442 | // Remove background color from open dropdown 443 | > .open > a { 444 | &, 445 | &:hover, 446 | &:focus { 447 | background-color: @navbar-default-link-active-bg; 448 | color: @navbar-default-link-active-color; 449 | } 450 | } 451 | 452 | @media (max-width: @grid-float-breakpoint-max) { 453 | // Dropdowns get custom display when collapsed 454 | .open .dropdown-menu { 455 | > li > a { 456 | color: @navbar-default-link-color; 457 | &:hover, 458 | &:focus { 459 | color: @navbar-default-link-hover-color; 460 | background-color: @navbar-default-link-hover-bg; 461 | } 462 | } 463 | > .active > a { 464 | &, 465 | &:hover, 466 | &:focus { 467 | color: @navbar-default-link-active-color; 468 | background-color: @navbar-default-link-active-bg; 469 | } 470 | } 471 | > .disabled > a { 472 | &, 473 | &:hover, 474 | &:focus { 475 | color: @navbar-default-link-disabled-color; 476 | background-color: @navbar-default-link-disabled-bg; 477 | } 478 | } 479 | } 480 | } 481 | } 482 | 483 | 484 | // Links in navbars 485 | // 486 | // Add a class to ensure links outside the navbar nav are colored correctly. 487 | 488 | .navbar-link { 489 | color: @navbar-default-link-color; 490 | &:hover { 491 | color: @navbar-default-link-hover-color; 492 | } 493 | } 494 | 495 | } 496 | 497 | // Inverse navbar 498 | 499 | .navbar-inverse { 500 | background-color: @navbar-inverse-bg; 501 | border-color: @navbar-inverse-border; 502 | 503 | .navbar-brand { 504 | color: @navbar-inverse-brand-color; 505 | &:hover, 506 | &:focus { 507 | color: @navbar-inverse-brand-hover-color; 508 | background-color: @navbar-inverse-brand-hover-bg; 509 | } 510 | } 511 | 512 | .navbar-text { 513 | color: @navbar-inverse-color; 514 | } 515 | 516 | .navbar-nav { 517 | > li > a { 518 | color: @navbar-inverse-link-color; 519 | 520 | &:hover, 521 | &:focus { 522 | color: @navbar-inverse-link-hover-color; 523 | background-color: @navbar-inverse-link-hover-bg; 524 | } 525 | } 526 | > .active > a { 527 | &, 528 | &:hover, 529 | &:focus { 530 | color: @navbar-inverse-link-active-color; 531 | background-color: @navbar-inverse-link-active-bg; 532 | } 533 | } 534 | > .disabled > a { 535 | &, 536 | &:hover, 537 | &:focus { 538 | color: @navbar-inverse-link-disabled-color; 539 | background-color: @navbar-inverse-link-disabled-bg; 540 | } 541 | } 542 | } 543 | 544 | // Darken the responsive nav toggle 545 | .navbar-toggle { 546 | border-color: @navbar-inverse-toggle-border-color; 547 | &:hover, 548 | &:focus { 549 | background-color: @navbar-inverse-toggle-hover-bg; 550 | } 551 | .icon-bar { 552 | background-color: @navbar-inverse-toggle-icon-bar-bg; 553 | } 554 | } 555 | 556 | .navbar-collapse, 557 | .navbar-form { 558 | border-color: darken(@navbar-inverse-bg, 7%); 559 | } 560 | 561 | // Dropdowns 562 | .navbar-nav { 563 | > .open > a { 564 | &, 565 | &:hover, 566 | &:focus { 567 | background-color: @navbar-inverse-link-active-bg; 568 | color: @navbar-inverse-link-active-color; 569 | } 570 | } 571 | 572 | @media (max-width: @grid-float-breakpoint-max) { 573 | // Dropdowns get custom display 574 | .open .dropdown-menu { 575 | > .dropdown-header { 576 | border-color: @navbar-inverse-border; 577 | } 578 | .divider { 579 | background-color: @navbar-inverse-border; 580 | } 581 | > li > a { 582 | color: @navbar-inverse-link-color; 583 | &:hover, 584 | &:focus { 585 | color: @navbar-inverse-link-hover-color; 586 | background-color: @navbar-inverse-link-hover-bg; 587 | } 588 | } 589 | > .active > a { 590 | &, 591 | &:hover, 592 | &:focus { 593 | color: @navbar-inverse-link-active-color; 594 | background-color: @navbar-inverse-link-active-bg; 595 | } 596 | } 597 | > .disabled > a { 598 | &, 599 | &:hover, 600 | &:focus { 601 | color: @navbar-inverse-link-disabled-color; 602 | background-color: @navbar-inverse-link-disabled-bg; 603 | } 604 | } 605 | } 606 | } 607 | } 608 | 609 | .navbar-link { 610 | color: @navbar-inverse-link-color; 611 | &:hover { 612 | color: @navbar-inverse-link-hover-color; 613 | } 614 | } 615 | 616 | } 617 | -------------------------------------------------------------------------------- /public/js/libs/prettify/lang-xq.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/], 2 | ["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/], 3 | ["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]); 4 | -------------------------------------------------------------------------------- /public/js/libs/bootstrap/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.1.1 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); --------------------------------------------------------------------------------