├── .gitignore ├── LICENSE ├── README.md ├── actions ├── base.go ├── docs.go ├── home.go ├── init.go └── link.go ├── build.sh ├── build_linux64.sh ├── cert.pem ├── conf ├── app.ini ├── locale_en-US.ini └── locale_zh-CN.ini ├── key.pem ├── main.go ├── models └── models.go ├── static ├── css │ ├── base.css │ ├── bootstrap-theme.css │ ├── bootstrap.css │ ├── font-awesome-ie7.min.css │ ├── font-awesome.min.css │ ├── main.css │ ├── markdown.css │ ├── prettify.css │ └── select2.css ├── font │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── img │ ├── alipay.png │ ├── arrow left.svg │ ├── arrow right.svg │ ├── bg.jpg │ ├── brands │ │ ├── dockercn.png │ │ ├── gocms.png │ │ ├── gogs.png │ │ ├── golang-china.png │ │ ├── golanghome.png │ │ ├── revelhat.png │ │ ├── sudochina.jpg │ │ ├── yougam.png │ │ └── yunduo.png │ ├── community │ │ ├── IRC.png │ │ ├── github.png │ │ ├── google-groups.png │ │ ├── stackoverflow.png │ │ └── twitter.png │ ├── favicon.png │ ├── footer-links.png │ ├── fork-us-on-github.png │ └── website-footer.svg └── js │ ├── admin.js │ ├── bootstrap.js │ ├── editor.js │ ├── highlight.pack.js │ ├── html5shiv.js │ ├── imagesloaded.pkgd.min.js │ ├── jRespond.min.js │ ├── jStorage.js │ ├── jquery.clingify.min.js │ ├── jquery.extend.js │ ├── jquery.jpanelmenu.min.js │ ├── jquery.min.js │ ├── lib.min.js │ ├── main.js │ ├── masonry.pkgd.min.js │ ├── prettify.js │ └── respond.min.js └── templates ├── about.html ├── base ├── disqus.html ├── footer.html ├── head.html └── navbar.html ├── docs.html ├── donate.html ├── home.html └── link.html /.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.exe~ 3 | website 4 | .DS_Store 5 | /blog 6 | /products 7 | docTree.json 8 | blogTree.json 9 | productTree.json 10 | /log 11 | *.go~ 12 | conf/custom.ini 13 | output* 14 | docs 15 | *.log 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Xorm Web 2 | ======= 3 | 4 | An open source project for Xorm official website. 5 | 6 | ## License 7 | 8 | Xorm Web is under BSD License. See the [LICENSE](LICENSE) file for the full license text. -------------------------------------------------------------------------------- /actions/base.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Beego Web authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | // Package routers implemented controller methods of beego. 16 | package actions 17 | 18 | import ( 19 | "strings" 20 | "time" 21 | 22 | "github.com/Unknwon/i18n" 23 | "github.com/go-xweb/xweb" 24 | ) 25 | 26 | var langTypes []*langType // Languages are supported. 27 | 28 | // langType represents a language type. 29 | type langType struct { 30 | Lang, Name string 31 | } 32 | 33 | // baseRouter implemented global settings for all other routers. 34 | type baseAction struct { 35 | *xweb.Action 36 | i18n.Locale 37 | 38 | start time.Time 39 | } 40 | 41 | // Prepare implemented Prepare method for baseRouter. 42 | func (this *baseAction) Init() { 43 | this.start = time.Now() 44 | 45 | // Setting properties. 46 | this.AddTmplVars(&xweb.T{ 47 | "PageStartTime": time.Now(), 48 | "loadtimes": func() int64 { 49 | return int64(time.Now().Sub(this.start) / time.Millisecond) 50 | }, 51 | }) 52 | 53 | // Redirect to make URL clean. 54 | if this.setLangVer() { 55 | i := strings.Index(this.Request.RequestURI, "?") 56 | this.Redirect(this.Request.RequestURI[:i], 302) 57 | return 58 | } 59 | } 60 | 61 | // setLangVer sets site language version. 62 | func (this *baseAction) setLangVer() bool { 63 | isNeedRedir := false 64 | hasCookie := false 65 | 66 | // 1. Check URL arguments. 67 | lang := this.GetString("lang") 68 | 69 | // 2. Get language information from cookies. 70 | if len(lang) == 0 { 71 | cookie, _ := this.GetCookie("lang") 72 | if cookie != nil { 73 | lang = cookie.Value 74 | hasCookie = true 75 | } 76 | } else { 77 | isNeedRedir = true 78 | } 79 | 80 | // Check again in case someone modify by purpose. 81 | if !i18n.IsExist(lang) { 82 | lang = "" 83 | isNeedRedir = false 84 | hasCookie = false 85 | } 86 | 87 | // 3. Get language information from 'Accept-Language'. 88 | if len(lang) == 0 { 89 | al := this.Request.Header.Get("Accept-Language") 90 | if len(al) > 4 { 91 | al = al[:5] // Only compare first 5 letters. 92 | if i18n.IsExist(al) { 93 | lang = al 94 | } 95 | } 96 | } 97 | 98 | // 4. Default language is English. 99 | if len(lang) == 0 { 100 | lang = "en-US" 101 | isNeedRedir = false 102 | } 103 | 104 | curLang := langType{ 105 | Lang: lang, 106 | } 107 | 108 | // Save language information in cookies. 109 | if !hasCookie { 110 | cookie := xweb.NewCookie("lang", curLang.Lang, 1<<31-1) 111 | this.SetCookie(cookie) 112 | } 113 | 114 | restLangs := make([]*langType, 0, len(langTypes)-1) 115 | for _, v := range langTypes { 116 | if lang != v.Lang { 117 | restLangs = append(restLangs, v) 118 | } else { 119 | curLang.Name = v.Name 120 | } 121 | } 122 | 123 | // Set language properties. 124 | this.AddTmplVars(&xweb.T{ 125 | "Lang": curLang.Lang, 126 | "CurLang": curLang.Name, 127 | "RestLangs": restLangs, 128 | }) 129 | this.Lang = lang 130 | 131 | return isNeedRedir 132 | } 133 | -------------------------------------------------------------------------------- /actions/docs.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/go-xweb/xweb" 7 | ) 8 | 9 | // DocsRouter serves about page. 10 | type DocsAction struct { 11 | baseAction 12 | 13 | get xweb.Mapper `xweb:"/"` 14 | } 15 | 16 | func toLower(l string) string { 17 | return strings.ToLower(l) 18 | } 19 | 20 | // Get implemented Get method for DocsRouter. 21 | func (this *DocsAction) Get() error { 22 | return this.Render("docs.html", &xweb.T{ 23 | "IsDocs": true, 24 | "toLower": toLower, 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /actions/home.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import "github.com/go-xweb/xweb" 4 | 5 | type HomeAction struct { 6 | baseAction 7 | 8 | get xweb.Mapper `xweb:"/"` 9 | about xweb.Mapper 10 | team xweb.Mapper 11 | quickStart xweb.Mapper 12 | donate xweb.Mapper 13 | } 14 | 15 | // Get implemented Get method for HomeRouter. 16 | func (this *HomeAction) Get() error { 17 | return this.Render("home.html", &xweb.T{ 18 | "IsHome": true, 19 | }) 20 | } 21 | 22 | func (this *HomeAction) About() error { 23 | return this.Render("about.html", &xweb.T{ 24 | "IsAbout": true, 25 | "Section": "about", 26 | }) 27 | } 28 | 29 | func (this *HomeAction) Team() error { 30 | return this.Render("team.html", &xweb.T{ 31 | "IsTeam": true, 32 | "Section": "team", 33 | }) 34 | 35 | } 36 | 37 | func (this *HomeAction) Donate() error { 38 | return this.Render("donate.html", &xweb.T{ 39 | "IsDonate": true, 40 | "IsHasMarkdown": true, 41 | }) 42 | } 43 | -------------------------------------------------------------------------------- /actions/init.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "errors" 5 | "path/filepath" 6 | "strings" 7 | "time" 8 | "github.com/howeyc/fsnotify" 9 | 10 | "github.com/Unknwon/i18n" 11 | "github.com/go-xweb/log" 12 | "github.com/go-xweb/xweb" 13 | 14 | "github.com/go-xorm/website/models" 15 | ) 16 | 17 | var ( 18 | CompressConfPath = "conf/compress.json" 19 | ) 20 | 21 | func initLocales() { 22 | // Initialized language type list. 23 | langs := strings.Split(models.Cfg.MustValue("lang", "types"), "|") 24 | names := strings.Split(models.Cfg.MustValue("lang", "names"), "|") 25 | langTypes = make([]*langType, 0, len(langs)) 26 | for i, v := range langs { 27 | langTypes = append(langTypes, &langType{ 28 | Lang: v, 29 | Name: names[i], 30 | }) 31 | } 32 | 33 | for _, lang := range langs { 34 | log.Debug("Loading language: " + lang) 35 | if err := i18n.SetMessage(lang, "conf/"+"locale_"+lang+".ini"); err != nil { 36 | log.Error("Fail to set message file: " + err.Error()) 37 | return 38 | } 39 | } 40 | } 41 | 42 | func dict(values ...interface{}) (map[string]interface{}, error) { 43 | if len(values)%2 != 0 { 44 | return nil, errors.New("invalid dict call") 45 | } 46 | dict := make(map[string]interface{}, len(values)/2) 47 | for i := 0; i < len(values); i += 2 { 48 | key, ok := values[i].(string) 49 | if !ok { 50 | return nil, errors.New("dict keys must be strings") 51 | } 52 | dict[key] = values[i+1] 53 | } 54 | return dict, nil 55 | } 56 | 57 | func loadtimes(t time.Time) int { 58 | return int(time.Now().Sub(t).Nanoseconds() / 1e6) 59 | } 60 | 61 | func initTemplates() { 62 | xweb.AddTmplVars(&xweb.T{ 63 | "dict": dict, 64 | "loadtimes": loadtimes, 65 | }) 66 | } 67 | 68 | func InitApp() { 69 | initTemplates() 70 | initLocales() 71 | 72 | watcher, err := fsnotify.NewWatcher() 73 | if err != nil { 74 | panic("Failed start app watcher: " + err.Error()) 75 | } 76 | 77 | go func() { 78 | for { 79 | select { 80 | case event := <-watcher.Event: 81 | switch filepath.Ext(event.Name) { 82 | case ".ini": 83 | log.Info(event) 84 | 85 | if err := i18n.ReloadLangs(); err != nil { 86 | log.Error("Conf Reload: ", err) 87 | } 88 | 89 | log.Info("Config Reloaded") 90 | 91 | case ".json": 92 | if event.Name == CompressConfPath { 93 | log.Info("Beego Compress Reloaded") 94 | } 95 | } 96 | } 97 | } 98 | }() 99 | 100 | if err := watcher.WatchFlags("conf", fsnotify.FSN_MODIFY); err != nil { 101 | log.Error(err) 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /actions/link.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/go-xweb/xweb" 5 | ) 6 | 7 | type LinkAction struct { 8 | baseAction 9 | 10 | get xweb.Mapper `xweb:"/"` 11 | } 12 | 13 | func (l *LinkAction) Get() error { 14 | return l.Render("link.html", &xweb.T{ 15 | "IsLink": true, 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | rm -rf output 2 | mkdir output 3 | go build 4 | chmod +x website 5 | mv website ./output/ 6 | cp -r ./static/ ./output/static/ 7 | cp -r ./templates/ ./output/templates/ 8 | cp -r ./conf/ ./output/conf/ 9 | -------------------------------------------------------------------------------- /build_linux64.sh: -------------------------------------------------------------------------------- 1 | rm -rf output_linux_64 2 | mkdir output_linux_64 3 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build 4 | chmod +x website 5 | mv website ./output_linux_64/ 6 | cp -r ./static/ ./output_linux_64/static/ 7 | cp -r ./templates/ ./output_linux_64/templates/ 8 | cp -r ./conf/ ./output_linux_64/conf/ 9 | -------------------------------------------------------------------------------- /cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICyjCCAjOgAwIBAgIJANHaGqH7d/6xMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNV 3 | BAYTAkNOMREwDwYDVQQIDAhTaGFuZ2hhaTERMA8GA1UEBwwIU2hhbmdoYWkxEDAO 4 | BgNVBAoMB0dvZGFpbHkxEjAQBgNVBAMMCWxvY2FsaG9zdDEjMCEGCSqGSIb3DQEJ 5 | ARYUeGlhb2x1bndlbkBnbWFpbC5jb20wHhcNMTQwNDA1MDcyNTQxWhcNMTQwNTA1 6 | MDcyNTQxWjB+MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhbmdoYWkxETAPBgNV 7 | BAcMCFNoYW5naGFpMRAwDgYDVQQKDAdHb2RhaWx5MRIwEAYDVQQDDAlsb2NhbGhv 8 | c3QxIzAhBgkqhkiG9w0BCQEWFHhpYW9sdW53ZW5AZ21haWwuY29tMIGfMA0GCSqG 9 | SIb3DQEBAQUAA4GNADCBiQKBgQDHPp33HsQUaLKDigIhVQT1voIZ3da8mIiLLnUz 10 | yj45543Jee8bN6N2E/MTew4EPkOJYtkFv+amjm7yswGOo4GSIf+PP4jiwntBkMT5 11 | vSAc9+BDCHUgfNxqjX22QEiRADzms8aKnWEjbk9FdOzNrnSNJeZZEqsDQSj6aYeR 12 | R63kEQIDAQABo1AwTjAdBgNVHQ4EFgQUddhMguW9igPna8kXKvUIuKFwld8wHwYD 13 | VR0jBBgwFoAUddhMguW9igPna8kXKvUIuKFwld8wDAYDVR0TBAUwAwEB/zANBgkq 14 | hkiG9w0BAQUFAAOBgQCOfRf9krV+f58gCzFCBifJSxMVwzmXGYdGrQPInduPLwRl 15 | uXU4G4i7z5wvnpHJAgQEi8SEK1QdlWBlJas289/vQB0Q7cw4+G+dENygf8V4WokI 16 | 91nGqg7gUUcg2kYdx/Pwlqy4wU8W6lYzNxDKQFtDgPzJ5RqkGdQ41Zk2rZ8mDw== 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /conf/app.ini: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Xorm Web 3 | run_mode = dev 4 | http_port = 8091 5 | ssl = false 6 | 7 | [lang] 8 | types = en-US|zh-CN 9 | names = English|简体中文 10 | 11 | [github] 12 | client_id = 13 | client_secret = 14 | -------------------------------------------------------------------------------- /conf/locale_en-US.ini: -------------------------------------------------------------------------------- 1 | enable_js_prompt = Please enable JavaScript in your browser! 2 | app_intro = Simple & Powerful ORM Framework for Go Programming Language 3 | app_fullintro = Xorm is a simple & powerful ORM framework for Go Programming Language 4 | 5 | homepage = Homepage 6 | home = Home 7 | about = About 8 | team = Team 9 | community = Community 10 | link = Links 11 | getting started = Getting started 12 | docs = Documentation 13 | blog = Blog 14 | blog_url = github.com/go-xorm/xorm 15 | copyright = Copyright 16 | 17 | zh-CN = 简体中文 18 | en-US = English 19 | 20 | learn more = Learn more 21 | try_now = Contributing 22 | latest news = Latest news: 23 | 24 | app_license = Under the MIT licence. 25 | lang option = Language: 26 | current_lang = Language: 27 | 28 | improve doc on github = Improve this page on GitHub 29 | add use case = Add your use case 30 | 31 | [home] 32 | 33 | gogs_desc = Simple & Powerful ORM Framework for Go Programming Language 34 | quick_start = Quick Start 35 | further_reading = Driver Supports 36 | features = Features 37 | who_are_use = Well-known Customers 38 | friends = Friend Sites -------------------------------------------------------------------------------- /conf/locale_zh-CN.ini: -------------------------------------------------------------------------------- 1 | enable_js_prompt = 请启用您浏览器的 JavaScript 选项! 2 | app_intro = 简单而强大的 Go 语言ORM框架 3 | app_fullintro = Xorm 是一个简单而强大的 Go 语言 ORM 框架 4 | 5 | homepage = 首页 6 | home = 首页 7 | about = 关于 8 | team = 团队 9 | community = 开发者社区 10 | link = 文章 11 | getting started = 快速入门 12 | docs = 使用手册 13 | blog = 官方博客 14 | blog_url = blog.xorm.io 15 | copyright = 版权所有 16 | 17 | zh-CN = 简体中文 18 | en-US = English 19 | 20 | learn more = 了解更多 21 | try_now = 参与社区 22 | latest news = 最近新闻: 23 | 24 | app_license = 授权许可遵循 BSD licence 25 | lang option = 语言选项: 26 | current_lang = 当前语言: 27 | 28 | improve doc on github = 到 GitHub 上改进本页面 29 | add use case = 增加您的使用案例 30 | 31 | Documentation = 开发者文档 32 | 33 | [home] 34 | 35 | gogs_desc = 一个简单而强大的 Go 语言 ORM 框架 36 | quick_start = 快速开始 37 | further_reading = 驱动支持 38 | features = 产品优势 39 | who_are_use = 知名 Xorm 用户 40 | friends = 友情链接 -------------------------------------------------------------------------------- /key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQDHPp33HsQUaLKDigIhVQT1voIZ3da8mIiLLnUzyj45543Jee8b 3 | N6N2E/MTew4EPkOJYtkFv+amjm7yswGOo4GSIf+PP4jiwntBkMT5vSAc9+BDCHUg 4 | fNxqjX22QEiRADzms8aKnWEjbk9FdOzNrnSNJeZZEqsDQSj6aYeRR63kEQIDAQAB 5 | AoGAQ9zuDOervY/Tjb4J77R3lgQnaAwJQf9qMo3GWbd+7lYSExe2+zw+Ls+osW/u 6 | XD+g3UCPzseIFh7ZZ0zVMPI8BSIM3K23hsPjZOqsSFTOxIdLq0yALZBFfM8/Kiu6 7 | QqdbWFNX/SkmEFCZplpIz7lw4u2agUA2rihp7hkEcqeq1AECQQDs5xo4KuTiVVp/ 8 | LFkDxNqH86cqeN/i7z045lDuVCar6oomd03rm1sytTARzwUmaz9E0Q7jqZPzWML0 9 | cUOnUQ4xAkEA105fqvOas+C3IS37bWwgNuaL8mfB5F4ywhHuloIvRV3nCaufIIV5 10 | Ec+haxuma9Eas32qlGNTYIdon5sofXVb4QJBANK6X6BGx4Js2ir1j9jCaoE0QyaM 11 | jtqWZKcQeD0Hrb6OyoSc6zsA3oaklTXCKJqcG5NjQxNP7MMx2XkGp19VwoECQCTS 12 | Ono5/xMUMz1xZ7Zm73t0Iirqo7Yyheu6tVr4GK18Sa7VsvkU2oe5QpnWuLdno3Fe 13 | 5HVMJ04y2imxl1MdZwECQBOOJ0YquSSpv5kQxJmd6AaE66sptouIMH+AL/XukYxP 14 | H5drH2NPMna8M8LX2agONAzqX3KSxsN86ocPYc3R9lA= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "runtime" 8 | "strings" 9 | 10 | "github.com/Unknwon/i18n" 11 | "github.com/go-xweb/log" 12 | "github.com/go-xweb/xweb" 13 | 14 | "github.com/go-xorm/website/actions" 15 | "github.com/go-xorm/website/models" 16 | ) 17 | 18 | const ( 19 | APP_VER = "0.4.0213" 20 | ) 21 | 22 | func main() { 23 | defer func() { 24 | if res := recover(); res != nil { 25 | content := fmt.Sprintf("Crashed with error: %v", res) 26 | for i := 1; ; i += 1 { 27 | _, file, line, ok := runtime.Caller(i) 28 | if !ok { 29 | break 30 | } else { 31 | content += "\n" 32 | } 33 | content += fmt.Sprintf("%v %v", file, line) 34 | } 35 | 36 | fmt.Println(content) 37 | } 38 | }() 39 | 40 | models.InitModels() 41 | 42 | mode, _ := models.Cfg.GetValue("app", "run_mode") 43 | var isPro bool = true 44 | if mode == "dev" { 45 | log.SetOutputLevel(log.Ldebug) 46 | isPro = false 47 | } 48 | log.Info("run in " + mode + " mode") 49 | f, err := os.Create("./website.log") 50 | if err != nil { 51 | fmt.Println(err) 52 | return 53 | } 54 | 55 | log.SetOutput(io.MultiWriter(f, os.Stdout)) 56 | xweb.SetLogger(log.Std) 57 | 58 | actions.InitApp() 59 | 60 | // Register routers. 61 | xweb.AddAction(&actions.HomeAction{}) 62 | xweb.AutoAction(&actions.DocsAction{}, &actions.LinkAction{}) 63 | xweb.AddTmplVars(&xweb.T{ 64 | "i18n": i18n.Tr, 65 | "IsPro": isPro, 66 | "AppVer": APP_VER, 67 | "XwebVer": xweb.Version, 68 | "GoVer": strings.Trim(runtime.Version(), "go"), 69 | }) 70 | port, _ := models.Cfg.GetValue("app", "http_port") 71 | usessl, _ := models.Cfg.GetValue("app", "ssl") 72 | if usessl == "true" { 73 | tlsCfg, _ := xweb.SimpleTLSConfig("cert.pem", "key.pem") 74 | xweb.RunTLS(fmt.Sprintf(":%v", port), tlsCfg) 75 | } else { 76 | xweb.Run(fmt.Sprintf(":%v", port)) 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /models/models.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "errors" 5 | "os" 6 | 7 | "github.com/Unknwon/com" 8 | "github.com/Unknwon/goconfig" 9 | "github.com/go-xweb/log" 10 | "github.com/slene/blackfriday" 11 | ) 12 | 13 | const ( 14 | _CFG_PATH = "conf/app.ini" 15 | _CFG_CUSTOM_PATH = "conf/custom.ini" 16 | ) 17 | 18 | var ( 19 | Cfg *goconfig.ConfigFile 20 | ) 21 | 22 | func InitModels() { 23 | var err error 24 | Cfg, err = goconfig.LoadConfigFile(_CFG_PATH) 25 | if err != nil { 26 | log.Fatalf("Fail to load config file(%s): %v", _CFG_PATH, err) 27 | } 28 | if com.IsFile(_CFG_CUSTOM_PATH) { 29 | if err = Cfg.AppendFiles(_CFG_CUSTOM_PATH); err != nil { 30 | log.Fatalf("Fail to load config file(%s): %v", _CFG_CUSTOM_PATH, err) 31 | } 32 | } 33 | } 34 | 35 | // loadFile returns []byte of file data by given path. 36 | func loadFile(filePath string) ([]byte, error) { 37 | f, err := os.Open(filePath) 38 | if err != nil { 39 | return []byte(""), errors.New("Fail to open file: " + err.Error()) 40 | } 41 | 42 | fi, err := f.Stat() 43 | if err != nil { 44 | return []byte(""), errors.New("Fail to get file information: " + err.Error()) 45 | } 46 | 47 | d := make([]byte, fi.Size()) 48 | f.Read(d) 49 | return d, nil 50 | } 51 | 52 | func markdown(raw []byte) []byte { 53 | htmlFlags := 0 54 | htmlFlags |= blackfriday.HTML_USE_XHTML 55 | htmlFlags |= blackfriday.HTML_USE_SMARTYPANTS 56 | htmlFlags |= blackfriday.HTML_SMARTYPANTS_FRACTIONS 57 | htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES 58 | htmlFlags |= blackfriday.HTML_GITHUB_BLOCKCODE 59 | htmlFlags |= blackfriday.HTML_OMIT_CONTENTS 60 | htmlFlags |= blackfriday.HTML_COMPLETE_PAGE 61 | renderer := blackfriday.HtmlRenderer(htmlFlags, "", "") 62 | 63 | // set up the parser 64 | extensions := 0 65 | extensions |= blackfriday.EXTENSION_NO_INTRA_EMPHASIS 66 | extensions |= blackfriday.EXTENSION_TABLES 67 | extensions |= blackfriday.EXTENSION_FENCED_CODE 68 | extensions |= blackfriday.EXTENSION_AUTOLINK 69 | extensions |= blackfriday.EXTENSION_STRIKETHROUGH 70 | extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK 71 | extensions |= blackfriday.EXTENSION_SPACE_HEADERS 72 | extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK 73 | 74 | body := blackfriday.Markdown(raw, renderer, extensions) 75 | return body 76 | } 77 | -------------------------------------------------------------------------------- /static/css/base.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | } 4 | 5 | body { 6 | font-size: 14px; 7 | background-color: #f5f5f5; 8 | } 9 | 10 | body, 11 | h1, 12 | h2, 13 | h3, 14 | h4, 15 | h5, 16 | h6, 17 | .h1, 18 | .h2, 19 | .h3, 20 | .h4, 21 | .h5, 22 | .h6 { 23 | font-family: "ff-tisa-web-pro-1","ff-tisa-web-pro-2","Helvetica Neue",Helvetica,"Lucida Grande","Hiragino Sans GB","Microsoft YaHei", \5fae\8f6f\96c5\9ed1,"WenQuanYi Micro Hei",sans-serif; 24 | } 25 | 26 | label { 27 | cursor: pointer; 28 | } 29 | 30 | textarea, 31 | textarea.form-control { 32 | padding: 10px; 33 | } 34 | 35 | .navbar { 36 | font-size: 16px; 37 | } 38 | 39 | .navbar .logo img { 40 | height: 32px; 41 | margin: 8px 15px 0 10px; 42 | } 43 | 44 | .navbar .navbar-menu li.has-icon > a { 45 | width: 35px; 46 | padding: 0; 47 | } 48 | 49 | .navbar .navbar-menu li.has-icon .icon { 50 | font-size: 20px; 51 | line-height: 40px; 52 | height: 40px; 53 | margin-left: 10px; 54 | } 55 | 56 | .navbar .navbar-menu .avatar > a { 57 | display: block; 58 | padding: 3px; 59 | } 60 | 61 | .navbar .navbar-menu .avatar > a > img { 62 | width: 34px; 63 | height: 34px; 64 | padding: 2px; 65 | border: 2px solid #e6e6e6; 66 | display: block; 67 | background-color: #eee; 68 | } 69 | 70 | #main { 71 | padding-top: 51px; 72 | } 73 | 74 | #wrapper { 75 | min-height: 100% !important; 76 | height: auto !important; 77 | height: 100%; 78 | margin: 0 auto -165px; 79 | } 80 | 81 | #wrapper .wrapper-push { 82 | height: 165px; 83 | } 84 | 85 | #content .box, 86 | #sidebar .box { 87 | margin-bottom: 10px 88 | } 89 | 90 | /* footer */ 91 | #footer { 92 | background: #fff; 93 | -webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05); 94 | box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);; 95 | margin-top: 65px; 96 | } 97 | 98 | #footer .footer-wrap { 99 | padding: 20px 0; 100 | } 101 | 102 | #footer .desc { 103 | color: #ababab; 104 | } 105 | 106 | /* box */ 107 | .box { 108 | background-color: #fafafa; 109 | border-bottom: 1px solid #e2e2e2; 110 | border-radius: 3px; 111 | -webkit-box-shadow: 1px 0 4px rgba(0, 0, 0, 0.20); 112 | box-shadow: 1px 0 4px rgba(0, 0, 0, 0.20); 113 | } 114 | 115 | .box.nobg { 116 | background: none; 117 | border: none; 118 | -webkit-box-shadow: none; 119 | box-shadow: none; 120 | } 121 | 122 | .cell { 123 | padding: 10px 10px; 124 | border-top: 2px solid #fff; 125 | border-bottom: 1px solid #e2e2e2; 126 | } 127 | 128 | .cell.first { 129 | border-top-left-radius: 3px; 130 | border-top-right-radius: 3px; 131 | } 132 | 133 | .cell.last { 134 | border-bottom-left-radius: 3px; 135 | border-bottom-right-radius: 3px; 136 | } 137 | 138 | .cell.slim { 139 | padding-right: 25px; 140 | padding-left: 25px; 141 | } 142 | 143 | .cell.low { 144 | padding-top: 5px; 145 | padding-bottom: 5px; 146 | } 147 | 148 | /* pager */ 149 | 150 | .box .pagination, 151 | .box .pager { 152 | margin: 0; 153 | } 154 | 155 | .pager .pager-nums { 156 | line-height: 30px; 157 | } 158 | 159 | /* avatar */ 160 | .avatar img { 161 | border-radius: 3px; 162 | width: 48px; 163 | height: 48px; 164 | } 165 | 166 | .avatar a { 167 | text-decoration: none; 168 | } 169 | 170 | .avatar img.large { 171 | width: 64px; 172 | height: 64px; 173 | } 174 | 175 | .avatar img.middle { 176 | width: 32px; 177 | height: 32px; 178 | } 179 | 180 | .avatar img.small { 181 | width: 16px; 182 | height: 16px; 183 | } 184 | 185 | /* breadcrumb */ 186 | .breadcrumb { 187 | font-size: 14px; 188 | background-color: #f3f3f3; 189 | color: #666; 190 | } 191 | 192 | .breadcrumb .icon { 193 | font-size: 16px; 194 | } 195 | 196 | .breadcrumb .divider { 197 | font-size: 14px; 198 | font-weight: bold; 199 | padding: 0 5px; 200 | margin: 0 5px; 201 | } 202 | 203 | /* btn-checked */ 204 | .btn-checked, 205 | .btn-checked:hover, 206 | .btn-checked:focus { 207 | margin-top: -3px; 208 | margin-right: 8px; 209 | color: #ccc; 210 | } 211 | 212 | .btn-checked.active { 213 | color: #000; 214 | } 215 | 216 | /* dropdown-menu */ 217 | .dropdown-menu > li > a:focus { 218 | color: rgb(255, 255, 255); 219 | background-color: rgb(0, 131, 174); 220 | background-image: linear-gradient(to bottom, rgb(0, 139, 184), rgb(0, 120, 159)); 221 | } 222 | .dropdown-menu > li > a:hover { 223 | color: rgb(255, 255, 255); 224 | background-color: rgb(0, 131, 174); 225 | background-image: linear-gradient(to bottom, rgb(0, 139, 184), rgb(0, 120, 159)); 226 | } 227 | 228 | /* form help block */ 229 | .help-block { 230 | margin-left: 5px; 231 | } 232 | 233 | /* form error block */ 234 | .form-group .error-block { 235 | z-index: -1; 236 | display: none; 237 | } 238 | 239 | .form-group.has-error .error-block, 240 | .form-group.has-warning .error-block { 241 | display: inline-block; 242 | padding: 3px 5px; 243 | font-size: 12px; 244 | margin: 0 5px; 245 | color: #b94a48; 246 | border-bottom-left-radius: 3px; 247 | border-bottom-right-radius: 3px; 248 | background-color: #f2dede; 249 | border: 1px solid #c09853; 250 | border-top: none; 251 | } 252 | 253 | .form-group.has-warning .error-block { 254 | background-color: #EFC994; 255 | border: 1px solid #eea236; 256 | border-top: none; 257 | } 258 | 259 | .error-block .btn { 260 | margin-top: 2px; 261 | } 262 | 263 | h1.underline, 264 | h2.underline, 265 | h3.underline, 266 | h4.underline, 267 | h5.underline, 268 | h6.underline { 269 | padding: 0 0 15px; 270 | margin-bottom: 20px; 271 | border-bottom: 1px solid #ccc; 272 | } 273 | 274 | .alert.alert-small { 275 | padding: 8px 10px; 276 | margin-bottom: 15px; 277 | } 278 | 279 | .color-checked { 280 | color: #02A779; 281 | } 282 | 283 | .color-orange { 284 | color: #F3813A; 285 | } 286 | 287 | .color-red { 288 | color: #F24A39; 289 | } 290 | 291 | a.color-link, 292 | .color-link a, 293 | a.color-link-hover:hover { 294 | color: #2892BC; 295 | } 296 | 297 | a.color-link:hover, 298 | .color-link a:hover { 299 | color: #146B8E; 300 | } 301 | 302 | .btn.disabled:active, 303 | .btn.disabled:focus, 304 | .btn.disabled:hover, 305 | .btn.disabled { 306 | background-image: none; 307 | background-color: #ddd; 308 | } 309 | 310 | /* dropdown login */ 311 | #dropdown-login { 312 | width: 280px; 313 | } 314 | -------------------------------------------------------------------------------- /static/css/bootstrap-theme.css: -------------------------------------------------------------------------------- 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 | 7 | .btn-default, 8 | .btn-primary, 9 | .btn-success, 10 | .btn-info, 11 | .btn-warning, 12 | .btn-danger { 13 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); 14 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 15 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 16 | } 17 | .btn-default:active, 18 | .btn-primary:active, 19 | .btn-success:active, 20 | .btn-info:active, 21 | .btn-warning:active, 22 | .btn-danger:active, 23 | .btn-default.active, 24 | .btn-primary.active, 25 | .btn-success.active, 26 | .btn-info.active, 27 | .btn-warning.active, 28 | .btn-danger.active { 29 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 30 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 31 | } 32 | .btn:active, 33 | .btn.active { 34 | background-image: none; 35 | } 36 | .btn-default { 37 | text-shadow: 0 1px 0 #fff; 38 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 39 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 40 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 41 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 42 | background-repeat: repeat-x; 43 | border-color: #dbdbdb; 44 | border-color: #ccc; 45 | } 46 | .btn-default:hover, 47 | .btn-default:focus { 48 | background-color: #e0e0e0; 49 | background-position: 0 -15px; 50 | } 51 | .btn-default:active, 52 | .btn-default.active { 53 | background-color: #e0e0e0; 54 | border-color: #dbdbdb; 55 | } 56 | .btn-primary { 57 | background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); 58 | background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); 59 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); 60 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 61 | background-repeat: repeat-x; 62 | border-color: #2b669a; 63 | } 64 | .btn-primary:hover, 65 | .btn-primary:focus { 66 | background-color: #2d6ca2; 67 | background-position: 0 -15px; 68 | } 69 | .btn-primary:active, 70 | .btn-primary.active { 71 | background-color: #2d6ca2; 72 | border-color: #2b669a; 73 | } 74 | .btn-success { 75 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 76 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 77 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 78 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 79 | background-repeat: repeat-x; 80 | border-color: #3e8f3e; 81 | } 82 | .btn-success:hover, 83 | .btn-success:focus { 84 | background-color: #419641; 85 | background-position: 0 -15px; 86 | } 87 | .btn-success:active, 88 | .btn-success.active { 89 | background-color: #419641; 90 | border-color: #3e8f3e; 91 | } 92 | .btn-info { 93 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 94 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 95 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 96 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 97 | background-repeat: repeat-x; 98 | border-color: #28a4c9; 99 | } 100 | .btn-info:hover, 101 | .btn-info:focus { 102 | background-color: #2aabd2; 103 | background-position: 0 -15px; 104 | } 105 | .btn-info:active, 106 | .btn-info.active { 107 | background-color: #2aabd2; 108 | border-color: #28a4c9; 109 | } 110 | .btn-warning { 111 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 112 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 113 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 114 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 115 | background-repeat: repeat-x; 116 | border-color: #e38d13; 117 | } 118 | .btn-warning:hover, 119 | .btn-warning:focus { 120 | background-color: #eb9316; 121 | background-position: 0 -15px; 122 | } 123 | .btn-warning:active, 124 | .btn-warning.active { 125 | background-color: #eb9316; 126 | border-color: #e38d13; 127 | } 128 | .btn-danger { 129 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 130 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 131 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 132 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 133 | background-repeat: repeat-x; 134 | border-color: #b92c28; 135 | } 136 | .btn-danger:hover, 137 | .btn-danger:focus { 138 | background-color: #c12e2a; 139 | background-position: 0 -15px; 140 | } 141 | .btn-danger:active, 142 | .btn-danger.active { 143 | background-color: #c12e2a; 144 | border-color: #b92c28; 145 | } 146 | .thumbnail, 147 | .img-thumbnail { 148 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 149 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 150 | } 151 | .dropdown-menu > li > a:hover, 152 | .dropdown-menu > li > a:focus { 153 | background-color: #e8e8e8; 154 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 155 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 156 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 157 | background-repeat: repeat-x; 158 | } 159 | .dropdown-menu > .active > a, 160 | .dropdown-menu > .active > a:hover, 161 | .dropdown-menu > .active > a:focus { 162 | background-color: #357ebd; 163 | background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); 164 | background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); 165 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); 166 | background-repeat: repeat-x; 167 | } 168 | .navbar-default { 169 | background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); 170 | background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); 171 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 172 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 173 | background-repeat: repeat-x; 174 | border-radius: 4px; 175 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 176 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 177 | } 178 | .navbar-default .navbar-nav > .active > a { 179 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); 180 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); 181 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); 182 | background-repeat: repeat-x; 183 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 184 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 185 | } 186 | .navbar-brand, 187 | .navbar-nav > li > a { 188 | text-shadow: 0 1px 0 rgba(255, 255, 255, .25); 189 | } 190 | .navbar-inverse { 191 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 192 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 193 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 194 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 195 | background-repeat: repeat-x; 196 | } 197 | .navbar-inverse .navbar-nav > .active > a { 198 | background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); 199 | background-image: linear-gradient(to bottom, #222 0%, #282828 100%); 200 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); 201 | background-repeat: repeat-x; 202 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 203 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 204 | } 205 | .navbar-inverse .navbar-brand, 206 | .navbar-inverse .navbar-nav > li > a { 207 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); 208 | } 209 | .navbar-static-top, 210 | .navbar-fixed-top, 211 | .navbar-fixed-bottom { 212 | border-radius: 0; 213 | } 214 | .alert { 215 | text-shadow: 0 1px 0 rgba(255, 255, 255, .2); 216 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 217 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 218 | } 219 | .alert-success { 220 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 221 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 222 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 223 | background-repeat: repeat-x; 224 | border-color: #b2dba1; 225 | } 226 | .alert-info { 227 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 228 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 229 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 230 | background-repeat: repeat-x; 231 | border-color: #9acfea; 232 | } 233 | .alert-warning { 234 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 235 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 236 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 237 | background-repeat: repeat-x; 238 | border-color: #f5e79e; 239 | } 240 | .alert-danger { 241 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 242 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 243 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 244 | background-repeat: repeat-x; 245 | border-color: #dca7a7; 246 | } 247 | .progress { 248 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 249 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 250 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 251 | background-repeat: repeat-x; 252 | } 253 | .progress-bar { 254 | background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); 255 | background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); 256 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); 257 | background-repeat: repeat-x; 258 | } 259 | .progress-bar-success { 260 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 261 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 262 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 263 | background-repeat: repeat-x; 264 | } 265 | .progress-bar-info { 266 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 267 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 268 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 269 | background-repeat: repeat-x; 270 | } 271 | .progress-bar-warning { 272 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 273 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 274 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 275 | background-repeat: repeat-x; 276 | } 277 | .progress-bar-danger { 278 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 279 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 280 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 281 | background-repeat: repeat-x; 282 | } 283 | .list-group { 284 | border-radius: 4px; 285 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 286 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 287 | } 288 | .list-group-item.active, 289 | .list-group-item.active:hover, 290 | .list-group-item.active:focus { 291 | text-shadow: 0 -1px 0 #3071a9; 292 | background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); 293 | background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); 294 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); 295 | background-repeat: repeat-x; 296 | border-color: #3278b3; 297 | } 298 | .panel { 299 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 300 | box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 301 | } 302 | .panel-default > .panel-heading { 303 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 304 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 305 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 306 | background-repeat: repeat-x; 307 | } 308 | .panel-primary > .panel-heading { 309 | background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); 310 | background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); 311 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); 312 | background-repeat: repeat-x; 313 | } 314 | .panel-success > .panel-heading { 315 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 316 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 317 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 318 | background-repeat: repeat-x; 319 | } 320 | .panel-info > .panel-heading { 321 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 322 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 323 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 324 | background-repeat: repeat-x; 325 | } 326 | .panel-warning > .panel-heading { 327 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 328 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 329 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 330 | background-repeat: repeat-x; 331 | } 332 | .panel-danger > .panel-heading { 333 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 334 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 335 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 336 | background-repeat: repeat-x; 337 | } 338 | .well { 339 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 340 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 341 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 342 | background-repeat: repeat-x; 343 | border-color: #dcdcdc; 344 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 345 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 346 | } 347 | /*# sourceMappingURL=bootstrap-theme.css.map */ 348 | -------------------------------------------------------------------------------- /static/css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:'FontAwesome';src:url('/font/fontawesome-webfont.eot?v=3.2.1');src:url('/font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'),url('/font/fontawesome-webfont.woff?v=3.2.1') format('woff'),url('/font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'),url('/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');font-weight:normal;font-style:normal;}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;} 2 | [class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none;} 3 | .icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em;} 4 | a [class^="icon-"],a [class*=" icon-"]{display:inline;} 5 | [class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em;}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em;} 6 | .icons-ul{margin-left:2.142857142857143em;list-style-type:none;}.icons-ul>li{position:relative;} 7 | .icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit;} 8 | [class^="icon-"].hide,[class*=" icon-"].hide{display:none;} 9 | .icon-muted{color:#eeeeee;} 10 | .icon-light{color:#ffffff;} 11 | .icon-dark{color:#333333;} 12 | .icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} 13 | .icon-2x{font-size:2em;}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 14 | .icon-3x{font-size:3em;}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} 15 | .icon-4x{font-size:4em;}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} 16 | .icon-5x{font-size:5em;}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;} 17 | .pull-right{float:right;} 18 | .pull-left{float:left;} 19 | [class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em;} 20 | [class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em;} 21 | [class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0;} 22 | .icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none;} 23 | .btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em;} 24 | .btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block;} 25 | .nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em;} 26 | .btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em;} 27 | .btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em;} 28 | .btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em;} 29 | .btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;} 30 | .btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;} 31 | .btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;} 32 | .nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;} 33 | .icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;} 34 | .icon-stack .icon-stack-base{font-size:2em;*line-height:1em;} 35 | .icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;} 36 | a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none;} 37 | @-moz-keyframes spin{0%{-moz-transform:rotate(0deg);} 100%{-moz-transform:rotate(359deg);}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);} 100%{-webkit-transform:rotate(359deg);}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);} 100%{-o-transform:rotate(359deg);}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);} 100%{-ms-transform:rotate(359deg);}}@keyframes spin{0%{transform:rotate(0deg);} 100%{transform:rotate(359deg);}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);} 38 | .icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);} 39 | .icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);} 40 | .icon-flip-horizontal:before{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);} 41 | .icon-flip-vertical:before{-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1);} 42 | a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block;} 43 | .icon-glass:before{content:"\f000";} 44 | .icon-music:before{content:"\f001";} 45 | .icon-search:before{content:"\f002";} 46 | .icon-envelope-alt:before{content:"\f003";} 47 | .icon-heart:before{content:"\f004";} 48 | .icon-star:before{content:"\f005";} 49 | .icon-star-empty:before{content:"\f006";} 50 | .icon-user:before{content:"\f007";} 51 | .icon-film:before{content:"\f008";} 52 | .icon-th-large:before{content:"\f009";} 53 | .icon-th:before{content:"\f00a";} 54 | .icon-th-list:before{content:"\f00b";} 55 | .icon-ok:before{content:"\f00c";} 56 | .icon-remove:before{content:"\f00d";} 57 | .icon-zoom-in:before{content:"\f00e";} 58 | .icon-zoom-out:before{content:"\f010";} 59 | .icon-power-off:before,.icon-off:before{content:"\f011";} 60 | .icon-signal:before{content:"\f012";} 61 | .icon-gear:before,.icon-cog:before{content:"\f013";} 62 | .icon-trash:before{content:"\f014";} 63 | .icon-home:before{content:"\f015";} 64 | .icon-file-alt:before{content:"\f016";} 65 | .icon-time:before{content:"\f017";} 66 | .icon-road:before{content:"\f018";} 67 | .icon-download-alt:before{content:"\f019";} 68 | .icon-download:before{content:"\f01a";} 69 | .icon-upload:before{content:"\f01b";} 70 | .icon-inbox:before{content:"\f01c";} 71 | .icon-play-circle:before{content:"\f01d";} 72 | .icon-rotate-right:before,.icon-repeat:before{content:"\f01e";} 73 | .icon-refresh:before{content:"\f021";} 74 | .icon-list-alt:before{content:"\f022";} 75 | .icon-lock:before{content:"\f023";} 76 | .icon-flag:before{content:"\f024";} 77 | .icon-headphones:before{content:"\f025";} 78 | .icon-volume-off:before{content:"\f026";} 79 | .icon-volume-down:before{content:"\f027";} 80 | .icon-volume-up:before{content:"\f028";} 81 | .icon-qrcode:before{content:"\f029";} 82 | .icon-barcode:before{content:"\f02a";} 83 | .icon-tag:before{content:"\f02b";} 84 | .icon-tags:before{content:"\f02c";} 85 | .icon-book:before{content:"\f02d";} 86 | .icon-bookmark:before{content:"\f02e";} 87 | .icon-print:before{content:"\f02f";} 88 | .icon-camera:before{content:"\f030";} 89 | .icon-font:before{content:"\f031";} 90 | .icon-bold:before{content:"\f032";} 91 | .icon-italic:before{content:"\f033";} 92 | .icon-text-height:before{content:"\f034";} 93 | .icon-text-width:before{content:"\f035";} 94 | .icon-align-left:before{content:"\f036";} 95 | .icon-align-center:before{content:"\f037";} 96 | .icon-align-right:before{content:"\f038";} 97 | .icon-align-justify:before{content:"\f039";} 98 | .icon-list:before{content:"\f03a";} 99 | .icon-indent-left:before{content:"\f03b";} 100 | .icon-indent-right:before{content:"\f03c";} 101 | .icon-facetime-video:before{content:"\f03d";} 102 | .icon-picture:before{content:"\f03e";} 103 | .icon-pencil:before{content:"\f040";} 104 | .icon-map-marker:before{content:"\f041";} 105 | .icon-adjust:before{content:"\f042";} 106 | .icon-tint:before{content:"\f043";} 107 | .icon-edit:before{content:"\f044";} 108 | .icon-share:before{content:"\f045";} 109 | .icon-check:before{content:"\f046";} 110 | .icon-move:before{content:"\f047";} 111 | .icon-step-backward:before{content:"\f048";} 112 | .icon-fast-backward:before{content:"\f049";} 113 | .icon-backward:before{content:"\f04a";} 114 | .icon-play:before{content:"\f04b";} 115 | .icon-pause:before{content:"\f04c";} 116 | .icon-stop:before{content:"\f04d";} 117 | .icon-forward:before{content:"\f04e";} 118 | .icon-fast-forward:before{content:"\f050";} 119 | .icon-step-forward:before{content:"\f051";} 120 | .icon-eject:before{content:"\f052";} 121 | .icon-chevron-left:before{content:"\f053";} 122 | .icon-chevron-right:before{content:"\f054";} 123 | .icon-plus-sign:before{content:"\f055";} 124 | .icon-minus-sign:before{content:"\f056";} 125 | .icon-remove-sign:before{content:"\f057";} 126 | .icon-ok-sign:before{content:"\f058";} 127 | .icon-question-sign:before{content:"\f059";} 128 | .icon-info-sign:before{content:"\f05a";} 129 | .icon-screenshot:before{content:"\f05b";} 130 | .icon-remove-circle:before{content:"\f05c";} 131 | .icon-ok-circle:before{content:"\f05d";} 132 | .icon-ban-circle:before{content:"\f05e";} 133 | .icon-arrow-left:before{content:"\f060";} 134 | .icon-arrow-right:before{content:"\f061";} 135 | .icon-arrow-up:before{content:"\f062";} 136 | .icon-arrow-down:before{content:"\f063";} 137 | .icon-mail-forward:before,.icon-share-alt:before{content:"\f064";} 138 | .icon-resize-full:before{content:"\f065";} 139 | .icon-resize-small:before{content:"\f066";} 140 | .icon-plus:before{content:"\f067";} 141 | .icon-minus:before{content:"\f068";} 142 | .icon-asterisk:before{content:"\f069";} 143 | .icon-exclamation-sign:before{content:"\f06a";} 144 | .icon-gift:before{content:"\f06b";} 145 | .icon-leaf:before{content:"\f06c";} 146 | .icon-fire:before{content:"\f06d";} 147 | .icon-eye-open:before{content:"\f06e";} 148 | .icon-eye-close:before{content:"\f070";} 149 | .icon-warning-sign:before{content:"\f071";} 150 | .icon-plane:before{content:"\f072";} 151 | .icon-calendar:before{content:"\f073";} 152 | .icon-random:before{content:"\f074";} 153 | .icon-comment:before{content:"\f075";} 154 | .icon-magnet:before{content:"\f076";} 155 | .icon-chevron-up:before{content:"\f077";} 156 | .icon-chevron-down:before{content:"\f078";} 157 | .icon-retweet:before{content:"\f079";} 158 | .icon-shopping-cart:before{content:"\f07a";} 159 | .icon-folder-close:before{content:"\f07b";} 160 | .icon-folder-open:before{content:"\f07c";} 161 | .icon-resize-vertical:before{content:"\f07d";} 162 | .icon-resize-horizontal:before{content:"\f07e";} 163 | .icon-bar-chart:before{content:"\f080";} 164 | .icon-twitter-sign:before{content:"\f081";} 165 | .icon-facebook-sign:before{content:"\f082";} 166 | .icon-camera-retro:before{content:"\f083";} 167 | .icon-key:before{content:"\f084";} 168 | .icon-gears:before,.icon-cogs:before{content:"\f085";} 169 | .icon-comments:before{content:"\f086";} 170 | .icon-thumbs-up-alt:before{content:"\f087";} 171 | .icon-thumbs-down-alt:before{content:"\f088";} 172 | .icon-star-half:before{content:"\f089";} 173 | .icon-heart-empty:before{content:"\f08a";} 174 | .icon-signout:before{content:"\f08b";} 175 | .icon-linkedin-sign:before{content:"\f08c";} 176 | .icon-pushpin:before{content:"\f08d";} 177 | .icon-external-link:before{content:"\f08e";} 178 | .icon-signin:before{content:"\f090";} 179 | .icon-trophy:before{content:"\f091";} 180 | .icon-github-sign:before{content:"\f092";} 181 | .icon-upload-alt:before{content:"\f093";} 182 | .icon-lemon:before{content:"\f094";} 183 | .icon-phone:before{content:"\f095";} 184 | .icon-unchecked:before,.icon-check-empty:before{content:"\f096";} 185 | .icon-bookmark-empty:before{content:"\f097";} 186 | .icon-phone-sign:before{content:"\f098";} 187 | .icon-twitter:before{content:"\f099";} 188 | .icon-facebook:before{content:"\f09a";} 189 | .icon-github:before{content:"\f09b";} 190 | .icon-unlock:before{content:"\f09c";} 191 | .icon-credit-card:before{content:"\f09d";} 192 | .icon-rss:before{content:"\f09e";} 193 | .icon-hdd:before{content:"\f0a0";} 194 | .icon-bullhorn:before{content:"\f0a1";} 195 | .icon-bell:before{content:"\f0a2";} 196 | .icon-certificate:before{content:"\f0a3";} 197 | .icon-hand-right:before{content:"\f0a4";} 198 | .icon-hand-left:before{content:"\f0a5";} 199 | .icon-hand-up:before{content:"\f0a6";} 200 | .icon-hand-down:before{content:"\f0a7";} 201 | .icon-circle-arrow-left:before{content:"\f0a8";} 202 | .icon-circle-arrow-right:before{content:"\f0a9";} 203 | .icon-circle-arrow-up:before{content:"\f0aa";} 204 | .icon-circle-arrow-down:before{content:"\f0ab";} 205 | .icon-globe:before{content:"\f0ac";} 206 | .icon-wrench:before{content:"\f0ad";} 207 | .icon-tasks:before{content:"\f0ae";} 208 | .icon-filter:before{content:"\f0b0";} 209 | .icon-briefcase:before{content:"\f0b1";} 210 | .icon-fullscreen:before{content:"\f0b2";} 211 | .icon-group:before{content:"\f0c0";} 212 | .icon-link:before{content:"\f0c1";} 213 | .icon-cloud:before{content:"\f0c2";} 214 | .icon-beaker:before{content:"\f0c3";} 215 | .icon-cut:before{content:"\f0c4";} 216 | .icon-copy:before{content:"\f0c5";} 217 | .icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6";} 218 | .icon-save:before{content:"\f0c7";} 219 | .icon-sign-blank:before{content:"\f0c8";} 220 | .icon-reorder:before{content:"\f0c9";} 221 | .icon-list-ul:before{content:"\f0ca";} 222 | .icon-list-ol:before{content:"\f0cb";} 223 | .icon-strikethrough:before{content:"\f0cc";} 224 | .icon-underline:before{content:"\f0cd";} 225 | .icon-table:before{content:"\f0ce";} 226 | .icon-magic:before{content:"\f0d0";} 227 | .icon-truck:before{content:"\f0d1";} 228 | .icon-pinterest:before{content:"\f0d2";} 229 | .icon-pinterest-sign:before{content:"\f0d3";} 230 | .icon-google-plus-sign:before{content:"\f0d4";} 231 | .icon-google-plus:before{content:"\f0d5";} 232 | .icon-money:before{content:"\f0d6";} 233 | .icon-caret-down:before{content:"\f0d7";} 234 | .icon-caret-up:before{content:"\f0d8";} 235 | .icon-caret-left:before{content:"\f0d9";} 236 | .icon-caret-right:before{content:"\f0da";} 237 | .icon-columns:before{content:"\f0db";} 238 | .icon-sort:before{content:"\f0dc";} 239 | .icon-sort-down:before{content:"\f0dd";} 240 | .icon-sort-up:before{content:"\f0de";} 241 | .icon-envelope:before{content:"\f0e0";} 242 | .icon-linkedin:before{content:"\f0e1";} 243 | .icon-rotate-left:before,.icon-undo:before{content:"\f0e2";} 244 | .icon-legal:before{content:"\f0e3";} 245 | .icon-dashboard:before{content:"\f0e4";} 246 | .icon-comment-alt:before{content:"\f0e5";} 247 | .icon-comments-alt:before{content:"\f0e6";} 248 | .icon-bolt:before{content:"\f0e7";} 249 | .icon-sitemap:before{content:"\f0e8";} 250 | .icon-umbrella:before{content:"\f0e9";} 251 | .icon-paste:before{content:"\f0ea";} 252 | .icon-lightbulb:before{content:"\f0eb";} 253 | .icon-exchange:before{content:"\f0ec";} 254 | .icon-cloud-download:before{content:"\f0ed";} 255 | .icon-cloud-upload:before{content:"\f0ee";} 256 | .icon-user-md:before{content:"\f0f0";} 257 | .icon-stethoscope:before{content:"\f0f1";} 258 | .icon-suitcase:before{content:"\f0f2";} 259 | .icon-bell-alt:before{content:"\f0f3";} 260 | .icon-coffee:before{content:"\f0f4";} 261 | .icon-food:before{content:"\f0f5";} 262 | .icon-file-text-alt:before{content:"\f0f6";} 263 | .icon-building:before{content:"\f0f7";} 264 | .icon-hospital:before{content:"\f0f8";} 265 | .icon-ambulance:before{content:"\f0f9";} 266 | .icon-medkit:before{content:"\f0fa";} 267 | .icon-fighter-jet:before{content:"\f0fb";} 268 | .icon-beer:before{content:"\f0fc";} 269 | .icon-h-sign:before{content:"\f0fd";} 270 | .icon-plus-sign-alt:before{content:"\f0fe";} 271 | .icon-double-angle-left:before{content:"\f100";} 272 | .icon-double-angle-right:before{content:"\f101";} 273 | .icon-double-angle-up:before{content:"\f102";} 274 | .icon-double-angle-down:before{content:"\f103";} 275 | .icon-angle-left:before{content:"\f104";} 276 | .icon-angle-right:before{content:"\f105";} 277 | .icon-angle-up:before{content:"\f106";} 278 | .icon-angle-down:before{content:"\f107";} 279 | .icon-desktop:before{content:"\f108";} 280 | .icon-laptop:before{content:"\f109";} 281 | .icon-tablet:before{content:"\f10a";} 282 | .icon-mobile-phone:before{content:"\f10b";} 283 | .icon-circle-blank:before{content:"\f10c";} 284 | .icon-quote-left:before{content:"\f10d";} 285 | .icon-quote-right:before{content:"\f10e";} 286 | .icon-spinner:before{content:"\f110";} 287 | .icon-circle:before{content:"\f111";} 288 | .icon-mail-reply:before,.icon-reply:before{content:"\f112";} 289 | .icon-github-alt:before{content:"\f113";} 290 | .icon-folder-close-alt:before{content:"\f114";} 291 | .icon-folder-open-alt:before{content:"\f115";} 292 | .icon-expand-alt:before{content:"\f116";} 293 | .icon-collapse-alt:before{content:"\f117";} 294 | .icon-smile:before{content:"\f118";} 295 | .icon-frown:before{content:"\f119";} 296 | .icon-meh:before{content:"\f11a";} 297 | .icon-gamepad:before{content:"\f11b";} 298 | .icon-keyboard:before{content:"\f11c";} 299 | .icon-flag-alt:before{content:"\f11d";} 300 | .icon-flag-checkered:before{content:"\f11e";} 301 | .icon-terminal:before{content:"\f120";} 302 | .icon-code:before{content:"\f121";} 303 | .icon-reply-all:before{content:"\f122";} 304 | .icon-mail-reply-all:before{content:"\f122";} 305 | .icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123";} 306 | .icon-location-arrow:before{content:"\f124";} 307 | .icon-crop:before{content:"\f125";} 308 | .icon-code-fork:before{content:"\f126";} 309 | .icon-unlink:before{content:"\f127";} 310 | .icon-question:before{content:"\f128";} 311 | .icon-info:before{content:"\f129";} 312 | .icon-exclamation:before{content:"\f12a";} 313 | .icon-superscript:before{content:"\f12b";} 314 | .icon-subscript:before{content:"\f12c";} 315 | .icon-eraser:before{content:"\f12d";} 316 | .icon-puzzle-piece:before{content:"\f12e";} 317 | .icon-microphone:before{content:"\f130";} 318 | .icon-microphone-off:before{content:"\f131";} 319 | .icon-shield:before{content:"\f132";} 320 | .icon-calendar-empty:before{content:"\f133";} 321 | .icon-fire-extinguisher:before{content:"\f134";} 322 | .icon-rocket:before{content:"\f135";} 323 | .icon-maxcdn:before{content:"\f136";} 324 | .icon-chevron-sign-left:before{content:"\f137";} 325 | .icon-chevron-sign-right:before{content:"\f138";} 326 | .icon-chevron-sign-up:before{content:"\f139";} 327 | .icon-chevron-sign-down:before{content:"\f13a";} 328 | .icon-html5:before{content:"\f13b";} 329 | .icon-css3:before{content:"\f13c";} 330 | .icon-anchor:before{content:"\f13d";} 331 | .icon-unlock-alt:before{content:"\f13e";} 332 | .icon-bullseye:before{content:"\f140";} 333 | .icon-ellipsis-horizontal:before{content:"\f141";} 334 | .icon-ellipsis-vertical:before{content:"\f142";} 335 | .icon-rss-sign:before{content:"\f143";} 336 | .icon-play-sign:before{content:"\f144";} 337 | .icon-ticket:before{content:"\f145";} 338 | .icon-minus-sign-alt:before{content:"\f146";} 339 | .icon-check-minus:before{content:"\f147";} 340 | .icon-level-up:before{content:"\f148";} 341 | .icon-level-down:before{content:"\f149";} 342 | .icon-check-sign:before{content:"\f14a";} 343 | .icon-edit-sign:before{content:"\f14b";} 344 | .icon-external-link-sign:before{content:"\f14c";} 345 | .icon-share-sign:before{content:"\f14d";} 346 | .icon-compass:before{content:"\f14e";} 347 | .icon-collapse:before{content:"\f150";} 348 | .icon-collapse-top:before{content:"\f151";} 349 | .icon-expand:before{content:"\f152";} 350 | .icon-euro:before,.icon-eur:before{content:"\f153";} 351 | .icon-gbp:before{content:"\f154";} 352 | .icon-dollar:before,.icon-usd:before{content:"\f155";} 353 | .icon-rupee:before,.icon-inr:before{content:"\f156";} 354 | .icon-yen:before,.icon-jpy:before{content:"\f157";} 355 | .icon-renminbi:before,.icon-cny:before{content:"\f158";} 356 | .icon-won:before,.icon-krw:before{content:"\f159";} 357 | .icon-bitcoin:before,.icon-btc:before{content:"\f15a";} 358 | .icon-file:before{content:"\f15b";} 359 | .icon-file-text:before{content:"\f15c";} 360 | .icon-sort-by-alphabet:before{content:"\f15d";} 361 | .icon-sort-by-alphabet-alt:before{content:"\f15e";} 362 | .icon-sort-by-attributes:before{content:"\f160";} 363 | .icon-sort-by-attributes-alt:before{content:"\f161";} 364 | .icon-sort-by-order:before{content:"\f162";} 365 | .icon-sort-by-order-alt:before{content:"\f163";} 366 | .icon-thumbs-up:before{content:"\f164";} 367 | .icon-thumbs-down:before{content:"\f165";} 368 | .icon-youtube-sign:before{content:"\f166";} 369 | .icon-youtube:before{content:"\f167";} 370 | .icon-xing:before{content:"\f168";} 371 | .icon-xing-sign:before{content:"\f169";} 372 | .icon-youtube-play:before{content:"\f16a";} 373 | .icon-dropbox:before{content:"\f16b";} 374 | .icon-stackexchange:before{content:"\f16c";} 375 | .icon-instagram:before{content:"\f16d";} 376 | .icon-flickr:before{content:"\f16e";} 377 | .icon-adn:before{content:"\f170";} 378 | .icon-bitbucket:before{content:"\f171";} 379 | .icon-bitbucket-sign:before{content:"\f172";} 380 | .icon-tumblr:before{content:"\f173";} 381 | .icon-tumblr-sign:before{content:"\f174";} 382 | .icon-long-arrow-down:before{content:"\f175";} 383 | .icon-long-arrow-up:before{content:"\f176";} 384 | .icon-long-arrow-left:before{content:"\f177";} 385 | .icon-long-arrow-right:before{content:"\f178";} 386 | .icon-apple:before{content:"\f179";} 387 | .icon-windows:before{content:"\f17a";} 388 | .icon-android:before{content:"\f17b";} 389 | .icon-linux:before{content:"\f17c";} 390 | .icon-dribbble:before{content:"\f17d";} 391 | .icon-skype:before{content:"\f17e";} 392 | .icon-foursquare:before{content:"\f180";} 393 | .icon-trello:before{content:"\f181";} 394 | .icon-female:before{content:"\f182";} 395 | .icon-male:before{content:"\f183";} 396 | .icon-gittip:before{content:"\f184";} 397 | .icon-sun:before{content:"\f185";} 398 | .icon-moon:before{content:"\f186";} 399 | .icon-archive:before{content:"\f187";} 400 | .icon-bug:before{content:"\f188";} 401 | .icon-vk:before{content:"\f189";} 402 | .icon-weibo:before{content:"\f18a";} 403 | .icon-renren:before{content:"\f18b";} 404 | -------------------------------------------------------------------------------- /static/css/main.css: -------------------------------------------------------------------------------- 1 | /* sidebar */ 2 | .sidebar-list { 3 | padding-left: 20px; 4 | } 5 | 6 | .sidebar-list li { 7 | margin-bottom: 5px; 8 | } 9 | 10 | .main-header { 11 | padding: 80px 0 30px; 12 | background-color: #0099CC; 13 | background-image: linear-gradient(to bottom, #66CCFF, #0099CC); 14 | text-align: center; 15 | margin-bottom: 10px; 16 | } 17 | 18 | .main-header .title { 19 | color: #fff; 20 | font-size: 50px; 21 | text-shadow: 1px 1px 2px rgba(0,0,0,0.25); 22 | } 23 | 24 | .main-header .desc { 25 | color: #eee; 26 | margin: 20px 0 0; 27 | font-size: 20px; 28 | text-shadow: 1px 1px 2px rgba(0,0,0,0.25); 29 | } 30 | 31 | .main-header .actions { 32 | color: #eee; 33 | margin: 40px 0 0; 34 | font-size: 20px; 35 | text-shadow: 1px 1px 2px rgba(0,0,0,0.25); 36 | } 37 | 38 | .main-container { 39 | margin-top: 31px; 40 | } 41 | 42 | .home-box .markdown { 43 | margin-bottom: 10px; 44 | } 45 | 46 | .home-box h2 { 47 | margin-top: 0; 48 | color: #6600CC; 49 | text-shadow: 1px 1px 1px rgba(0,0,0,0.15); 50 | border-bottom: 1px solid #DDD; 51 | margin: 15px 0; 52 | padding: 0; 53 | line-height: 1.7; 54 | } 55 | 56 | .home-box .feature { 57 | text-align: center; 58 | margin: 40px 0 30px; 59 | } 60 | 61 | .home-box .feature .icon { 62 | color: #f04c5c; 63 | text-shadow: 1px 1px 1px rgba(0,0,0,0.15); 64 | font-size: 70px; 65 | height: 70px; 66 | display: block; 67 | } 68 | 69 | .home-box .feature .title { 70 | color: #f04c5c; 71 | margin: 20px 0 0; 72 | font-size: 18px; 73 | } 74 | 75 | .home-box .feature .content { 76 | margin: 25px 0 20px; 77 | padding: 0 10px; 78 | line-height: 1.6; 79 | letter-spacing: 1px; 80 | text-align: left; 81 | } 82 | 83 | .home-box .whouse img { 84 | margin: 5px 0 0; 85 | } 86 | 87 | .page-header { 88 | padding-bottom: 8px; 89 | margin: 36px 0 18px; 90 | border-bottom: none; 91 | } 92 | 93 | .page-box { 94 | padding-bottom: 50px !important; 95 | } 96 | 97 | /* ****************************** 98 | For the getting started page 99 | ****************************** */ 100 | .option-chooser-blocks { 101 | position: relative; 102 | margin-left: -8px; 103 | } 104 | .option-chooser-blocks img { 105 | opacity: 0.8; 106 | padding: 0 10px; 107 | } 108 | .option-chooser-blocks a { 109 | color: black; 110 | } 111 | .option-chooser-blocks li { 112 | list-style-type: none; 113 | display: block; 114 | float: left; 115 | height: 115px; 116 | width: 115px; 117 | background-color: #eaeaea; 118 | border: 2px solid #b0c0bf; 119 | margin: 6px; 120 | text-align: center; 121 | padding: 5px; 122 | } 123 | .option-chooser-blocks li:hover { 124 | background-color: #d1d1d1; 125 | } 126 | /* ****************************** 127 | For the community page 128 | ****************************** */ 129 | .botbot-button { 130 | background-color: #de6222; 131 | padding: 4px; 132 | height: 60px; 133 | } 134 | .botbot-button img { 135 | height: 50px; 136 | float: left; 137 | } 138 | .botbot-button .bbme-title { 139 | font-size: larger; 140 | color: white; 141 | } 142 | #navlist{ 143 | position: fixed; 144 | z-index: 999; 145 | top: 80px; 146 | } 147 | /* ****************************** 148 | For the github btn 149 | ****************************** */ 150 | .github-btn { 151 | font-size: 11px; 152 | } 153 | .github-btn, 154 | .github-btn .btn { 155 | font-weight: bold; 156 | } 157 | .gh-count{ 158 | padding: 2px 5px 3px 4px; 159 | color: #555; 160 | text-decoration: none; 161 | text-shadow:0 1px 0 #fff; 162 | white-space:nowrap; 163 | cursor:pointer; 164 | border-radius:3px; 165 | position:relative; 166 | display:none; 167 | margin-left:4px; 168 | background-color:#fafafa; 169 | border:1px solid #d4d4d4; 170 | } 171 | .gh-count:hover,.gh-count:focus{color:#4183c4;text-decoration: none;} 172 | .gh-count:before,.gh-count:after{content:' ';position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid} 173 | .gh-count:before{top:50%;left:-3px;margin-top:-4px;border-width:4px 4px 4px 0;border-right-color:#fafafa} 174 | .gh-count:after{top:50%;left:-4px;z-index:-1;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#d4d4d4} 175 | 176 | .docs-sidenav { 177 | max-height: none; 178 | } 179 | 180 | .docs-sidenav .section { 181 | color: #aaa; 182 | } 183 | 184 | .docs-sidenav > .section { 185 | font-size: 16px; 186 | margin: 0 0 15px; 187 | } 188 | 189 | .docs-sidenav .group { 190 | margin: 9px 0; 191 | } 192 | 193 | .docs-sidenav ul ul { 194 | padding: 0 0 0 10px; 195 | } 196 | 197 | .docs-sidenav ul li { 198 | padding: 3px 0 0; 199 | } 200 | 201 | .docs-sidenav a { 202 | color: #3483A5; 203 | text-decoration: none; 204 | } 205 | 206 | .docs-sidenav a:hover, 207 | .docs-sidenav a.active { 208 | color: #f04c5c; 209 | } 210 | 211 | #docs-collapse-btn { 212 | margin: 8px 0 8px 15px; 213 | float: left; 214 | font-weight: bold; 215 | height: 34px; 216 | width: 44px; 217 | line-height: 12px; 218 | text-decoration: none; 219 | padding: 8px 0 8px 18px; 220 | border: 1px solid #ddd; 221 | border-radius: 4px; 222 | } 223 | 224 | .docs-markdown .anchor-wrap { 225 | margin-top: -50px; 226 | padding-top: 50px; 227 | } 228 | 229 | .docs-markdown h1 a, .docs-markdown h2 a, .docs-markdown h3 a { 230 | color: #4183c4; 231 | text-decoration: none; 232 | } 233 | 234 | .docs-markdown h1 a.anchor, 235 | .docs-markdown h2 a.anchor, 236 | .docs-markdown h3 a.anchor, 237 | .docs-markdown h4 a.anchor, 238 | .docs-markdown h5 a.anchor, 239 | .docs-markdown h6 a.anchor { 240 | text-decoration:none; 241 | line-height:1; 242 | padding-left:0; 243 | margin-left:5px; 244 | top:15%; 245 | } 246 | 247 | .docs-markdown a span.octicon { 248 | font-size: 16px; 249 | font-family: "FontAwesome"; 250 | line-height: 1; 251 | display: inline-block; 252 | text-decoration: none; 253 | -webkit-font-smoothing: antialiased; 254 | } 255 | 256 | .docs-markdown a span.octicon-link { 257 | display: none; 258 | color: #000; 259 | } 260 | 261 | .docs-markdown a span.octicon-link:before { 262 | content: "\f0c1"; 263 | } 264 | 265 | .docs-markdown h1:hover .octicon-link, 266 | .docs-markdown h2:hover .octicon-link, 267 | .docs-markdown h3:hover .octicon-link, 268 | .docs-markdown h4:hover .octicon-link, 269 | .docs-markdown h5:hover .octicon-link, 270 | .docs-markdown h6:hover .octicon-link { 271 | display:inline-block 272 | } 273 | 274 | .nav-lang { 275 | margin: 12px 0 0 10px; 276 | } 277 | 278 | .nav-github { 279 | margin: 12px 0 0 10px; 280 | display: inline-block; 281 | } 282 | 283 | #jPanelMenu-menu { 284 | max-height: none; 285 | padding: 75px 15px 0; 286 | background: #328BB1; 287 | z-index: 1; 288 | } 289 | 290 | #jPanelMenu-menu.docs-sidenav .section { 291 | color: #fff; 292 | } 293 | 294 | #jPanelMenu-menu.docs-sidenav a { 295 | color: #ddd; 296 | text-decoration: none; 297 | } 298 | 299 | #jPanelMenu-menu.docs-sidenav a:hover, 300 | #jPanelMenu-menu.docs-sidenav a.active { 301 | color: #f04c5c; 302 | } 303 | 304 | /* line 3, clingify.scss */ 305 | .js-clingify-ztransform, .js-clingify-wrapper { 306 | -webkit-transform: translateZ(0); 307 | -moz-transform: translateZ(0); 308 | -ms-transform: translateZ(0); 309 | -o-transform: translateZ(0); 310 | transform: translateZ(0); 311 | } 312 | 313 | /* Baseline selectors */ 314 | /* line 10, clingify.scss */ 315 | .js-clingify-wrapper { 316 | width: 100%; 317 | } 318 | 319 | /* line 14, clingify.scss */ 320 | .js-clingify-locked { 321 | left: 0; 322 | position: fixed; 323 | top: 0; 324 | z-index: 99999; 325 | } 326 | 327 | #disqus_thread { 328 | margin: 20px 0 0 0; 329 | padding: 0 9px; 330 | } 331 | 332 | #products .product-head { 333 | margin: 0 0 20px; 334 | } 335 | 336 | #products .product-head h2 { 337 | margin: 0 0 20px; 338 | } 339 | 340 | #products .product .box { 341 | margin: 15px 0 0 0; 342 | padding: 10px; 343 | } 344 | 345 | #products .product h3 { 346 | margin: 0 0 15px; 347 | font-size: 18px; 348 | } 349 | 350 | #products .product img { 351 | border-radius: 4px; 352 | } 353 | 354 | #products .product .desc { 355 | margin: 0 0 15px; 356 | font-size: 14px; 357 | } 358 | 359 | #products .product .meta { 360 | margin: 15px 0 0; 361 | color: #999; 362 | } 363 | 364 | #products .product-head a, 365 | #products .product .meta a { 366 | color: #3483A5; 367 | } 368 | 369 | a { 370 | color: #666; 371 | } 372 | 373 | code { 374 | margin: 0px; 375 | border: 1px solid #DDD; 376 | background-color: #F8F8F8; 377 | } 378 | 379 | .prettyprinted code { 380 | border: 0px; 381 | background-color: #FFF; 382 | } 383 | 384 | .img-thumbnail { 385 | height: 60px; 386 | } -------------------------------------------------------------------------------- /static/css/markdown.css: -------------------------------------------------------------------------------- 1 | .markdown { 2 | font-size: 14px; 3 | } 4 | 5 | .markdown a { 6 | color: #4183C4; 7 | } 8 | 9 | .markdown h1, 10 | .markdown h2, 11 | .markdown h3, 12 | .markdown h4, 13 | .markdown h5, 14 | .markdown h6 { 15 | line-height: 1.7; 16 | padding: 15px 0 0; 17 | margin: 0 0 15px; 18 | } 19 | 20 | .markdown h1, 21 | .markdown h2 { 22 | border-bottom: 1px solid #EEE; 23 | } 24 | 25 | .markdown h2 { 26 | border-bottom: 1px solid #EEE; 27 | } 28 | 29 | .markdown h1 { 30 | color: #000; 31 | font-size: 33px 32 | } 33 | 34 | .markdown h2 { 35 | color: #333; 36 | font-size: 28px 37 | } 38 | 39 | .markdown h3 { 40 | font-size: 22px 41 | } 42 | 43 | .markdown h4 { 44 | font-size: 18px 45 | } 46 | 47 | .markdown h5 { 48 | font-size: 14px 49 | } 50 | 51 | .markdown h6 { 52 | font-size: 14px 53 | } 54 | 55 | .markdown table { 56 | border-collapse: collapse; 57 | border-spacing: 0; 58 | display: block; 59 | overflow: auto; 60 | width: 100%; 61 | margin: 0 0 9px; 62 | } 63 | 64 | .markdown table th { 65 | font-weight: 700 66 | } 67 | 68 | .markdown table th, 69 | .markdown table td { 70 | border: 1px solid #DDD; 71 | padding: 6px 13px; 72 | } 73 | 74 | .markdown table tr { 75 | background-color: #FFF; 76 | border-top: 1px solid #CCC; 77 | } 78 | 79 | .markdown table tr:nth-child(2n) { 80 | background-color: #F8F8F8 81 | } 82 | 83 | .markdown li { 84 | line-height: 1.6; 85 | margin-top: 6px; 86 | } 87 | 88 | .markdown dl dt { 89 | font-style: italic; 90 | margin-top: 9px; 91 | } 92 | 93 | .markdown dl dd { 94 | margin: 0 0 9px; 95 | padding: 0 9px; 96 | } 97 | 98 | .markdown blockquote, 99 | .markdown blockquote p { 100 | font-size: 14px; 101 | background-color: #f5f5f5; 102 | } 103 | 104 | .markdown > pre { 105 | line-height: 1.6; 106 | overflow: auto; 107 | background: #fff; 108 | padding: 6px 10px; 109 | border: 1px solid #ddd; 110 | } 111 | 112 | .markdown > pre.linenums { 113 | padding: 0; 114 | } 115 | 116 | .markdown > pre > ol.linenums { 117 | -webkit-box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ccc; 118 | box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ccc; 119 | } 120 | 121 | .markdown > pre > code, 122 | .markdown > pre > ol.linenums > li > code { 123 | white-space: pre; 124 | word-wrap: normal; 125 | } 126 | 127 | .markdown > pre > ol.linenums > li > code { 128 | padding: 0 10px; 129 | } 130 | 131 | .markdown > pre > ol.linenums > li:first-child { 132 | padding-top: 6px; 133 | } 134 | 135 | .markdown > pre > ol.linenums > li:last-child { 136 | padding-bottom: 6px; 137 | } 138 | 139 | .markdown > pre > ol.linenums > li { 140 | border-left: 1px solid #ddd; 141 | } 142 | 143 | .markdown hr { 144 | border: none; 145 | color: #ccc; 146 | height: 4px; 147 | padding: 0; 148 | margin: 15px 0; 149 | background: transparent url('/img/hr.png') repeat-x 0 0; 150 | } 151 | 152 | .markdown blockquote:last-child, 153 | .markdown ul:last-child, 154 | .markdown ol:last-child, 155 | .markdown > pre:last-child, 156 | .markdown > pre:last-child, 157 | .markdown p:last-child { 158 | margin-bottom: 0; 159 | } 160 | 161 | .markdown .btn { 162 | color: #fff; 163 | } -------------------------------------------------------------------------------- /static/css/prettify.css: -------------------------------------------------------------------------------- 1 | /* Author: jmblog */ 2 | /* Project: https://github.com/jmblog/color-themes-for-google-code-prettify */ 3 | /* GitHub Theme */ 4 | /* Pretty printing styles. Used with prettify.js. */ 5 | /* SPAN elements with the classes below are added by prettyprint. */ 6 | /* plain text */ 7 | .pln { 8 | color: #333333; 9 | } 10 | 11 | @media screen { 12 | /* string content */ 13 | .str { 14 | color: #dd1144; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #333333; 20 | } 21 | 22 | /* a comment */ 23 | .com { 24 | color: #999988; 25 | } 26 | 27 | /* a type name */ 28 | .typ { 29 | color: #445588; 30 | } 31 | 32 | /* a literal value */ 33 | .lit { 34 | color: #445588; 35 | } 36 | 37 | /* punctuation */ 38 | .pun { 39 | color: #333333; 40 | } 41 | 42 | /* lisp open bracket */ 43 | .opn { 44 | color: #333333; 45 | } 46 | 47 | /* lisp close bracket */ 48 | .clo { 49 | color: #333333; 50 | } 51 | 52 | /* a markup tag name */ 53 | .tag { 54 | color: navy; 55 | } 56 | 57 | /* a markup attribute name */ 58 | .atn { 59 | color: teal; 60 | } 61 | 62 | /* a markup attribute value */ 63 | .atv { 64 | color: #dd1144; 65 | } 66 | 67 | /* a declaration */ 68 | .dec { 69 | color: #333333; 70 | } 71 | 72 | /* a variable name */ 73 | .var { 74 | color: teal; 75 | } 76 | 77 | /* a function name */ 78 | .fun { 79 | color: #990000; 80 | } 81 | } 82 | /* Use higher contrast and text-weight for printable form. */ 83 | @media print, projection { 84 | .str { 85 | color: #006600; 86 | } 87 | 88 | .kwd { 89 | color: #006; 90 | font-weight: bold; 91 | } 92 | 93 | .com { 94 | color: #600; 95 | font-style: italic; 96 | } 97 | 98 | .typ { 99 | color: #404; 100 | font-weight: bold; 101 | } 102 | 103 | .lit { 104 | color: #004444; 105 | } 106 | 107 | .pun, .opn, .clo { 108 | color: #444400; 109 | } 110 | 111 | .tag { 112 | color: #006; 113 | font-weight: bold; 114 | } 115 | 116 | .atn { 117 | color: #440044; 118 | } 119 | 120 | .atv { 121 | color: #006600; 122 | } 123 | } 124 | 125 | /* Specify class=linenums on a pre to get line numbering */ 126 | ol.linenums { 127 | margin-top: 0; 128 | margin-bottom: 0; 129 | } 130 | 131 | /* IE indents via margin-left */ 132 | li.L0, 133 | li.L1, 134 | li.L2, 135 | li.L3, 136 | li.L4, 137 | li.L5, 138 | li.L6, 139 | li.L7, 140 | li.L8, 141 | li.L9 { 142 | /* */ 143 | } 144 | 145 | /* Alternate shading for lines */ 146 | li.L1, 147 | li.L3, 148 | li.L5, 149 | li.L7, 150 | li.L9 { 151 | /* */ 152 | } -------------------------------------------------------------------------------- /static/css/select2.css: -------------------------------------------------------------------------------- 1 | /* 2 | Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013 3 | */ 4 | .select2-container{margin:0;position:relative;display:inline-block;zoom:1;*display:inline;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;height:26px;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #aaa;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;border-radius:4px;background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.5,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff',endColorstr = '#eeeeee',GradientType = 0);background-image:linear-gradient(top,#fff 0,#eee 50%)}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.9,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 90%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#eee 0,#fff 90%)}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url('/static/img/select2.png') right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:9999;top:100%;background:#fff;color:#000;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #aaa;border-bottom:0;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,.15);box-shadow:0 -4px 5px rgba(0,0,0,.15)}.select2-drop-active{border:1px solid #5897fb;border-top:0}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-left:1px solid #aaa;border-radius:0 4px 4px 0;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(0.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee',endColorstr = '#cccccc',GradientType = 0);background-image:linear-gradient(top,#ccc 0,#eee 60%)}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url('/static/img/select2.png') no-repeat 0 1px}.select2-search{display:inline-block;width:100%;min-height:26px;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;height:auto !important;min-height:26px;padding:4px 20px 4px 5px;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url('/static/img/select2.png') no-repeat 100% -22px;background:url('/static/img/select2.png') no-repeat 100% -22px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url('/static/img/select2.png') no-repeat 100% -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('/static/img/select2.png') no-repeat 100% -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('/static/img/select2.png') no-repeat 100% -22px,linear-gradient(top,#fff 85%,#eee 99%)}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url('/static/img/select2-spinner.gif') no-repeat 100%;background:url('/static/img/select2-spinner.gif') no-repeat 100%,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url('/static/img/select2-spinner.gif') no-repeat 100%,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('/static/img/select2-spinner.gif') no-repeat 100%,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('/static/img/select2-spinner.gif') no-repeat 100%,linear-gradient(top,#fff 85%,#eee 99%)}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(top,#fff 0,#eee 50%)}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center top,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center top,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(bottom,#fff 0,#eee 50%)}.select2-dropdown-open .select2-choice .select2-arrow{background:transparent;border-left:0;filter:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}.select2-results{max-height:200px;padding:0 0 0 4px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:rgba(0,0,0,0)}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results ul.select2-result-sub>li .select2-result-label{padding-left:20px}.select2-results ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:40px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:60px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:80px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:100px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:110px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:120px}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:bold}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:transparent}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url('/static/img/select2-spinner.gif') no-repeat 100%}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto !important;height:1%;margin:0;padding:0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(top,#eee 1%,#fff 15%);background-image:-moz-linear-gradient(top,#eee 1%,#fff 15%);background-image:linear-gradient(top,#eee 1%,#fff 15%)}.select2-locked{padding:3px 5px 3px 5px !important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:transparent !important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url('/static/img/select2-spinner.gif') no-repeat 100% !important}.select2-default{color:#999 !important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#f4f4f4',GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%)}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:0;background:url('/static/img/select2.png') right top no-repeat}.select2-container-multi .select2-search-choice-close{left:3px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px 3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0) !important;width:1px !important;height:1px !important;border:0 !important;margin:0 !important;padding:0 !important;overflow:hidden !important;position:absolute !important;outline:0 !important;left:0 !important;top:0 !important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){.select2-search input,.select2-search-choice-close,.select2-container .select2-choice abbr,.select2-container .select2-choice .select2-arrow b{background-image:url('/static/img/select2x2.png') !important;background-repeat:no-repeat !important;background-size:60px 40px !important}.select2-search input{background-position:100% -21px !important}} 5 | 6 | /* 7 | Select2 Bootstrap CSS 8 | Compatible with Select2 3.3.2, 3.4.1, 3.4.2 and Twitter Bootstrap 3.0.0 9 | MIT License 10 | */ 11 | .select2-container.form-control{background:transparent;border:0;margin:0;padding:0}.select2-container .select2-choices .select2-search-field input,.select2-container .select2-choice,.select2-container .select2-choices{background:0;padding:0;border-color:#ccc;border-radius:4px;color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:white;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.select2-search input{border-color:#ccc;border-radius:4px;color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:white;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.select2-container .select2-choices .select2-search-field input{-webkit-box-shadow:none;box-shadow:none}.select2-container .select2-choice{height:34px;line-height:1.42857}.select2-container.select2-container-multi.form-control{height:auto}.select2-container.input-sm .select2-choice,.input-group-sm .select2-container .select2-choice{height:30px;line-height:1.5;border-radius:3px}.select2-container.input-lg .select2-choice,.input-group-lg .select2-container .select2-choice{height:45px;line-height:1.33;border-radius:6px}.select2-container-multi .select2-choices .select2-search-field input{height:32px}.select2-container-multi.input-sm .select2-choices .select2-search-field input,.input-group-sm .select2-container-multi .select2-choices .select2-search-field input{height:28px}.select2-container-multi.input-lg .select2-choices .select2-search-field input,.input-group-lg .select2-container-multi .select2-choices .select2-search-field input{height:43px}.select2-container-multi .select2-choices .select2-search-field input{margin:0}.select2-chosen,.select2-choice>span:first-child,.select2-container .select2-choices .select2-search-field input{padding:6px 12px}.input-sm .select2-chosen,.input-group-sm .select2-chosen,.input-sm .select2-choice>span:first-child,.input-group-sm .select2-choice>span:first-child,.input-sm .select2-choices .select2-search-field input,.input-group-sm .select2-choices .select2-search-field input{padding:5px 10px}.input-lg .select2-chosen,.input-group-lg .select2-chosen,.input-lg .select2-choice>span:first-child,.input-group-lg .select2-choice>span:first-child,.input-lg .select2-choices .select2-search-field input,.input-group-lg .select2-choices .select2-search-field input{padding:10px 16px}.select2-container-multi .select2-choices .select2-search-choice{margin-top:5px;margin-bottom:3px}.select2-container-multi.input-sm .select2-choices .select2-search-choice,.input-group-sm .select2-container-multi .select2-choices .select2-search-choice{margin-top:3px;margin-bottom:2px}.select2-container-multi.input-lg .select2-choices .select2-search-choice,.input-group-lg .select2-container-multi .select2-choices .select2-search-choice{line-height:24px}.select2-container .select2-choice .select2-arrow,.select2-container .select2-choice div{border-left:1px solid #ccc;background:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.select2-dropdown-open .select2-choice .select2-arrow,.select2-dropdown-open .select2-choice div{border-left-color:transparent;background:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice div b{background-position:0 3px}.select2-dropdown-open .select2-choice .select2-arrow b,.select2-dropdown-open .select2-choice div b{background-position:-18px 3px}.select2-container.input-sm .select2-choice .select2-arrow b,.input-group-sm .select2-container .select2-choice .select2-arrow b,.select2-container.input-sm .select2-choice div b,.input-group-sm .select2-container .select2-choice div b{background-position:0 1px}.select2-dropdown-open.input-sm .select2-choice .select2-arrow b,.input-group-sm .select2-dropdown-open .select2-choice .select2-arrow b,.select2-dropdown-open.input-sm .select2-choice div b,.input-group-sm .select2-dropdown-open .select2-choice div b{background-position:-18px 1px}.select2-container.input-lg .select2-choice .select2-arrow b,.input-group-lg .select2-container .select2-choice .select2-arrow b,.select2-container.input-lg .select2-choice div b,.input-group-lg .select2-container .select2-choice div b{background-position:0 9px}.select2-dropdown-open.input-lg .select2-choice .select2-arrow b,.input-group-lg .select2-dropdown-open .select2-choice .select2-arrow b,.select2-dropdown-open.input-lg .select2-choice div b,.input-group-lg .select2-dropdown-open .select2-choice div b{background-position:-18px 9px}.has-warning .select2-choice,.has-warning .select2-choices{border-color:#c09853}.has-warning .select2-container-active .select2-choice,.has-warning .select2-container-multi.select2-container-active .select2-choices{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning.select2-drop-active{border-color:#a47e3c}.has-warning.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#a47e3c}.has-error .select2-choice,.has-error .select2-choices{border-color:#b94a48}.has-error .select2-container-active .select2-choice,.has-error .select2-container-multi.select2-container-active .select2-choices{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error.select2-drop-active{border-color:#953b39}.has-error.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#953b39}.has-success .select2-choice,.has-success .select2-choices{border-color:#468847}.has-success .select2-container-active .select2-choice,.has-success .select2-container-multi.select2-container-active .select2-choices{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success.select2-drop-active{border-color:#356635}.has-success.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#356635}.select2-container-active .select2-choice,.select2-container-multi.select2-container-active .select2-choices{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.select2-drop-active{border-color:#66afe9}.select2-drop-auto-width,.select2-drop.select2-drop-above.select2-drop-active{border-top-color:#66afe9}.input-group.select2-bootstrap-prepend [class^="select2-choice"]{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.input-group.select2-bootstrap-append [class^="select2-choice"]{border-bottom-right-radius:0 !important;border-top-right-radius:0 !important}.select2-dropdown-open [class^="select2-choice"]{border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.select2-dropdown-open.select2-drop-above [class^="select2-choice"]{border-top-right-radius:0 !important;border-top-left-radius:0 !important}.select2-results .select2-highlighted{color:white;background-color:#428bca}.select2-bootstrap-append .select2-container-multiple,.select2-bootstrap-append .input-group-btn,.select2-bootstrap-append .input-group-btn .btn,.select2-bootstrap-prepend .select2-container-multiple,.select2-bootstrap-prepend .input-group-btn,.select2-bootstrap-prepend .input-group-btn .btn{vertical-align:top}.select2-container-multi .select2-choices .select2-search-choice{color:#555;background:white;border-color:#ccc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:none;box-shadow:none}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#ebebeb;border-color:#adadad;color:#333;-webkit-box-shadow:none;box-shadow:none}.select2-search-choice-close{margin-top:-7px;top:50%}.select2-container .select2-choice abbr{top:50%}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background-color:#fcf8e3;color:#c09853}.select2-container.select2-container-disabled .select2-choice,.select2-container.select2-container-disabled .select2-choices{cursor:not-allowed;background-color:#eee;border-color:#ccc}.select2-container.select2-container-disabled .select2-choice .select2-arrow,.select2-container.select2-container-disabled .select2-choice div,.select2-container.select2-container-disabled .select2-choices .select2-arrow,.select2-container.select2-container-disabled .select2-choices div{background-color:transparent;border-left:1px solid transparent} 12 | -------------------------------------------------------------------------------- /static/font/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/font/FontAwesome.otf -------------------------------------------------------------------------------- /static/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/img/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/alipay.png -------------------------------------------------------------------------------- /static/img/arrow left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow left 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /static/img/arrow right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arror right 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /static/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/bg.jpg -------------------------------------------------------------------------------- /static/img/brands/dockercn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/dockercn.png -------------------------------------------------------------------------------- /static/img/brands/gocms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/gocms.png -------------------------------------------------------------------------------- /static/img/brands/gogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/gogs.png -------------------------------------------------------------------------------- /static/img/brands/golang-china.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/golang-china.png -------------------------------------------------------------------------------- /static/img/brands/golanghome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/golanghome.png -------------------------------------------------------------------------------- /static/img/brands/revelhat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/revelhat.png -------------------------------------------------------------------------------- /static/img/brands/sudochina.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/sudochina.jpg -------------------------------------------------------------------------------- /static/img/brands/yougam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/yougam.png -------------------------------------------------------------------------------- /static/img/brands/yunduo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/brands/yunduo.png -------------------------------------------------------------------------------- /static/img/community/IRC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/community/IRC.png -------------------------------------------------------------------------------- /static/img/community/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/community/github.png -------------------------------------------------------------------------------- /static/img/community/google-groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/community/google-groups.png -------------------------------------------------------------------------------- /static/img/community/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/community/stackoverflow.png -------------------------------------------------------------------------------- /static/img/community/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/community/twitter.png -------------------------------------------------------------------------------- /static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/favicon.png -------------------------------------------------------------------------------- /static/img/footer-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/footer-links.png -------------------------------------------------------------------------------- /static/img/fork-us-on-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-xorm/website/3ca0c57657233536d08abaaad0dad32b4e63f4b7/static/img/fork-us-on-github.png -------------------------------------------------------------------------------- /static/js/admin.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | $(function(){ 4 | $('[rel=select2-admin-model]').each(function(_,e){ 5 | var $e = $(e); 6 | var model = $e.data('model'); 7 | $e.select2({ 8 | minimumInputLength: 3, 9 | ajax: { 10 | url: '/admin/model/select', 11 | type: 'POST', 12 | data: function (query, page) { 13 | return { 14 | 'search': query, 15 | 'model': model 16 | }; 17 | }, 18 | results: function(d){ 19 | var results = []; 20 | if(d.success && d.data){ 21 | var data = d.data; 22 | $.each(data, function(i,v){ 23 | results.push({ 24 | 'id': v[0], 25 | 'text': v[1] 26 | }); 27 | }); 28 | } 29 | return {'results': results}; 30 | } 31 | }, 32 | initSelection: function(elm, cbk){ 33 | var id = parseInt($e.val(), 10); 34 | if(id){ 35 | $.post('/admin/model/get', {'id': id, 'model': model}, function(d){ 36 | if(d.success){ 37 | if(d.data && d.data.length){ 38 | cbk({ 39 | 'id': d.data[0], 40 | 'text': d.data[1] 41 | }); 42 | } 43 | } 44 | }); 45 | } 46 | } 47 | }); 48 | }); 49 | }); 50 | 51 | })(jQuery); -------------------------------------------------------------------------------- /static/js/editor.js: -------------------------------------------------------------------------------- 1 | ;(function($){ 2 | 3 | function getSelection(el) { 4 | var start = 0, end = 0, normalizedValue, range, 5 | textInputRange, len, endRange; 6 | 7 | if (typeof el.selectionStart === 'number' && typeof el.selectionEnd === 'number') { 8 | start = el.selectionStart; 9 | end = el.selectionEnd; 10 | } else { 11 | range = document.selection.createRange(); 12 | 13 | if (range && range.parentElement() === el) { 14 | len = el.value.length; 15 | normalizedValue = el.value.replace(/\r\n/g, '\n'); 16 | 17 | // Create a working TextRange that lives only in the input 18 | textInputRange = el.createTextRange(); 19 | textInputRange.moveToBookmark(range.getBookmark()); 20 | 21 | // Check if the start and end of the selection are at the very end 22 | // of the input, since moveStart/moveEnd doesn't return what we want 23 | // in those cases 24 | endRange = el.createTextRange(); 25 | endRange.collapse(false); 26 | 27 | if (textInputRange.compareEndPoints('StartToEnd', endRange) > -1) { 28 | start = end = len; 29 | } else { 30 | start = -textInputRange.moveStart('character', -len); 31 | start += normalizedValue.slice(0, start).split('\n').length - 1; 32 | 33 | if (textInputRange.compareEndPoints('EndToEnd', endRange) > -1) { 34 | end = len; 35 | } else { 36 | end = -textInputRange.moveEnd('character', -len); 37 | end += normalizedValue.slice(0, end).split('\n').length - 1; 38 | } 39 | } 40 | } 41 | } 42 | 43 | return { 44 | start: start, 45 | end: end 46 | }; 47 | } 48 | 49 | function setSelectRange(e, start, end) { 50 | if (!end) end = start; 51 | if (e.setSelectionRange) { 52 | // WebKit 53 | e.focus(); 54 | e.setSelectionRange(start, end); 55 | } else if (e.createTextRange) { 56 | // IE 57 | var range = e.createTextRange(); 58 | range.collapse(true); 59 | range.moveStart('character', start); 60 | range.moveEnd('character', end); 61 | range.select(); 62 | } else if (e.selectionStart) { 63 | e.selectionStart = start; 64 | e.selectionEnd = end; 65 | } 66 | } 67 | 68 | function skipAhead(s){ 69 | var m = s.match(/^\n+/); 70 | if(m){ 71 | return m[0].length; 72 | } 73 | return 0; 74 | } 75 | 76 | function skipTrail(s){ 77 | var m = s.match(/\n+$/); 78 | if(m){ 79 | return m[0].length; 80 | } 81 | return 0; 82 | } 83 | 84 | function NewUndoManager($t, callback){ 85 | var cur = 0; 86 | var stacks = []; 87 | var mode = 'none'; 88 | var t = $t.get(0); 89 | 90 | function cbk(){ 91 | if(callback){ 92 | callback(e.canUndo(), e.canRedo()); 93 | } 94 | } 95 | 96 | function setMode(newMode, repl) { 97 | if(typeof repl != 'boolean'){ 98 | repl = mode == newMode; 99 | } 100 | mode = newMode; 101 | e.save(repl); 102 | } 103 | 104 | function getStack(){ 105 | var value = $t.val(); 106 | var stack = $.extend({'value': value}, getSelection(t)); 107 | return stack; 108 | } 109 | 110 | $t.on('paste drop dragover dragenter', function(){ 111 | setMode('paste', false); 112 | }); 113 | 114 | $t.on('keyup', function(e){ 115 | if (!e.ctrlKey && !e.metaKey) { 116 | 117 | var keyCode = e.keyCode; 118 | 119 | if ((keyCode >= 33 && keyCode <= 40) || (keyCode >= 63232 && keyCode <= 63235)) { 120 | // 33 - 40: page up/dn and arrow keys 121 | // 63232 - 63235: page up/dn and arrow keys on safari 122 | setMode('moving'); 123 | } 124 | else if (keyCode == 8 || keyCode == 46 || keyCode == 127) { 125 | // 8: backspace 126 | // 46: delete 127 | // 127: delete 128 | setMode('deleting'); 129 | } 130 | else if (keyCode == 13) { 131 | // 13: Enter 132 | setMode('newlines'); 133 | } 134 | else if (keyCode == 27) { 135 | // 27: escape 136 | setMode('escape'); 137 | } 138 | else if ((keyCode < 16 || keyCode > 20) && keyCode != 91) { 139 | // 16-20 are shift, etc. 140 | // 91: left window key 141 | // I think this might be a little messed up since there are 142 | // a lot of nonprinting keys above 20. 143 | setMode('typing'); 144 | } 145 | } 146 | }); 147 | 148 | var e = { 149 | canRedo: function(){ 150 | return cur < (stacks.length - 1); 151 | }, 152 | canUndo: function(){ 153 | return cur > 0; 154 | }, 155 | redo: function(){ 156 | if(e.canRedo()){ 157 | cur++; 158 | var stack = stacks[cur]; 159 | $t.val(stack.value); 160 | setSelectRange(t, stack.start, stack.end); 161 | } 162 | cbk(); 163 | $t.focus(); 164 | }, 165 | undo: function(){ 166 | if(e.canUndo()){ 167 | cur--; 168 | var stack = stacks[cur]; 169 | $t.val(stack.value); 170 | setSelectRange(t, stack.start, stack.end); 171 | } 172 | cbk(); 173 | $t.focus(); 174 | }, 175 | save: function(repl){ 176 | setTimeout(function(){ 177 | if(repl){ 178 | stacks[cur] = getStack(); 179 | } else if(e.last() !== $t.val()){ 180 | stacks.push(getStack()); 181 | } 182 | cur = stacks.length - 1; 183 | cbk(); 184 | },10); 185 | }, 186 | last: function(){ 187 | if(stacks.length) { 188 | return stacks[stacks.length-1].value; 189 | } 190 | } 191 | }; 192 | 193 | stacks.push(getStack()); 194 | cur++; 195 | 196 | return e; 197 | } 198 | 199 | additionMentions = {}||additionMentions; 200 | function TextareaComplete($textarea){ 201 | var mentions = []; 202 | var fetched = false; 203 | $textarea.textcomplete([ 204 | { 205 | match: /\B@([\d\w-_]*)$/, 206 | search: function (term, callback){ 207 | 208 | var cbk = function(){ 209 | var nums = 0; 210 | callback($.map(mentions, function (mention) { 211 | if(nums < 5 && mention.indexOf(term) === 0){ 212 | nums++; 213 | }else{ 214 | mention = null; 215 | } 216 | return mention; 217 | })); 218 | }; 219 | 220 | if(fetched){ 221 | cbk(); 222 | } else { 223 | fetched = true; 224 | $.post('/api/user', {action: "get-follows"}, function(d){ 225 | if(d.success && d.data){ 226 | $.each(d.data, function(_,d){ 227 | additionMentions[d[1]] = d[0]; 228 | }); 229 | } 230 | }).complete(function(){ 231 | $.each(additionMentions, function(k,v){ 232 | var elm = k; 233 | if(k != v){ 234 | elm = k + ' (' + v + ')'; 235 | } 236 | mentions.push(elm); 237 | }); 238 | cbk(); 239 | }); 240 | } 241 | }, 242 | index: 1, 243 | replace: function (mention) { 244 | var idx = mention.indexOf(' '); 245 | if(idx != -1) { 246 | mention = mention.substr(0, idx); 247 | } 248 | return '@' + mention + ' '; 249 | } 250 | } 251 | ]).overlay([ 252 | { 253 | match: /\B[@#]([\d\w-_]*)/g, 254 | css: { 255 | 'background-color': '#ddd' 256 | } 257 | } 258 | ]); 259 | } 260 | 261 | $(function(){ 262 | $('.markdown-editor').each(function(_,e){ 263 | var $editor = $(e); 264 | var $state = $editor.find('.md-textarea'); 265 | var $textarea = $state.find('textarea'); 266 | var $preview = $editor.find('.md-preview'); 267 | var $toolbar = $editor.find('.md-toolbar'); 268 | var $undoBtn = $editor.find('[data-meta=undo]'); 269 | var $redoBtn = $editor.find('[data-meta=redo]'); 270 | var url = $editor.data('preview-url'); 271 | 272 | var te = $textarea.get(0); 273 | 274 | var saveKey = $editor.data('savekey'); 275 | var cache = ""; 276 | 277 | var popup; 278 | 279 | function toggleOtherButtons($btn, disable){ 280 | if(disable){ 281 | $toolbar.find('.md-btn').not($btn).each(function(_,e){ 282 | var $e = $(e); 283 | $e.data('isDis', $e.hasClass('disabled')); 284 | $e.addClass('disabled'); 285 | }); 286 | } else { 287 | $toolbar.find('.md-btn').not($btn).each(function(_,e){ 288 | var $e = $(e); 289 | if(!$e.data('isDis')){ 290 | $e.removeClass('disabled'); 291 | } 292 | }); 293 | } 294 | } 295 | 296 | function insertText(v, start, end){ 297 | var sel = getSelection(te); 298 | var value = $textarea.val(); 299 | var vStart = value.substr(0, sel.start).lastIndexOf('\n') + 1; 300 | var vv = value.substring(vStart, sel.start); 301 | if($.trim(vv)){ 302 | v = '\n' + v; 303 | if(start){ 304 | start += 1; 305 | } 306 | if(end){ 307 | end += 1; 308 | } 309 | } 310 | value = value.substr(0, sel.end) + v + value.substr(sel.end); 311 | $textarea.val(value); 312 | setSelectRange(te, start, end); 313 | undoManager.save(); 314 | } 315 | 316 | var api = { 317 | 'insertText': insertText, 318 | 'getSel': function(){ 319 | return getSelection(te); 320 | } 321 | }; 322 | 323 | $editor.data('editor', api); 324 | 325 | if($textarea.val() === '') { 326 | $textarea.val($.jStorage.get(saveKey)); 327 | } 328 | 329 | var intervalSave = setInterval(function(){ 330 | $.jStorage.set(saveKey, $textarea.val()); 331 | }, 500); 332 | 333 | $textarea.parents('form:first').on('submit', function(){ 334 | clearInterval(intervalSave); 335 | }); 336 | 337 | $textarea.autosize(); 338 | $textarea.css('resize', 'none'); 339 | TextareaComplete($textarea); 340 | 341 | $editor.on('click', '[data-meta=preview]', function(){ 342 | var $e = $(this); 343 | if($e.hasClass('active')){ 344 | $state.show(); 345 | $preview.hide(); 346 | $e.removeClass('active'); 347 | toggleOtherButtons($e, false); 348 | $textarea.focus(); 349 | } else { 350 | $state.hide(); 351 | $preview.show(); 352 | $e.addClass('active'); 353 | toggleOtherButtons($e, true); 354 | 355 | var n = $.trim($textarea.val()); 356 | if(n === '') { 357 | $preview.html(''); 358 | return; 359 | } 360 | if(n == cache) return; 361 | 362 | cache = n; 363 | $.post(url, {'action': 'preview', 'content': n}, function(data){ 364 | if(data.success){ 365 | $preview.html(data.preview); 366 | if($preview.mdFilter){ 367 | $preview.mdFilter(); 368 | } 369 | } 370 | }); 371 | } 372 | }); 373 | 374 | $textarea.on('keypress', function(e){ 375 | if ((e.ctrlKey || e.metaKey) && (e.keyCode == 89 || e.keyCode == 90)) { 376 | e.preventDefault(); 377 | } 378 | }); 379 | 380 | $textarea.on('keydown', function(e){ 381 | var $t = $textarea; 382 | var te = $t.get(0); 383 | var st = getSelection(te); 384 | var start = st.start; 385 | var end = st.end; 386 | var value = $t.val(); 387 | 388 | var metaKey = e.ctrlKey || e.metaKey; 389 | 390 | switch(e.keyCode){ 391 | case 89: 392 | // y 393 | if(metaKey){ 394 | undoManager.redo(); 395 | e.preventDefault(); 396 | } 397 | break; 398 | 399 | case 90: 400 | // z 401 | if(metaKey){ 402 | if(e.shiftKey){ 403 | undoManager.redo(); 404 | } else { 405 | undoManager.undo(); 406 | } 407 | e.preventDefault(); 408 | } 409 | break; 410 | 411 | case 9: 412 | // tab 413 | var sel = value.substring(start, end); 414 | 415 | var df = skipAhead(sel); 416 | sel = sel.substr(df); 417 | start += df; 418 | 419 | df = skipTrail(sel); 420 | sel = sel.substr(0, sel.length - df); 421 | end -= df; 422 | 423 | if(e.shiftKey){ 424 | var selStart = value.substr(0, start).lastIndexOf('\n') + 1; 425 | var selEnd = value.substr(end).indexOf('\n'); 426 | if(selEnd == -1) selEnd = 0; 427 | selEnd += end; 428 | sel = value.substring(selStart, selEnd); 429 | var nsel = sel.replace(/^([ ]{1,4}|\t)/gm, ''); 430 | var dif = sel.length - nsel.length; 431 | if(dif > 0){ 432 | start -= 1; 433 | value = value.substr(0, selStart) + nsel + value.substr(selEnd); 434 | $t.val(value); 435 | } 436 | 437 | df = skipAhead(value.substr(start)); 438 | start += df; 439 | 440 | setSelectRange(te, start, end - dif); 441 | } else { 442 | sel = '\t' + sel.replace(/\n/g, '\n\t'); 443 | $t.val(value.substr(0, start) + sel + value.substr(end)); 444 | setSelectRange(te, start + 1, start + sel.length); 445 | } 446 | undoManager.save(); 447 | e.preventDefault(); 448 | break; 449 | } 450 | }); 451 | 452 | $editor.find('[data-meta=image]').popover({ 453 | 'html': true, 454 | 'container': $editor, 455 | 'title': $editor.find('[rel=image-popover-title]').html(), 456 | 'content': $editor.find('[rel=image-popover-content]').html() 457 | }); 458 | 459 | var onUpload; 460 | 461 | function imageUploadComplete($form, data){ 462 | onUpload = false; 463 | var $suc = $form.find('.alert-success').hide(); 464 | var $err = $form.find('.alert-danger').hide(); 465 | if(data && data.success){ 466 | $form.find('[rel=filename]').val(''); 467 | $form.find('[type=file]').val(''); 468 | $editor.find('.md-image').find('[name=link]').val(data.link); 469 | $suc.show(); 470 | } else if(data && data.msg){ 471 | $err.text(data.msg); 472 | $err.show(); 473 | } else { 474 | $err.text($err.data('message')); 475 | $err.show(); 476 | } 477 | } 478 | 479 | $editor.on('click', '[rel=image-insert]', function(){ 480 | var link = $editor.find('.md-image').find('[name=link]').val(); 481 | var sel = getSelection(te); 482 | insertText("![]("+link+")", sel.start+2); 483 | $(popup).popover('hide'); 484 | }); 485 | 486 | $editor.on('click', '[rel=image-upload]', function(){ 487 | var $form = $editor.find('.md-image-form'); 488 | $form.slideToggle(); 489 | $form.ajaxForm({ 490 | dataType: 'json', 491 | beforeSubmit: function(){ 492 | if(onUpload || $form.find('[rel=filename]').val() === ''){ 493 | return false; 494 | } 495 | onUpload = true; 496 | }, 497 | success: function(data) { 498 | imageUploadComplete($form, data); 499 | }, 500 | error: function(){ 501 | imageUploadComplete($form); 502 | } 503 | }); 504 | }); 505 | 506 | $editor.on('click', '[data-meta=code]', function(){ 507 | var sel = getSelection(te); 508 | if(sel.start != sel.end){ 509 | var value = $textarea.val(); 510 | var selv = value.substring(sel.start, sel.end); 511 | value = value.substr(0, sel.start) + "\n```go\n"+selv+"\n```"; 512 | $textarea.val(value); 513 | undoManager.save(); 514 | } else { 515 | insertText("\n```go\n\n```", sel.start+7); 516 | } 517 | }); 518 | 519 | var undoManager = NewUndoManager($textarea, function(un, re){ 520 | if(un){ 521 | $undoBtn.removeClass('disabled'); 522 | } else { 523 | $undoBtn.addClass('disabled'); 524 | } 525 | if(re){ 526 | $redoBtn.removeClass('disabled'); 527 | } else { 528 | $redoBtn.addClass('disabled'); 529 | } 530 | $textarea.trigger('autosize.resize'); 531 | }); 532 | 533 | $undoBtn.on('click', function(){ 534 | undoManager.undo(); 535 | }); 536 | 537 | $redoBtn.on('click', function(){ 538 | undoManager.redo(); 539 | }); 540 | 541 | $editor.on('show.bs.popover', function(e){ 542 | if(popup&& popup != e.target){ 543 | $(popup).popover('hide'); 544 | } 545 | popup = e.target; 546 | }); 547 | 548 | $editor.on('hide.bs.popover', function(e){ 549 | if(popup == e.target){ 550 | $(popup).data('bs.popover').hoverState = 'out'; 551 | popup = null; 552 | } 553 | }); 554 | 555 | $(document).on('mousedown', function(e){ 556 | if(popup && popup != e.target){ 557 | var $e = $(e.target); 558 | var $p = $(popup); 559 | if((!$e.hasClass('md-btn') || !($e.hasClass('md-btn') && $e.data('meta') == $p.data('meta'))) && 560 | (!$e.parents('.md-btn').length || !($e.parents('.md-btn').length && 561 | $e.parents('.md-btn:first').data('meta') == $p.data('meta'))) && 562 | !$e.parents('.popover').length){ 563 | $p.popover('hide'); 564 | } 565 | } 566 | }); 567 | }); 568 | }); 569 | 570 | })(jQuery); -------------------------------------------------------------------------------- /static/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;dt;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){var t=document.documentElement,n=function(){};t.addEventListener?n=function(e,t,n){e.addEventListener(t,n,!1)}:t.attachEvent&&(n=function(t,n,i){t[n+i]=i.handleEvent?function(){var t=e.event;t.target=t.target||t.srcElement,i.handleEvent.call(i,t)}:function(){var n=e.event;n.target=n.target||n.srcElement,i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var i=function(){};t.removeEventListener?i=function(e,t,n){e.removeEventListener(t,n,!1)}:t.detachEvent&&(i=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var r={bind:n,unbind:i};"function"==typeof define&&define.amd?define("eventie/eventie",r):e.eventie=r}(this),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return"[object Array]"===a.call(e)}function i(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,n){function r(e,n,s){if(!(this instanceof r))return new r(e,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=i(e),this.options=t({},this.options),"function"==typeof n?s=n:t(this.options,n),s&&this.on("always",s),this.getImages(),o&&(this.jqDeferred=new o.Deferred);var c=this;setTimeout(function(){c.check()})}function a(e){this.img=e}function f(e){this.src=e,h[e]=this}r.prototype=new e,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},r.prototype.addImage=function(e){var t=new a(e);this.images.push(t)},r.prototype.check=function(){function e(e,r){return t.options.debug&&c&&s.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},o&&(o.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(o(this))}),a.prototype=new e,a.prototype.check=function(){var e=h[this.img.src]||new f(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var h={};return f.prototype=new e,f.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},f.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},f.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},f.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},f.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},f.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},r}var o=e.jQuery,s=e.console,c=s!==void 0,a=Object.prototype.toString;"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],r):e.imagesLoaded=r(e.EventEmitter,e.eventie)}(window); -------------------------------------------------------------------------------- /static/js/jRespond.min.js: -------------------------------------------------------------------------------- 1 | /*! jRespond.js v 0.10 | Author: Jeremy Fields [jeremy.fields@viget.com], 2013 | License: MIT */ 2 | !function(a,b,c){"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=c:(a[b]=c,"function"==typeof define&&define.amd&&define(b,[],function(){return c}))}(this,"jRespond",function(a,b,c){"use strict";return function(a){var b=[],d=[],e=a,f="",g="",i=0,j=100,k=500,l=k,m=function(){var a=0;return a="number"!=typeof window.innerWidth?0!==document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth:window.innerWidth},n=function(a){if(a.length===c)o(a);else for(var b=0;b=e[c].enter&&a<=e[c].exit){b=!0;break}b&&f!==e[c].label?(g=f,f=e[c].label,p()):b||""===f||(f="",p())},r=function(a){if("object"==typeof a){if(a.join().indexOf(f)>=0)return!0}else{if("*"===a)return!0;if("string"==typeof a&&f===a)return!0}},s=function(){var a=m();a!==i?(l=j,q(a)):l=k,i=a,setTimeout(s,l)};return s(),{addFunc:function(a){n(a)},getBreakpoint:function(){return f}}}}(this,this.document)); -------------------------------------------------------------------------------- /static/js/jquery.clingify.min.js: -------------------------------------------------------------------------------- 1 | ;(function($,window,document,undefined){var pluginName="clingify",defaults={breakpoint:0,extraClass:"",throttle:100,detached:$.noop,locked:$.noop,resized:$.noop},wrapperClass="js-clingify-wrapper",lockedClass="js-clingify-locked",placeholderClass="js-clingify-placeholder",$buildPlaceholder=$("
").addClass(placeholderClass),$buildWrapper=$("
").addClass(wrapperClass),$window=$(window);function Plugin(element,options){this.element=element;this.$element=$(element);this.options=$.extend({},defaults, 2 | options);this._defaults=defaults;this._name=pluginName;this.vars={elemHeight:this.$element.height()};this.init()}Plugin.prototype={init:function(){var cling=this,scrollTimeout,throttle=cling.options.throttle,extraClass=cling.options.extraClass;cling.$element.wrap($buildPlaceholder.height(cling.vars.elemHeight)).wrap($buildWrapper);if(extraClass!==""&&typeof extraClass==="string"){cling.findWrapper().addClass(extraClass);cling.findPlaceholder().addClass(extraClass)}$window.on("scroll resize",function(event){if(!scrollTimeout)scrollTimeout= 3 | setTimeout(function(){if(event.type==="resize"&&typeof cling.options.resized==="function")cling.options.resized();cling.checkElemStatus();scrollTimeout=null},throttle)})},checkCoords:function(){var coords={windowWidth:$window.width(),windowOffset:$window.scrollTop(),placeholderOffset:this.findPlaceholder().offset().top};return coords},detachElem:function(){if(typeof this.options.detached==="function")this.options.detached();this.findWrapper().removeClass(lockedClass)},lockElem:function(){if(typeof this.options.locked=== 4 | "function")this.options.locked();this.findWrapper().addClass(lockedClass)},findPlaceholder:function(){return this.$element.closest("."+placeholderClass)},findWrapper:function(){return this.$element.closest("."+wrapperClass)},checkElemStatus:function(){var cling=this,currentCoords=cling.checkCoords(),isScrolledPast=function(){if(currentCoords.windowOffset>=currentCoords.placeholderOffset)return true;else return false},isWideEnough=function(){if(currentCoords.windowWidth>=cling.options.breakpoint)return true; 5 | else return false};if(isScrolledPast()&&isWideEnough())cling.lockElem();else if(!isScrolledPast()||!isWideEnough())cling.detachElem()}};$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,"plugin_"+pluginName))$.data(this,"plugin_"+pluginName,new Plugin(this,options))})}})(jQuery,window,document); -------------------------------------------------------------------------------- /static/js/jquery.extend.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | (function(){ 4 | 5 | // extend jQuery ajax, set xsrf token value 6 | var ajax = $.ajax; 7 | $.extend({ 8 | ajax: function(url, options) { 9 | if (typeof url === 'object') { 10 | options = url; 11 | url = undefined; 12 | } 13 | options = options || {}; 14 | url = options.url; 15 | var xsrftoken = $('meta[name=_xsrf]').attr('content'); 16 | var oncetoken = $('[name=_once]').filter(':last').val(); 17 | var headers = options.headers || {}; 18 | var domain = document.domain.replace(/\./ig, '\\.'); 19 | if (!/^(http:|https:).*/.test(url) || eval('/^(http:|https:)\\/\\/(.+\\.)*' + domain + '.*/').test(url)) { 20 | headers = $.extend(headers, {'X-Xsrftoken':xsrftoken, 'X-Form-Once':oncetoken}); 21 | } 22 | options.headers = headers; 23 | var callback = options.success; 24 | options.success = function(data){ 25 | if(data.once){ 26 | // change all _once value if ajax data.once exist 27 | $('[name=_once]').val(data.once); 28 | } 29 | if(callback){ 30 | callback.apply(this, arguments); 31 | } 32 | }; 33 | return ajax(url, options); 34 | } 35 | }); 36 | 37 | })(); 38 | })(jQuery); -------------------------------------------------------------------------------- /static/js/jquery.jpanelmenu.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * jPanelMenu 1.3.0 (http://jpanelmenu.com) 4 | * By Anthony Colangelo (http://acolangelo.com) 5 | * 6 | * */ 7 | (function(e){e.jPanelMenu=function(t){if(typeof t=="undefined"||t==null)t={};var n={options:e.extend({menu:"#menu",trigger:".menu-trigger",excludedPanelContent:"style, script",direction:"left",openPosition:"250px",animated:!0,closeOnContentClick:!0,keyboardShortcuts:[{code:27,open:!1,close:!0},{code:37,open:!1,close:!0},{code:39,open:!0,close:!0},{code:77,open:!0,close:!0}],duration:150,openDuration:t.duration||150,closeDuration:t.duration||150,easing:"ease-in-out",openEasing:t.easing||"ease-in-out",closeEasing:t.easing||"ease-in-out",before:function(){},beforeOpen:function(){},beforeClose:function(){},after:function(){},afterOpen:function(){},afterClose:function(){},beforeOn:function(){},afterOn:function(){},beforeOff:function(){},afterOff:function(){}},t),settings:{transitionsSupported:"WebkitTransition"in document.body.style||"MozTransition"in document.body.style||"msTransition"in document.body.style||"OTransition"in document.body.style||"Transition"in document.body.style,shiftFixedChildren:!1,panelPosition:"relative",positionUnits:"px"},menu:"#jPanelMenu-menu",panel:".jPanelMenu-panel",fixedChildren:[],timeouts:{},clearTimeouts:function(){clearTimeout(n.timeouts.open);clearTimeout(n.timeouts.afterOpen);clearTimeout(n.timeouts.afterClose)},setPositionUnits:function(){var e=!1,t=["%","px","em"];for(unitID in t){var r=t[unitID];if(n.options.openPosition.toString().substr(-r.length)==r){e=!0;n.settings.positionUnits=r}}e||(n.options.openPosition=parseInt(n.options.openPosition)+n.settings.positionUnits)},checkFixedChildren:function(){n.disableTransitions();var t={position:e(n.panel).css("position")};t[n.options.direction]=e(n.panel).css(n.options.direction)=="auto"?0:e(n.panel).css(n.options.direction);e(n.panel).find("> *").each(function(){e(this).css("position")=="fixed"&&e(this).css(n.options.direction)=="auto"&&n.fixedChildren.push(this)});if(n.fixedChildren.length>0){var r={position:"relative"};r[n.options.direction]="1px";n.setPanelStyle(r);parseInt(e(n.fixedChildren[0]).offset().left)==0&&(n.settings.shiftFixedChildren=!0)}n.setPanelStyle(t)},setjPanelMenuStyles:function(){var t="#fff",r=e("html").css("background-color"),i=e("body").css("background-color");i!="transparent"&&i!="rgba(0, 0, 0, 0)"?t=i:r!="transparent"&&r!="rgba(0, 0, 0, 0)"?t=r:t="#fff";e("#jPanelMenu-style-master").length==0&&e("body").append('")},setMenuState:function(t){var n=t?"open":"closed";e("body").attr("data-menu-position",n)},getMenuState:function(){return e("body").attr("data-menu-position")},menuIsOpen:function(){return n.getMenuState()=="open"?!0:!1},setMenuStyle:function(t){e(n.menu).css(t)},setPanelStyle:function(t){e(n.panel).css(t)},showMenu:function(){n.setMenuStyle({display:"block"});n.setMenuStyle({"z-index":"1"})},hideMenu:function(){n.setMenuStyle({"z-index":"-1"});n.setMenuStyle({display:"none"})},enableTransitions:function(t,r){var i=t/1e3,s=n.getCSSEasingFunction(r);n.disableTransitions();e("body").append('")},disableTransitions:function(){e("#jPanelMenu-style-transitions").remove()},enableFixedTransitions:function(t,r,i,s){var o=i/1e3,u=n.getCSSEasingFunction(s);n.disableFixedTransitions(r);e("body").append('")},disableFixedTransitions:function(t){e("#jPanelMenu-style-fixed-"+t).remove()},getCSSEasingFunction:function(e){switch(e){case"linear":return e;case"ease":return e;case"ease-in":return e;case"ease-out":return e;case"ease-in-out":return e;default:return"ease-in-out"}},getJSEasingFunction:function(e){switch(e){case"linear":return e;default:return"swing"}},openMenu:function(t){if(typeof t=="undefined"||t==null)t=n.options.animated;n.clearTimeouts();n.options.before();n.options.beforeOpen();n.setMenuState(!0);n.setPanelStyle({position:"relative"});n.showMenu();var r={none:t?!1:!0,transitions:t&&n.settings.transitionsSupported?!0:!1};if(r.transitions||r.none){r.none&&n.disableTransitions();r.transitions&&n.enableTransitions(n.options.openDuration,n.options.openEasing);var i={};i[n.options.direction]=n.options.openPosition;n.setPanelStyle(i);n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t=e(this).prop("tagName").toLowerCase()+" "+e(this).attr("class"),i=t.replace(" ","."),t=t.replace(" ","-");r.none&&n.disableFixedTransitions(t);r.transitions&&n.enableFixedTransitions(i,t,n.options.openDuration,n.options.openEasing);var s={};s[n.options.direction]=n.options.openPosition;e(this).css(s)});n.timeouts.afterOpen=setTimeout(function(){n.disableTransitions();n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t=e(this).prop("tagName").toLowerCase()+" "+e(this).attr("class"),t=t.replace(" ","-");n.disableFixedTransitions(t)});n.options.after();n.options.afterOpen();n.initiateContentClickListeners()},n.options.openDuration)}else{var s=n.getJSEasingFunction(n.options.openEasing),o={};o[n.options.direction]=n.options.openPosition;e(n.panel).stop().animate(o,n.options.openDuration,s,function(){n.options.after();n.options.afterOpen();n.initiateContentClickListeners()});n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t={};t[n.options.direction]=n.options.openPosition;e(this).stop().animate(t,n.options.openDuration,s)})}},closeMenu:function(t){if(typeof t=="undefined"||t==null)t=n.options.animated;n.clearTimeouts();n.options.before();n.options.beforeClose();n.setMenuState(!1);var r={none:t?!1:!0,transitions:t&&n.settings.transitionsSupported?!0:!1};if(r.transitions||r.none){r.none&&n.disableTransitions();r.transitions&&n.enableTransitions(n.options.closeDuration,n.options.closeEasing);var i={};i[n.options.direction]=0+n.settings.positionUnits;n.setPanelStyle(i);n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t=e(this).prop("tagName").toLowerCase()+" "+e(this).attr("class"),i=t.replace(" ","."),t=t.replace(" ","-");r.none&&n.disableFixedTransitions(t);r.transitions&&n.enableFixedTransitions(i,t,n.options.closeDuration,n.options.closeEasing);var s={};s[n.options.direction]=0+n.settings.positionUnits;e(this).css(s)});n.timeouts.afterClose=setTimeout(function(){n.setPanelStyle({position:n.settings.panelPosition});n.disableTransitions();n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t=e(this).prop("tagName").toLowerCase()+" "+e(this).attr("class"),t=t.replace(" ","-");n.disableFixedTransitions(t)});n.hideMenu();n.options.after();n.options.afterClose();n.destroyContentClickListeners()},n.options.closeDuration)}else{var s=n.getJSEasingFunction(n.options.closeEasing),o={};o[n.options.direction]=0+n.settings.positionUnits;e(n.panel).stop().animate(o,n.options.closeDuration,s,function(){n.setPanelStyle({position:n.settings.panelPosition});n.hideMenu();n.options.after();n.options.afterClose();n.destroyContentClickListeners()});n.settings.shiftFixedChildren&&e(n.fixedChildren).each(function(){var t={};t[n.options.direction]=0+n.settings.positionUnits;e(this).stop().animate(t,n.options.closeDuration,s)})}},triggerMenu:function(e){n.menuIsOpen()?n.closeMenu(e):n.openMenu(e)},initiateClickListeners:function(){e(document).on("click",n.options.trigger,function(){n.triggerMenu(n.options.animated);return!1})},destroyClickListeners:function(){e(document).off("click",n.options.trigger,null)},initiateContentClickListeners:function(){if(!n.options.closeOnContentClick)return!1;e(document).on("click",n.panel,function(e){n.menuIsOpen()&&n.closeMenu(n.options.animated)});e(document).on("touchend",n.panel,function(e){n.menuIsOpen()&&n.closeMenu(n.options.animated)})},destroyContentClickListeners:function(){if(!n.options.closeOnContentClick)return!1;e(document).off("click",n.panel,null);e(document).off("touchend",n.panel,null)},initiateKeyboardListeners:function(){var t=["input","textarea"];e(document).on("keydown",function(r){var i=e(r.target),s=!1;e.each(t,function(){i.is(this.toString())&&(s=!0)});if(s)return!0;for(mapping in n.options.keyboardShortcuts)if(r.which==n.options.keyboardShortcuts[mapping].code){var o=n.options.keyboardShortcuts[mapping];o.open&&o.close?n.triggerMenu(n.options.animated):o.open&&!o.close&&!n.menuIsOpen()?n.openMenu(n.options.animated):!o.open&&o.close&&n.menuIsOpen()&&n.closeMenu(n.options.animated);return!1}})},destroyKeyboardListeners:function(){e(document).off("keydown",null)},setupMarkup:function(){e("html").addClass("jPanelMenu");e("body > *").not(n.menu+", "+n.options.excludedPanelContent).wrapAll('
');e(n.options.menu).clone().attr("id",n.menu.replace("#","")).insertAfter("body > "+n.panel)},resetMarkup:function(){e("html").removeClass("jPanelMenu");e("body > "+n.panel+" > *").unwrap();e(n.menu).remove()},init:function(){n.options.beforeOn();n.initiateClickListeners();Object.prototype.toString.call(n.options.keyboardShortcuts)==="[object Array]"&&n.initiateKeyboardListeners();n.setjPanelMenuStyles();n.setMenuState(!1);n.setupMarkup();n.setMenuStyle({width:n.options.openPosition});n.checkFixedChildren();n.setPositionUnits();n.closeMenu(!1);n.options.afterOn()},destroy:function(){n.options.beforeOff();n.closeMenu();n.destroyClickListeners();Object.prototype.toString.call(n.options.keyboardShortcuts)==="[object Array]"&&n.destroyKeyboardListeners();n.resetMarkup();var t={};t[n.options.direction]="auto";e(n.fixedChildren).each(function(){e(this).css(t)});n.fixedChildren=[];n.options.afterOff()}};return{on:n.init,off:n.destroy,trigger:n.triggerMenu,open:n.openMenu,close:n.closeMenu,isOpen:n.menuIsOpen,menu:n.menu,getMenu:function(){return e(n.menu)},panel:n.panel,getPanel:function(){return e(n.panel)}}}})(jQuery); -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | // Avoid embed thie site in an iframe of other WebSite 4 | if (top.location != location) { 5 | top.location.href = location.href; 6 | } 7 | 8 | // btn checked box toggle 9 | $(document).on('click', '.btn-checked', function(){ 10 | var $e = $(this); 11 | var $i = $e.siblings('[name='+$e.data('name')+']'); 12 | if($e.hasClass('active')) { 13 | $i.val('true'); 14 | } else { 15 | $i.val('false'); 16 | } 17 | $e.blur(); 18 | }); 19 | 20 | // change locale and reload page 21 | $(document).on('click', '.lang-changed', function(){ 22 | var $e = $(this); 23 | var lang = $e.data('lang'); 24 | $.cookie('lang', lang, {path: '/', expires: 365}); 25 | window.location.reload(); 26 | }); 27 | 28 | (function(){ 29 | var v = $.cookie('JsStorage'); 30 | if(v){ 31 | var values = v.split(':::'); 32 | if(values.length > 1){ 33 | $.jStorage[values[0]].apply(this, values.splice(1)); 34 | } 35 | $.removeCookie('JsStorage', {path: '/'}); 36 | } 37 | })(); 38 | 39 | (function(){ 40 | 41 | $.fn.mdFilter = function(){ 42 | var $e = $(this); 43 | $e.find('img').each(function(_,img){ 44 | var $img = $(img); 45 | $img.addClass('img-responsive'); 46 | }); 47 | 48 | var $pre = $e.find('pre > code').parent(); 49 | $pre.addClass("prettyprint"); 50 | prettyPrint(); 51 | }; 52 | 53 | })(); 54 | 55 | (function(){ 56 | 57 | var caches = {}; 58 | $.fn.showGithub = function(user, repo, type, count){ 59 | 60 | $(this).each(function(){ 61 | var $e = $(this); 62 | 63 | var user = $e.data('user') || user, 64 | repo = $e.data('repo') || repo, 65 | type = $e.data('type') || type || 'watch', 66 | count = $e.data('count') == 'true' || count || true; 67 | 68 | var $mainButton = $e.html(' ').find('.github-btn'), 69 | $button = $mainButton.find('.btn'), 70 | $text = $mainButton.find('.gh-text'), 71 | $counter = $mainButton.find('.gh-count'); 72 | 73 | function addCommas(a) { 74 | return String(a).replace(/(\d)(?=(\d{3})+$)/g, '$1,'); 75 | } 76 | 77 | function callback(a) { 78 | if (type == 'watch') { 79 | $counter.html(addCommas(a.watchers)); 80 | } else { 81 | if (type == 'fork') { 82 | $counter.html(addCommas(a.forks)); 83 | } else { 84 | if (type == 'follow') { 85 | $counter.html(addCommas(a.followers)); 86 | } 87 | } 88 | } 89 | 90 | if (count) { 91 | $counter.css('display', 'inline-block'); 92 | } 93 | } 94 | 95 | function jsonp(url) { 96 | var ctx = caches[url] || {}; 97 | caches[url] = ctx; 98 | if(ctx.onload || ctx.data){ 99 | if(ctx.data){ 100 | callback(ctx.data); 101 | } else { 102 | setTimeout(jsonp, 500, url); 103 | } 104 | }else{ 105 | ctx.onload = true; 106 | $.getJSON(url, function(a){ 107 | ctx.onload = false; 108 | ctx.data = a; 109 | callback(a); 110 | }); 111 | } 112 | } 113 | 114 | var urlBase = 'https://github.com/' + user + '/' + repo; 115 | 116 | $button.attr('href', urlBase + '/'); 117 | 118 | if (type == 'watch') { 119 | $mainButton.addClass('github-watchers'); 120 | $text.html('Star'); 121 | $counter.attr('href', urlBase + '/stargazers'); 122 | } else { 123 | if (type == 'fork') { 124 | $mainButton.addClass('github-forks'); 125 | $text.html('Fork'); 126 | $counter.attr('href', urlBase + '/network'); 127 | } else { 128 | if (type == 'follow') { 129 | $mainButton.addClass('github-me'); 130 | $text.html('Follow @' + user); 131 | $button.attr('href', 'https://github.com/' + user); 132 | $counter.attr('href', 'https://github.com/' + user + '/followers'); 133 | } 134 | } 135 | } 136 | 137 | if (type == 'follow') { 138 | jsonp('https://api.github.com/users/' + user); 139 | } else { 140 | jsonp('https://api.github.com/repos/' + user + '/' + repo); 141 | } 142 | 143 | }); 144 | }; 145 | 146 | })(); 147 | 148 | 149 | $(function(){ 150 | // Encode url. 151 | var $doc = $('.docs-markdown'); 152 | $doc.find('a').each(function () { 153 | var node = $(this); 154 | var link = node.attr('href'); 155 | var index = link.indexOf('#'); 156 | if (link.indexOf('http') === 0 && link.indexOf(window.location.hostname) == -1) { 157 | return; 158 | } 159 | if (index < 0 || index + 1 > link.length) { 160 | return; 161 | } 162 | var val = link.substring(index + 1, link.length); 163 | val = encodeURIComponent(decodeURIComponent(val).toLowerCase().replace(/\s+/g, '-')); 164 | node.attr('href', link.substring(0, index) + '#' + val); 165 | }); 166 | 167 | // Set anchor. 168 | $doc.find('h1, h2, h3, h4, h5, h6').each(function () { 169 | var node = $(this); 170 | if (node.hasClass('ui')) { 171 | return; 172 | } 173 | var val = encodeURIComponent(node.text().toLowerCase().replace(/\s+/g, "-")); 174 | node = node.wrap('
'); 175 | node.append(''); 176 | }); 177 | }); 178 | 179 | $(function(){ 180 | // on dom ready 181 | 182 | $('[data-show=tooltip]').each(function(k, e){ 183 | var $e = $(e); 184 | $e.tooltip({placement: $e.data('placement'), title: $e.data('tooltip-text')}); 185 | $e.tooltip('show'); 186 | }); 187 | 188 | $('[rel=select2]').select2(); 189 | 190 | $('.markdown').mdFilter(); 191 | 192 | $('[rel=show-github]').showGithub(); 193 | 194 | if($.jPanelMenu && $('[data-toggle=jpanel-menu]').size() > 0) { 195 | var jpanelMenuTrigger = $('[data-toggle=jpanel-menu]'); 196 | 197 | var jPM = $.jPanelMenu({ 198 | animated: false, 199 | menu: jpanelMenuTrigger.data('target'), 200 | direction: 'left', 201 | trigger: '.'+ jpanelMenuTrigger.attr('class'), 202 | excludedPanelContent: '.jpanel-menu-exclude', 203 | openPosition: '180px', 204 | afterOpen: function() { 205 | jpanelMenuTrigger.addClass('open'); 206 | $('html').addClass('jpanel-menu-open'); 207 | }, 208 | afterClose: function() { 209 | jpanelMenuTrigger.removeClass('open'); 210 | $('html').removeClass('jpanel-menu-open'); 211 | } 212 | }); 213 | 214 | //jRespond settings 215 | var jRes = jRespond([{ 216 | label: 'small', 217 | enter: 0, 218 | exit: 1010 219 | }]); 220 | 221 | //turn jPanel Menu on/off as needed 222 | jRes.addFunc({ 223 | breakpoint: 'small', 224 | enter: function() { 225 | jPM.on(); 226 | }, 227 | exit: function() { 228 | jPM.off(); 229 | } 230 | }); 231 | } 232 | 233 | var $container = $('#products-showcase'); 234 | $container.imagesLoaded(function(){ 235 | $container.masonry({ 236 | itemSelector : '.product' 237 | }); 238 | }); 239 | 240 | }); 241 | 242 | })(jQuery); -------------------------------------------------------------------------------- /static/js/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 3 | window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); 4 | 5 | /*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 6 | (function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this); 7 | -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{include "base/head.html"}} 5 | {{i18n .Lang "about"}} - xorm: {{i18n .Lang "app_intro"}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | {{include "base/navbar.html"}} 17 |
18 |
19 |
20 |
21 |
22 | {{if eq .Lang "en-US"}} 23 |

24 | About

25 | 26 |

This manual documents aspects of Xorm.

27 | 28 |

29 | New to Xorm?

30 | 31 |

Read about the Quick Start.

32 | 33 |

34 | Can't find what you're looking for?

35 | 36 |

Search our mailing list (xorm@googlegroups.com).

37 | 38 |

39 | Need help?

40 | 41 |

Send an email to the xorm@googlegroups.com.

42 | 43 |

44 | Find a bug?

45 | 46 |

Open an issue on github.

47 | 48 |

49 | Want to be a contributor?

50 | 51 |

Fork the documentation project, edit and pull request.

52 | 53 |

54 | Source code of this website?

55 | 56 |

Please visit Xorm Web.

57 | {{else}} 58 |

59 | 关于

60 | 61 |

本网站文档页面详细描述了 Xorm 的各个方面。

62 | 63 |

64 | 新手指导

65 | 66 |

如果您是首次了解 Xorm,我们建议您先阅读 快速入门

67 | 68 |

69 | 其它资源

70 | 71 |

如果您无法找到相关问题的满意答案,可以在 邮件列表 (xorm@googlegroups.com) 中搜索。

72 | 73 |

74 | 寻求帮助

75 | 76 |

如果您遇到无法解决的问题,可以发送邮件到 xorm@googlegroups.com 提问。

77 | 78 |

79 | 问题提交

80 | 81 |

如果您在使用过程中发现 Xorm 有潜在的问题,请通过 Xorm 上的问题列表提交。

82 | 83 |

84 | 完善文档

85 | 86 |

您可以通过派生 文档项目、编辑,然后提交合并请求。

87 | 88 |

89 | 网站源码

90 | 91 |

请移步 Xorm Web

92 | {{end}} 93 |
94 |
95 |
96 |
97 |
98 |
99 | {{include "base/footer.html"}} 100 | 101 | 102 | -------------------------------------------------------------------------------- /templates/base/disqus.html: -------------------------------------------------------------------------------- 1 |
2 | 13 | 14 | comments powered by Disqus -------------------------------------------------------------------------------- /templates/base/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | {{if .T.IsPro}} 56 | 66 | {{end}} -------------------------------------------------------------------------------- /templates/base/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /templates/base/navbar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/docs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{include "base/head.html"}} 5 | {{i18n .Lang "docs"}} - xorm: {{i18n .Lang "app_intro"}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | {{include "base/navbar.html"}} 19 |
20 |
21 | 22 | {{include "base/disqus.html"}} 23 |
24 |
25 |
26 | {{include "base/footer.html"}} 27 | 28 | -------------------------------------------------------------------------------- /templates/donate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{include "base/head.html"}} 5 | {{i18n .Lang "donate"}} - xorm: {{i18n .Lang "app_intro"}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | {{include "base/navbar.html"}} 18 |
19 |
20 |
21 |
22 |
23 |
24 | {{if eq .Lang "en-US"}} 25 |

26 | Donation

27 | 28 |

29 | 30 | We will continue hard working with your huge support! 31 |

32 | 33 |

34 | 35 | Donate by Paypal: 36 |

37 | 38 |

39 | 40 | 41 |

42 | Your donation will be used as:

43 | 44 |
    45 |
  • Supports the development of Beego
  • 46 |
  • Supports maintaining the communities
  • 47 |
  • Upgrade to better server
  • 48 |
  • Award the outstanding contributors
  • 49 |
  • Holds community activities and lectures
  • 50 |
51 | 52 | {{else}} 53 |

54 | 捐赠我们

55 | 56 |

57 | 58 | 在您的支持与鼓励下,Xorm 开发团队将会更加努力地开发出更好的产品! 59 |

60 | 61 |

62 | 63 | 支付宝捐赠: 64 |

65 | 66 |

67 | 68 |

69 | 70 | Paypal 捐赠 71 |

72 | 73 |

74 |

75 | 您的捐赠将被用于:

76 | 77 |
    78 |
  • 持续和深入的开发
  • 79 |
  • 维护社区的运行稳定
  • 80 |
  • 租用更好的带宽
  • 81 |
  • 奖励团队的杰出贡献者
  • 82 |
  • 社区活动或讲座
  • 83 |
84 | {{end}} 85 | 86 |

87 | Donation Lists (descending by donating time)

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 |
Donated atDonatorAmountContactComments
2014-11-14Eyu.鼎盛国际500¥eyu8.ds@gmail.comxorm so good
2014-7-8Steven Wang100¥easykooc@gmail.comxorm目前做得最好的orm for golang
2014-7-8韩天峰20¥apolov@vip.qq.comxorm是Golang里最好用的DB库
2014-7-8sunhongjian100¥shongjiang@gmail.com支持开源,支持美好的事物!
2014-7-8Jimmy Kuu200¥jimmy.kuu@gmail.com再接再厉,持续发展
2014-7-8张仲东100¥GoCMS作者支持XORM!!
2014-7-8wangwei100¥iamjcww@gmail.com鄙视楼下
2014-7-8Jazz2¥1002376560@qq.com这个沙发必须抢
158 |
159 |
160 |
161 |
162 |
163 |
164 | {{include "base/footer.html"}} 165 |
166 | 167 | 168 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{include "base/head.html"}} 5 | {{i18n .Lang "homepage"}} - xorm: {{i18n .Lang "app_intro"}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | {{include "base/navbar.html"}} 18 |
19 |
20 |
21 |
22 | XORM - eXtra ORM for Go 23 |
24 |
25 | {{i18n .Lang "home.gogs_desc"}} 26 |
27 | 31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |

{{i18n .Lang "home.quick_start"}}

39 |
40 |
41 |
42 | {{if eq .Lang "zh-CN"}} 43 |

库安装

44 |

go get github.com/go-xorm/xorm

45 |

Xorm工具

46 |

go get github.com/go-xorm/cmd/xorm

47 |

源码文档

48 |

gowalker.org/github.com/go-xorm/xorm

49 |

godoc.org/github.com/go-xorm/xorm

50 | {{else}} 51 |

Library Installation

52 |

go get github.com/go-xorm/xorm

53 |

Xorm Tools Installation

54 |

go get github.com/go-xorm/cmd/xorm

55 |

Source Document

56 |

gowalker.org/github.com/go-xorm/xorm

57 |

godoc.org/github.com/go-xorm/xorm

58 | {{end}} 59 |
60 |
61 |
62 |
63 | {{if eq .Lang "zh-CN"}} 64 |

运行及初始化:

65 |
    66 |
  1. 初始化 orm, err := xorm.NewEngine("sqlite3", "./test.db")
  2. 67 |
  3. 同步数据库结构 err = orm.Sync(new(User), new(Article))
  4. 68 |
69 |

恭喜!您已经成功地运行了 Xorm。

70 |

请阅读 使用手册 以获取更多信息。

71 | {{else}} 72 |

Run and setup:

73 |
    74 |
  1. Init orm orm, err := xorm.NewEngine("sqlite3", "./test.db")
  2. 75 |
  3. Sync database structs err = orm.Sync(new(User), new(Article))
  4. 76 |
77 |

Congratulations! You just get your Xorm running.

78 |

Please see Documentation for going further.

79 | {{end}} 80 |
81 |
82 |
83 |
84 |
85 |
86 |

{{i18n .Lang "home.further_reading"}}

87 |
88 | 105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |

{{i18n .Lang "home.features"}}

114 |
115 |
116 |
117 |

118 | {{if eq .Lang "zh-CN"}} 119 | 少依赖 120 | {{else}} 121 | LESS DEPENDENCY 122 | {{end}} 123 |

124 |

125 | {{if eq .Lang "zh-CN"}} 126 | xorm除了依赖github.com/go-xorm/core之外不依赖其它第三方库。 127 | {{else}} 128 | Only depends github.com/go-xorm/core. 129 | {{end}} 130 |

131 |
132 |
133 |
134 |
135 |

136 | {{if eq .Lang "zh-CN"}} 137 | 易使用 138 | {{else}} 139 | EASY USAGE 140 | {{end}} 141 |

142 |

143 | {{if eq .Lang "zh-CN"}} 144 | 通过连写操作,可以通过很少的语句完成数据库操作。 145 | {{else}} 146 | By join function design, use less codes to finish DB operations. 147 | {{end}} 148 |

149 |
150 |
151 |
152 |
153 |

154 | {{if eq .Lang "zh-CN"}} 155 | 功能全 156 | {{else}} 157 | RICH FUNCTIONS 158 | {{end}} 159 |

160 |

161 | {{if eq .Lang "zh-CN"}} 162 | 支持缓存,事务,乐观锁,多种数据库支持,反转等等特性。 163 | {{else}} 164 | Support cache, transaction, Optimistic Lock, Multiple Database support, Reverse and tect. 165 | {{end}} 166 |

167 |
168 |
169 |
170 |
171 |

172 | {{if eq .Lang "zh-CN"}} 173 | 开源化 174 | {{else}} 175 | OPEN SOURCE 176 | {{end}} 177 |

178 |

179 | {{if eq .Lang "zh-CN"}} 180 | 通过加入我们来参与、分享和学习,并成为一个贡献者。 181 | {{else}} 182 | Join, share and learn by involving this great project and be a contributor. 183 | {{end}} 184 |

185 |
186 |
187 |
188 |
189 |
190 |
191 | 192 |
193 |
194 |
195 |

{{i18n .Lang "home.who_are_use"}}

196 |
197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 |
205 |
206 | 207 |
208 |

{{i18n .Lang "home.friends"}}

209 |
210 | 211 | 212 | Go Daily 213 |
214 |
215 |
216 |
217 | {{include "base/footer.html"}} 218 | 219 | 220 | -------------------------------------------------------------------------------- /templates/link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{include "base/head.html"}} 5 | {{i18n .Lang "link"}} - xorm: {{i18n .Lang "app_intro"}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | {{include "base/navbar.html"}} 18 |
19 |
20 | 34 |
35 |
36 | {{include "base/footer.html"}} 37 |
38 | 39 | 40 | --------------------------------------------------------------------------------