├── .gitignore ├── LICENSE.md ├── README.md ├── VERSION ├── archetypes └── default.md ├── exampleSite ├── config.toml └── content │ ├── img │ └── intro-bg.svg │ └── post │ ├── first.md │ ├── second.md │ └── third.md ├── images ├── screenshot.png └── tn.png ├── layouts ├── _default │ ├── list.html │ └── single.html ├── index.html └── partials │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── js.html │ ├── nav.html │ ├── services.html │ └── template.css ├── static ├── css │ ├── bootstrap.css │ ├── bootstrap.min.css │ └── landing-page.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── js │ ├── bootstrap.js │ └── bootstrap.min.js └── theme.toml /.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 YOUR_NAME_HERE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Github project landing page 2 | 3 | Github landing page is a theme for [Hugo](http://gohugo.io) to create landing pages for github projects. This theme is based on [landing-page-hugo](https://github.com/crakjie/landing-page-hugo) 4 | 5 | # Demo 6 | A demo can be find here [Swiftline](http://swiftline.github.io) 7 | 8 | # Screenshot 9 | ![screenshot](https://raw.githubusercontent.com/nsomar/github-project-landing-page/master/images/screenshot.png) 10 | 11 | # Costumization 12 | Check [config.toml](https://github.com/nsomar/github-project-landing-page/blob/master/exampleSite/config.toml) for available configuration. 13 | Below is a description for each of them. 14 | 15 | Project description appears after project name 16 | ``` 17 | description = "Amazing project." 18 | ``` 19 | 20 | `author_url` a link of the project author. 21 | `project_url` link to project url 22 | `project_documentation` link to project documentation 23 | 24 | ``` 25 | author_url = "http://nsomar.com" 26 | project_url = "http://github.com/swiftline/swiftline" 27 | project_documentation = "http://swiftline.github.io/docs" 28 | 29 | ``` 30 | 31 | `github_user_name` github author account name 32 | `github_project_name` github project name 33 | ``` 34 | github_project_name = "swiftline" 35 | github_user_name = "swiftline" 36 | ``` 37 | 38 | Theme colors 39 | ``` 40 | first_color="#f8f8f8" 41 | first_border_color="#e7e7e7" 42 | first_text_color="#333" 43 | 44 | second_color="white" 45 | second_text_color="#333" 46 | 47 | header_color="#f8f8f8" 48 | header_text_color="rgb(51, 51, 51)" 49 | 50 | header_link_color="#777" 51 | header_link_hover_color="rgb(51, 51, 51)" 52 | 53 | ``` 54 | 55 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.1 2 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | Description = "" 3 | Keywords = [] 4 | Tags = [] 5 | Categories = [] 6 | +++ 7 | -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "http://swiftline.github.io" 2 | languageCode = "en-us" 3 | title = "Swiftline" 4 | 5 | [params] 6 | description = "Amazing project." 7 | author_url = "http://nsomar.com" 8 | project_url = "http://github.com/swiftline/swiftline" 9 | project_documentation = "http://swiftline.github.io/docs" 10 | github_project_name = "swiftline" 11 | github_user_name = "swiftline" 12 | 13 | first_color="#f8f8f8" 14 | first_border_color="#e7e7e7" 15 | first_text_color="#333" 16 | 17 | second_color="white" 18 | second_text_color="#333" 19 | 20 | header_color="#f8f8f8" 21 | header_text_color="rgb(51, 51, 51)" 22 | 23 | header_link_color="#777" 24 | header_link_hover_color="rgb(51, 51, 51)" 25 | -------------------------------------------------------------------------------- /exampleSite/content/img/intro-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | app-icon-board 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /exampleSite/content/post/first.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2015-12-2T14:10:00+03:00" 3 | draft = false 4 | title = "First Post" 5 | weight = 1 6 | +++ 7 | 8 | First post 9 | Where you talk about how to install your project 10 | 11 | ``` 12 | brew install amazing-tool 13 | ``` 14 | -------------------------------------------------------------------------------- /exampleSite/content/post/second.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2015-12-2T14:10:00+03:00" 3 | draft = false 4 | title = "Second Post" 5 | weight = 2 6 | +++ 7 | 8 | Second post 9 | Usage maybe? 10 | 11 | ``` 12 | DoSomething() 13 | ``` 14 | 15 | And the output would be: 16 | 17 | ``` 18 | Something 19 | ``` 20 | -------------------------------------------------------------------------------- /exampleSite/content/post/third.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2015-12-2T14:10:00+03:00" 3 | draft = false 4 | title = "Third Post" 5 | weight = 3 6 | +++ 7 | 8 | Third post 9 | Get help 10 | 11 | - Ask questions here .... 12 | - Read this doc file 13 | - Concat me twitter [@ifnottrue](https://twitter.com/@ifnottrue) 14 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nsomar/github-project-landing-page/b639b771b6b799629a7e7e9b4ab068bcda423d7c/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nsomar/github-project-landing-page/b639b771b6b799629a7e7e9b4ab068bcda423d7c/images/tn.png -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | {{ partial "header.html" . }} 3 | {{ partial "services.html" . }} 4 | {{ partial "footer.html" . }} 5 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | {{ partial "nav.html" . }} 3 | 4 |
5 |
6 | 7 |
8 | 9 |
10 |
11 |
12 |
13 |

{{ .Title }}

14 | {{ .Content }} 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 | {{ partial "footer.html" . }} 23 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | {{ partial "nav.html" . }} 3 | {{ partial "header.html" . }} 4 | {{ partial "services.html" . }} 5 | {{ partial "footer.html" . }} 6 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 16 | {{ partial "js.html" . }} 17 | 18 | 19 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{ .Title }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 |
9 |
10 |

{{ .Site.Title }}

11 |

{{ .Site.Params.description }}

12 | 13 | {{ if (isset .Site.Params "github_project_name") }} 14 | {{ $user := .Site.Params.github_user_name }} 15 | {{ $repo := .Site.Params.github_project_name }} 16 | 17 | 18 | {{ end }} 19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 | -------------------------------------------------------------------------------- /layouts/partials/js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{ if isset .Site.Params "googleAnalytics" }} 14 | 15 | 16 | 26 | 27 | {{ end }} 28 | -------------------------------------------------------------------------------- /layouts/partials/nav.html: -------------------------------------------------------------------------------- 1 | 2 | 32 | -------------------------------------------------------------------------------- /layouts/partials/services.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | {{ range $index, $element := where .Data.Pages "Section" "in" "post" }} 5 | {{ if modBool $index 2 }} 6 |
7 | {{ else }} 8 |
9 | {{ end }} 10 | 11 |
12 | 13 |
14 |
15 |
16 |
17 |

{{ .Title }}

18 | {{ .Content }} 19 |
20 |
21 | 22 |
23 | 24 | 25 |
26 | {{ end }} 27 | 28 |
29 | -------------------------------------------------------------------------------- /layouts/partials/template.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | border-color: {{ .Site.Params.first_border_color }}; 3 | } 4 | 5 | .content-section-a, 6 | footer, 7 | .navbar { 8 | background-color: {{ .Site.Params.first_color }}; 9 | color: {{ .Site.Params.first_text_color }}; 10 | } 11 | 12 | .navbar a:link, 13 | .navbar-default .navbar-nav>li>a { 14 | color: {{ .Site.Params.header_link_color }}; 15 | } 16 | 17 | .navbar a:hover, 18 | .navbar-default .navbar-nav>li>a:hover { 19 | color: {{ .Site.Params.header_link_hover_color }}; 20 | } 21 | 22 | .content-section-b { 23 | background-color: {{ .Site.Params.second_color }}; 24 | color: {{ .Site.Params.second_text_color }}; 25 | } 26 | 27 | body { 28 | color: {{ .Site.Params.header_text_color }}; 29 | } 30 | 31 | .header-container h1, 32 | .header-container h2, 33 | .header-container h3, 34 | .header-container h4 { 35 | color: {{ .Site.Params.header_text_color }}; 36 | } 37 | -------------------------------------------------------------------------------- /static/css/landing-page.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Landing Page Bootstrap Theme (http://startbootstrap.com) 3 | * Code licensed under the Apache License v2.0. 4 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 5 | */ 6 | 7 | body, 8 | html { 9 | width: 100%; 10 | height: 100%; 11 | font-size: 16px; 12 | } 13 | 14 | body, 15 | h1, 16 | h2, 17 | h3, 18 | h4, 19 | h5, 20 | h6 { 21 | font-family: -apple-system-headline, 'Helvetica Neue', Helvetica, sans-serif; 22 | } 23 | 24 | .lead { 25 | font-size: 18px; 26 | font-weight: 400; 27 | } 28 | 29 | .intro-header { 30 | padding-top: 40px; 31 | text-align: center; 32 | color: #f8f8f8; 33 | } 34 | 35 | .intro-message { 36 | margin-top: 100px; 37 | color: rgb(51, 51, 51); 38 | text-align: left; 39 | } 40 | 41 | .intro-message > h3 { 42 | font-family: -apple-system-headline, 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, sans-serif; 43 | } 44 | 45 | .intro-message > h1 { 46 | font-family: -apple-system-subheadline, 'HelveticaNeue-UltraLight', 'Helvetica Neue', Helvetica, sans-serif; 47 | font-size: 5em; 48 | } 49 | 50 | .intro-divider { 51 | width: 400px; 52 | border-top: 1px solid #f8f8f8; 53 | border-bottom: 1px solid rgba(0,0,0,0.2); 54 | } 55 | 56 | .network-name { 57 | text-transform: uppercase; 58 | font-size: 14px; 59 | font-weight: 400; 60 | letter-spacing: 2px; 61 | } 62 | 63 | .container { 64 | width: 900px; 65 | line-height: 1.2em; 66 | } 67 | 68 | .header-container { 69 | width: 100%; 70 | } 71 | 72 | .container ul { 73 | line-height: 1.6em; 74 | } 75 | 76 | .container pre { 77 | margin-top: 20px; 78 | margin-bottom: 20px; 79 | line-height: 1.6em; 80 | } 81 | 82 | .container h3 { 83 | margin-top: 20px; 84 | margin-bottom: 10px; 85 | } 86 | 87 | .content-section-a { 88 | padding: 50px 0; 89 | background-color: #f8f8f8; 90 | } 91 | 92 | .content-section-b { 93 | padding: 50px 0; 94 | border-top: 1px solid #e7e7e7; 95 | border-bottom: 1px solid #e7e7e7; 96 | } 97 | 98 | .section-heading { 99 | margin-bottom: 30px; 100 | } 101 | 102 | .section-heading-spacer { 103 | float: left; 104 | width: 200px; 105 | border-top: 3px solid #e7e7e7; 106 | } 107 | 108 | .contact { 109 | padding: 100px 0; 110 | color: #f8f8f8; 111 | background: url(../img/contact-bg.jpg) no-repeat center center; 112 | background-size: cover; 113 | } 114 | 115 | .contact h2 { 116 | margin: 0; 117 | text-shadow: 2px 2px 3px rgba(0,0,0,0.6); 118 | font-size: 3em; 119 | } 120 | 121 | .contact ul { 122 | margin-bottom: 0; 123 | } 124 | 125 | .contact-social-buttons { 126 | float: right; 127 | margin-top: 0; 128 | } 129 | 130 | @media(max-width:1199px) { 131 | ul.contact-social-buttons { 132 | float: left; 133 | margin-top: 15px; 134 | } 135 | } 136 | 137 | @media(max-width:767px) { 138 | .contact h2 { 139 | margin: 0; 140 | text-shadow: 2px 2px 3px rgba(0,0,0,0.6); 141 | font-size: 3em; 142 | } 143 | 144 | ul.contact-social-buttons > li { 145 | display: block; 146 | margin-bottom: 20px; 147 | padding: 0; 148 | } 149 | 150 | ul.contact-social-buttons > li:last-child { 151 | margin-bottom: 0; 152 | } 153 | } 154 | 155 | footer { 156 | padding: 50px 0; 157 | background-color: #f8f8f8; 158 | } 159 | 160 | p.copyright { 161 | margin: 15px 0 0; 162 | } 163 | 164 | 165 | @media(max-width:1000px) { 166 | .intro-message { 167 | padding-bottom: 10%; 168 | margin-top: -30px; 169 | } 170 | 171 | .intro-message > h1 { 172 | font-size: 3em; 173 | } 174 | 175 | ul.intro-social-buttons > li { 176 | display: block; 177 | margin-bottom: 20px; 178 | padding: 0; 179 | } 180 | 181 | ul.intro-social-buttons > li:last-child { 182 | margin-bottom: 0; 183 | } 184 | 185 | .intro-divider { 186 | width: 100%; 187 | } 188 | 189 | .container { 190 | width: 80%; 191 | } 192 | 193 | .intro-message { 194 | text-align: center; 195 | } 196 | } 197 | 198 | .intro-image { 199 | height: 100%; 200 | min-height: 380px; 201 | margin-top: 20px; 202 | background: url(../img/intro-bg.svg) no-repeat center center; 203 | background-size: 280px; 204 | } 205 | 206 | .github-btn { 207 | margin-top: 10px; 208 | } 209 | -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nsomar/github-project-landing-page/b639b771b6b799629a7e7e9b4ab068bcda423d7c/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nsomar/github-project-landing-page/b639b771b6b799629a7e7e9b4ab068bcda423d7c/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nsomar/github-project-landing-page/b639b771b6b799629a7e7e9b4ab068bcda423d7c/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.2.0 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } 8 | 9 | /* ======================================================================== 10 | * Bootstrap: transition.js v3.2.0 11 | * http://getbootstrap.com/javascript/#transitions 12 | * ======================================================================== 13 | * Copyright 2011-2014 Twitter, Inc. 14 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 15 | * ======================================================================== */ 16 | 17 | 18 | +function ($) { 19 | 'use strict'; 20 | 21 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 22 | // ============================================================ 23 | 24 | function transitionEnd() { 25 | var el = document.createElement('bootstrap') 26 | 27 | var transEndEventNames = { 28 | WebkitTransition : 'webkitTransitionEnd', 29 | MozTransition : 'transitionend', 30 | OTransition : 'oTransitionEnd otransitionend', 31 | transition : 'transitionend' 32 | } 33 | 34 | for (var name in transEndEventNames) { 35 | if (el.style[name] !== undefined) { 36 | return { end: transEndEventNames[name] } 37 | } 38 | } 39 | 40 | return false // explicit for ie8 ( ._.) 41 | } 42 | 43 | // http://blog.alexmaccaw.com/css-transitions 44 | $.fn.emulateTransitionEnd = function (duration) { 45 | var called = false 46 | var $el = this 47 | $(this).one('bsTransitionEnd', function () { called = true }) 48 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 49 | setTimeout(callback, duration) 50 | return this 51 | } 52 | 53 | $(function () { 54 | $.support.transition = transitionEnd() 55 | 56 | if (!$.support.transition) return 57 | 58 | $.event.special.bsTransitionEnd = { 59 | bindType: $.support.transition.end, 60 | delegateType: $.support.transition.end, 61 | handle: function (e) { 62 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 63 | } 64 | } 65 | }) 66 | 67 | }(jQuery); 68 | 69 | /* ======================================================================== 70 | * Bootstrap: alert.js v3.2.0 71 | * http://getbootstrap.com/javascript/#alerts 72 | * ======================================================================== 73 | * Copyright 2011-2014 Twitter, Inc. 74 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 75 | * ======================================================================== */ 76 | 77 | 78 | +function ($) { 79 | 'use strict'; 80 | 81 | // ALERT CLASS DEFINITION 82 | // ====================== 83 | 84 | var dismiss = '[data-dismiss="alert"]' 85 | var Alert = function (el) { 86 | $(el).on('click', dismiss, this.close) 87 | } 88 | 89 | Alert.VERSION = '3.2.0' 90 | 91 | Alert.prototype.close = function (e) { 92 | var $this = $(this) 93 | var selector = $this.attr('data-target') 94 | 95 | if (!selector) { 96 | selector = $this.attr('href') 97 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 98 | } 99 | 100 | var $parent = $(selector) 101 | 102 | if (e) e.preventDefault() 103 | 104 | if (!$parent.length) { 105 | $parent = $this.hasClass('alert') ? $this : $this.parent() 106 | } 107 | 108 | $parent.trigger(e = $.Event('close.bs.alert')) 109 | 110 | if (e.isDefaultPrevented()) return 111 | 112 | $parent.removeClass('in') 113 | 114 | function removeElement() { 115 | // detach from parent, fire event then clean up data 116 | $parent.detach().trigger('closed.bs.alert').remove() 117 | } 118 | 119 | $.support.transition && $parent.hasClass('fade') ? 120 | $parent 121 | .one('bsTransitionEnd', removeElement) 122 | .emulateTransitionEnd(150) : 123 | removeElement() 124 | } 125 | 126 | 127 | // ALERT PLUGIN DEFINITION 128 | // ======================= 129 | 130 | function Plugin(option) { 131 | return this.each(function () { 132 | var $this = $(this) 133 | var data = $this.data('bs.alert') 134 | 135 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 136 | if (typeof option == 'string') data[option].call($this) 137 | }) 138 | } 139 | 140 | var old = $.fn.alert 141 | 142 | $.fn.alert = Plugin 143 | $.fn.alert.Constructor = Alert 144 | 145 | 146 | // ALERT NO CONFLICT 147 | // ================= 148 | 149 | $.fn.alert.noConflict = function () { 150 | $.fn.alert = old 151 | return this 152 | } 153 | 154 | 155 | // ALERT DATA-API 156 | // ============== 157 | 158 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 159 | 160 | }(jQuery); 161 | 162 | /* ======================================================================== 163 | * Bootstrap: button.js v3.2.0 164 | * http://getbootstrap.com/javascript/#buttons 165 | * ======================================================================== 166 | * Copyright 2011-2014 Twitter, Inc. 167 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 168 | * ======================================================================== */ 169 | 170 | 171 | +function ($) { 172 | 'use strict'; 173 | 174 | // BUTTON PUBLIC CLASS DEFINITION 175 | // ============================== 176 | 177 | var Button = function (element, options) { 178 | this.$element = $(element) 179 | this.options = $.extend({}, Button.DEFAULTS, options) 180 | this.isLoading = false 181 | } 182 | 183 | Button.VERSION = '3.2.0' 184 | 185 | Button.DEFAULTS = { 186 | loadingText: 'loading...' 187 | } 188 | 189 | Button.prototype.setState = function (state) { 190 | var d = 'disabled' 191 | var $el = this.$element 192 | var val = $el.is('input') ? 'val' : 'html' 193 | var data = $el.data() 194 | 195 | state = state + 'Text' 196 | 197 | if (data.resetText == null) $el.data('resetText', $el[val]()) 198 | 199 | $el[val](data[state] == null ? this.options[state] : data[state]) 200 | 201 | // push to event loop to allow forms to submit 202 | setTimeout($.proxy(function () { 203 | if (state == 'loadingText') { 204 | this.isLoading = true 205 | $el.addClass(d).attr(d, d) 206 | } else if (this.isLoading) { 207 | this.isLoading = false 208 | $el.removeClass(d).removeAttr(d) 209 | } 210 | }, this), 0) 211 | } 212 | 213 | Button.prototype.toggle = function () { 214 | var changed = true 215 | var $parent = this.$element.closest('[data-toggle="buttons"]') 216 | 217 | if ($parent.length) { 218 | var $input = this.$element.find('input') 219 | if ($input.prop('type') == 'radio') { 220 | if ($input.prop('checked') && this.$element.hasClass('active')) changed = false 221 | else $parent.find('.active').removeClass('active') 222 | } 223 | if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') 224 | } 225 | 226 | if (changed) this.$element.toggleClass('active') 227 | } 228 | 229 | 230 | // BUTTON PLUGIN DEFINITION 231 | // ======================== 232 | 233 | function Plugin(option) { 234 | return this.each(function () { 235 | var $this = $(this) 236 | var data = $this.data('bs.button') 237 | var options = typeof option == 'object' && option 238 | 239 | if (!data) $this.data('bs.button', (data = new Button(this, options))) 240 | 241 | if (option == 'toggle') data.toggle() 242 | else if (option) data.setState(option) 243 | }) 244 | } 245 | 246 | var old = $.fn.button 247 | 248 | $.fn.button = Plugin 249 | $.fn.button.Constructor = Button 250 | 251 | 252 | // BUTTON NO CONFLICT 253 | // ================== 254 | 255 | $.fn.button.noConflict = function () { 256 | $.fn.button = old 257 | return this 258 | } 259 | 260 | 261 | // BUTTON DATA-API 262 | // =============== 263 | 264 | $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 265 | var $btn = $(e.target) 266 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 267 | Plugin.call($btn, 'toggle') 268 | e.preventDefault() 269 | }) 270 | 271 | }(jQuery); 272 | 273 | /* ======================================================================== 274 | * Bootstrap: carousel.js v3.2.0 275 | * http://getbootstrap.com/javascript/#carousel 276 | * ======================================================================== 277 | * Copyright 2011-2014 Twitter, Inc. 278 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 279 | * ======================================================================== */ 280 | 281 | 282 | +function ($) { 283 | 'use strict'; 284 | 285 | // CAROUSEL CLASS DEFINITION 286 | // ========================= 287 | 288 | var Carousel = function (element, options) { 289 | this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) 290 | this.$indicators = this.$element.find('.carousel-indicators') 291 | this.options = options 292 | this.paused = 293 | this.sliding = 294 | this.interval = 295 | this.$active = 296 | this.$items = null 297 | 298 | this.options.pause == 'hover' && this.$element 299 | .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) 300 | .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) 301 | } 302 | 303 | Carousel.VERSION = '3.2.0' 304 | 305 | Carousel.DEFAULTS = { 306 | interval: 5000, 307 | pause: 'hover', 308 | wrap: true 309 | } 310 | 311 | Carousel.prototype.keydown = function (e) { 312 | switch (e.which) { 313 | case 37: this.prev(); break 314 | case 39: this.next(); break 315 | default: return 316 | } 317 | 318 | e.preventDefault() 319 | } 320 | 321 | Carousel.prototype.cycle = function (e) { 322 | e || (this.paused = false) 323 | 324 | this.interval && clearInterval(this.interval) 325 | 326 | this.options.interval 327 | && !this.paused 328 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 329 | 330 | return this 331 | } 332 | 333 | Carousel.prototype.getItemIndex = function (item) { 334 | this.$items = item.parent().children('.item') 335 | return this.$items.index(item || this.$active) 336 | } 337 | 338 | Carousel.prototype.to = function (pos) { 339 | var that = this 340 | var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) 341 | 342 | if (pos > (this.$items.length - 1) || pos < 0) return 343 | 344 | if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" 345 | if (activeIndex == pos) return this.pause().cycle() 346 | 347 | return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) 348 | } 349 | 350 | Carousel.prototype.pause = function (e) { 351 | e || (this.paused = true) 352 | 353 | if (this.$element.find('.next, .prev').length && $.support.transition) { 354 | this.$element.trigger($.support.transition.end) 355 | this.cycle(true) 356 | } 357 | 358 | this.interval = clearInterval(this.interval) 359 | 360 | return this 361 | } 362 | 363 | Carousel.prototype.next = function () { 364 | if (this.sliding) return 365 | return this.slide('next') 366 | } 367 | 368 | Carousel.prototype.prev = function () { 369 | if (this.sliding) return 370 | return this.slide('prev') 371 | } 372 | 373 | Carousel.prototype.slide = function (type, next) { 374 | var $active = this.$element.find('.item.active') 375 | var $next = next || $active[type]() 376 | var isCycling = this.interval 377 | var direction = type == 'next' ? 'left' : 'right' 378 | var fallback = type == 'next' ? 'first' : 'last' 379 | var that = this 380 | 381 | if (!$next.length) { 382 | if (!this.options.wrap) return 383 | $next = this.$element.find('.item')[fallback]() 384 | } 385 | 386 | if ($next.hasClass('active')) return (this.sliding = false) 387 | 388 | var relatedTarget = $next[0] 389 | var slideEvent = $.Event('slide.bs.carousel', { 390 | relatedTarget: relatedTarget, 391 | direction: direction 392 | }) 393 | this.$element.trigger(slideEvent) 394 | if (slideEvent.isDefaultPrevented()) return 395 | 396 | this.sliding = true 397 | 398 | isCycling && this.pause() 399 | 400 | if (this.$indicators.length) { 401 | this.$indicators.find('.active').removeClass('active') 402 | var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) 403 | $nextIndicator && $nextIndicator.addClass('active') 404 | } 405 | 406 | var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 407 | if ($.support.transition && this.$element.hasClass('slide')) { 408 | $next.addClass(type) 409 | $next[0].offsetWidth // force reflow 410 | $active.addClass(direction) 411 | $next.addClass(direction) 412 | $active 413 | .one('bsTransitionEnd', function () { 414 | $next.removeClass([type, direction].join(' ')).addClass('active') 415 | $active.removeClass(['active', direction].join(' ')) 416 | that.sliding = false 417 | setTimeout(function () { 418 | that.$element.trigger(slidEvent) 419 | }, 0) 420 | }) 421 | .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) 422 | } else { 423 | $active.removeClass('active') 424 | $next.addClass('active') 425 | this.sliding = false 426 | this.$element.trigger(slidEvent) 427 | } 428 | 429 | isCycling && this.cycle() 430 | 431 | return this 432 | } 433 | 434 | 435 | // CAROUSEL PLUGIN DEFINITION 436 | // ========================== 437 | 438 | function Plugin(option) { 439 | return this.each(function () { 440 | var $this = $(this) 441 | var data = $this.data('bs.carousel') 442 | var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 443 | var action = typeof option == 'string' ? option : options.slide 444 | 445 | if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 446 | if (typeof option == 'number') data.to(option) 447 | else if (action) data[action]() 448 | else if (options.interval) data.pause().cycle() 449 | }) 450 | } 451 | 452 | var old = $.fn.carousel 453 | 454 | $.fn.carousel = Plugin 455 | $.fn.carousel.Constructor = Carousel 456 | 457 | 458 | // CAROUSEL NO CONFLICT 459 | // ==================== 460 | 461 | $.fn.carousel.noConflict = function () { 462 | $.fn.carousel = old 463 | return this 464 | } 465 | 466 | 467 | // CAROUSEL DATA-API 468 | // ================= 469 | 470 | $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { 471 | var href 472 | var $this = $(this) 473 | var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 474 | if (!$target.hasClass('carousel')) return 475 | var options = $.extend({}, $target.data(), $this.data()) 476 | var slideIndex = $this.attr('data-slide-to') 477 | if (slideIndex) options.interval = false 478 | 479 | Plugin.call($target, options) 480 | 481 | if (slideIndex) { 482 | $target.data('bs.carousel').to(slideIndex) 483 | } 484 | 485 | e.preventDefault() 486 | }) 487 | 488 | $(window).on('load', function () { 489 | $('[data-ride="carousel"]').each(function () { 490 | var $carousel = $(this) 491 | Plugin.call($carousel, $carousel.data()) 492 | }) 493 | }) 494 | 495 | }(jQuery); 496 | 497 | /* ======================================================================== 498 | * Bootstrap: collapse.js v3.2.0 499 | * http://getbootstrap.com/javascript/#collapse 500 | * ======================================================================== 501 | * Copyright 2011-2014 Twitter, Inc. 502 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 503 | * ======================================================================== */ 504 | 505 | 506 | +function ($) { 507 | 'use strict'; 508 | 509 | // COLLAPSE PUBLIC CLASS DEFINITION 510 | // ================================ 511 | 512 | var Collapse = function (element, options) { 513 | this.$element = $(element) 514 | this.options = $.extend({}, Collapse.DEFAULTS, options) 515 | this.transitioning = null 516 | 517 | if (this.options.parent) this.$parent = $(this.options.parent) 518 | if (this.options.toggle) this.toggle() 519 | } 520 | 521 | Collapse.VERSION = '3.2.0' 522 | 523 | Collapse.DEFAULTS = { 524 | toggle: true 525 | } 526 | 527 | Collapse.prototype.dimension = function () { 528 | var hasWidth = this.$element.hasClass('width') 529 | return hasWidth ? 'width' : 'height' 530 | } 531 | 532 | Collapse.prototype.show = function () { 533 | if (this.transitioning || this.$element.hasClass('in')) return 534 | 535 | var startEvent = $.Event('show.bs.collapse') 536 | this.$element.trigger(startEvent) 537 | if (startEvent.isDefaultPrevented()) return 538 | 539 | var actives = this.$parent && this.$parent.find('> .panel > .in') 540 | 541 | if (actives && actives.length) { 542 | var hasData = actives.data('bs.collapse') 543 | if (hasData && hasData.transitioning) return 544 | Plugin.call(actives, 'hide') 545 | hasData || actives.data('bs.collapse', null) 546 | } 547 | 548 | var dimension = this.dimension() 549 | 550 | this.$element 551 | .removeClass('collapse') 552 | .addClass('collapsing')[dimension](0) 553 | 554 | this.transitioning = 1 555 | 556 | var complete = function () { 557 | this.$element 558 | .removeClass('collapsing') 559 | .addClass('collapse in')[dimension]('') 560 | this.transitioning = 0 561 | this.$element 562 | .trigger('shown.bs.collapse') 563 | } 564 | 565 | if (!$.support.transition) return complete.call(this) 566 | 567 | var scrollSize = $.camelCase(['scroll', dimension].join('-')) 568 | 569 | this.$element 570 | .one('bsTransitionEnd', $.proxy(complete, this)) 571 | .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) 572 | } 573 | 574 | Collapse.prototype.hide = function () { 575 | if (this.transitioning || !this.$element.hasClass('in')) return 576 | 577 | var startEvent = $.Event('hide.bs.collapse') 578 | this.$element.trigger(startEvent) 579 | if (startEvent.isDefaultPrevented()) return 580 | 581 | var dimension = this.dimension() 582 | 583 | this.$element[dimension](this.$element[dimension]())[0].offsetHeight 584 | 585 | this.$element 586 | .addClass('collapsing') 587 | .removeClass('collapse') 588 | .removeClass('in') 589 | 590 | this.transitioning = 1 591 | 592 | var complete = function () { 593 | this.transitioning = 0 594 | this.$element 595 | .trigger('hidden.bs.collapse') 596 | .removeClass('collapsing') 597 | .addClass('collapse') 598 | } 599 | 600 | if (!$.support.transition) return complete.call(this) 601 | 602 | this.$element 603 | [dimension](0) 604 | .one('bsTransitionEnd', $.proxy(complete, this)) 605 | .emulateTransitionEnd(350) 606 | } 607 | 608 | Collapse.prototype.toggle = function () { 609 | this[this.$element.hasClass('in') ? 'hide' : 'show']() 610 | } 611 | 612 | 613 | // COLLAPSE PLUGIN DEFINITION 614 | // ========================== 615 | 616 | function Plugin(option) { 617 | return this.each(function () { 618 | var $this = $(this) 619 | var data = $this.data('bs.collapse') 620 | var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 621 | 622 | if (!data && options.toggle && option == 'show') option = !option 623 | if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 624 | if (typeof option == 'string') data[option]() 625 | }) 626 | } 627 | 628 | var old = $.fn.collapse 629 | 630 | $.fn.collapse = Plugin 631 | $.fn.collapse.Constructor = Collapse 632 | 633 | 634 | // COLLAPSE NO CONFLICT 635 | // ==================== 636 | 637 | $.fn.collapse.noConflict = function () { 638 | $.fn.collapse = old 639 | return this 640 | } 641 | 642 | 643 | // COLLAPSE DATA-API 644 | // ================= 645 | 646 | $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 647 | var href 648 | var $this = $(this) 649 | var target = $this.attr('data-target') 650 | || e.preventDefault() 651 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 652 | var $target = $(target) 653 | var data = $target.data('bs.collapse') 654 | var option = data ? 'toggle' : $this.data() 655 | var parent = $this.attr('data-parent') 656 | var $parent = parent && $(parent) 657 | 658 | if (!data || !data.transitioning) { 659 | if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') 660 | $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') 661 | } 662 | 663 | Plugin.call($target, option) 664 | }) 665 | 666 | }(jQuery); 667 | 668 | /* ======================================================================== 669 | * Bootstrap: dropdown.js v3.2.0 670 | * http://getbootstrap.com/javascript/#dropdowns 671 | * ======================================================================== 672 | * Copyright 2011-2014 Twitter, Inc. 673 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 674 | * ======================================================================== */ 675 | 676 | 677 | +function ($) { 678 | 'use strict'; 679 | 680 | // DROPDOWN CLASS DEFINITION 681 | // ========================= 682 | 683 | var backdrop = '.dropdown-backdrop' 684 | var toggle = '[data-toggle="dropdown"]' 685 | var Dropdown = function (element) { 686 | $(element).on('click.bs.dropdown', this.toggle) 687 | } 688 | 689 | Dropdown.VERSION = '3.2.0' 690 | 691 | Dropdown.prototype.toggle = function (e) { 692 | var $this = $(this) 693 | 694 | if ($this.is('.disabled, :disabled')) return 695 | 696 | var $parent = getParent($this) 697 | var isActive = $parent.hasClass('open') 698 | 699 | clearMenus() 700 | 701 | if (!isActive) { 702 | if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 703 | // if mobile we use a backdrop because click events don't delegate 704 | $('