├── .gitattributes ├── .gitignore ├── Bridge └── CRBridge.go ├── Judge ├── Compile.go ├── CompileRunManager.go ├── Listener.go ├── Run.go └── lxcmain.go ├── LICENSE.md ├── README.md ├── conf ├── app.conf └── db.sql ├── controllers ├── Admin.go ├── BaseController.go ├── ContestController.go ├── ProblemController.go └── UserController.go ├── firstSetup.bash ├── lxcSetup.bash ├── lxcWebPanel.bash ├── main.go ├── models ├── ContestScore.go ├── Exec.go ├── Models.go ├── Problem.go ├── ProblemLogs.go ├── Score.go ├── TestCases.go ├── User.go ├── Verify.go └── contest.go ├── restart.bash ├── routers └── router.go ├── startJudge.bash ├── static ├── CodeMirror │ ├── addon │ │ ├── comment │ │ │ ├── comment.js │ │ │ └── continuecomment.js │ │ ├── dialog │ │ │ ├── dialog.css │ │ │ └── dialog.js │ │ ├── display │ │ │ ├── fullscreen.css │ │ │ ├── fullscreen.js │ │ │ ├── panel.js │ │ │ ├── placeholder.js │ │ │ └── rulers.js │ │ ├── edit │ │ │ ├── closebrackets.js │ │ │ ├── closetag.js │ │ │ ├── continuelist.js │ │ │ ├── matchbrackets.js │ │ │ ├── matchtags.js │ │ │ └── trailingspace.js │ │ ├── fold │ │ │ ├── brace-fold.js │ │ │ ├── comment-fold.js │ │ │ ├── foldcode.js │ │ │ ├── foldgutter.css │ │ │ ├── foldgutter.js │ │ │ ├── indent-fold.js │ │ │ ├── markdown-fold.js │ │ │ └── xml-fold.js │ │ ├── hint │ │ │ ├── anyword-hint.js │ │ │ ├── css-hint.js │ │ │ ├── html-hint.js │ │ │ ├── javascript-hint.js │ │ │ ├── show-hint.css │ │ │ ├── show-hint.js │ │ │ ├── sql-hint.js │ │ │ └── xml-hint.js │ │ ├── lint │ │ │ ├── coffeescript-lint.js │ │ │ ├── css-lint.js │ │ │ ├── javascript-lint.js │ │ │ ├── json-lint.js │ │ │ ├── lint.css │ │ │ ├── lint.js │ │ │ └── yaml-lint.js │ │ ├── merge │ │ │ ├── merge.css │ │ │ └── merge.js │ │ ├── mode │ │ │ ├── loadmode.js │ │ │ ├── multiplex.js │ │ │ ├── multiplex_test.js │ │ │ ├── overlay.js │ │ │ └── simple.js │ │ ├── runmode │ │ │ ├── colorize.js │ │ │ ├── runmode-standalone.js │ │ │ ├── runmode.js │ │ │ └── runmode.node.js │ │ ├── scroll │ │ │ ├── annotatescrollbar.js │ │ │ ├── scrollpastend.js │ │ │ ├── simplescrollbars.css │ │ │ └── simplescrollbars.js │ │ ├── search │ │ │ ├── match-highlighter.js │ │ │ ├── matchesonscrollbar.css │ │ │ ├── matchesonscrollbar.js │ │ │ ├── search.js │ │ │ └── searchcursor.js │ │ ├── selection │ │ │ ├── active-line.js │ │ │ ├── mark-selection.js │ │ │ └── selection-pointer.js │ │ ├── tern │ │ │ ├── tern.css │ │ │ ├── tern.js │ │ │ └── worker.js │ │ └── wrap │ │ │ └── hardwrap.js │ ├── doc │ │ ├── activebookmark.js │ │ ├── compress.html │ │ ├── docs.css │ │ ├── internals.html │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── manual.html │ │ ├── realworld.html │ │ ├── releases.html │ │ ├── reporting.html │ │ ├── upgrade_v2.2.html │ │ ├── upgrade_v3.html │ │ ├── upgrade_v4.html │ │ └── yinyang.png │ ├── keymap │ │ ├── emacs.js │ │ ├── sublime.js │ │ └── vim.js │ ├── lib │ │ ├── codemirror.css │ │ └── codemirror.js │ ├── mode │ │ ├── apl │ │ │ ├── apl.js │ │ │ └── index.html │ │ ├── asciiarmor │ │ │ ├── asciiarmor.js │ │ │ └── index.html │ │ ├── asn.1 │ │ │ ├── asn.1.js │ │ │ └── index.html │ │ ├── asterisk │ │ │ ├── asterisk.js │ │ │ └── index.html │ │ ├── brainfuck │ │ │ ├── brainfuck.js │ │ │ └── index.html │ │ ├── clike │ │ │ ├── clike.js │ │ │ ├── index.html │ │ │ ├── scala.html │ │ │ └── test.js │ │ ├── clojure │ │ │ ├── clojure.js │ │ │ └── index.html │ │ ├── cmake │ │ │ ├── cmake.js │ │ │ └── index.html │ │ ├── cobol │ │ │ ├── cobol.js │ │ │ └── index.html │ │ ├── coffeescript │ │ │ ├── coffeescript.js │ │ │ └── index.html │ │ ├── commonlisp │ │ │ ├── commonlisp.js │ │ │ └── index.html │ │ ├── css │ │ │ ├── css.js │ │ │ ├── index.html │ │ │ ├── less.html │ │ │ ├── less_test.js │ │ │ ├── scss.html │ │ │ ├── scss_test.js │ │ │ └── test.js │ │ ├── cypher │ │ │ ├── cypher.js │ │ │ └── index.html │ │ ├── d │ │ │ ├── d.js │ │ │ └── index.html │ │ ├── dart │ │ │ ├── dart.js │ │ │ └── index.html │ │ ├── diff │ │ │ ├── diff.js │ │ │ └── index.html │ │ ├── django │ │ │ ├── django.js │ │ │ └── index.html │ │ ├── dockerfile │ │ │ ├── dockerfile.js │ │ │ └── index.html │ │ ├── dtd │ │ │ ├── dtd.js │ │ │ └── index.html │ │ ├── dylan │ │ │ ├── dylan.js │ │ │ └── index.html │ │ ├── ebnf │ │ │ ├── ebnf.js │ │ │ └── index.html │ │ ├── ecl │ │ │ ├── ecl.js │ │ │ └── index.html │ │ ├── eiffel │ │ │ ├── eiffel.js │ │ │ └── index.html │ │ ├── elm │ │ │ ├── elm.js │ │ │ └── index.html │ │ ├── erlang │ │ │ ├── erlang.js │ │ │ └── index.html │ │ ├── factor │ │ │ ├── factor.js │ │ │ └── index.html │ │ ├── forth │ │ │ ├── forth.js │ │ │ └── index.html │ │ ├── fortran │ │ │ ├── fortran.js │ │ │ └── index.html │ │ ├── gas │ │ │ ├── gas.js │ │ │ └── index.html │ │ ├── gfm │ │ │ ├── gfm.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── gherkin │ │ │ ├── gherkin.js │ │ │ └── index.html │ │ ├── go │ │ │ ├── go.js │ │ │ └── index.html │ │ ├── groovy │ │ │ ├── groovy.js │ │ │ └── index.html │ │ ├── haml │ │ │ ├── haml.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── handlebars │ │ │ ├── handlebars.js │ │ │ └── index.html │ │ ├── haskell │ │ │ ├── haskell.js │ │ │ └── index.html │ │ ├── haxe │ │ │ ├── haxe.js │ │ │ └── index.html │ │ ├── htmlembedded │ │ │ ├── htmlembedded.js │ │ │ └── index.html │ │ ├── htmlmixed │ │ │ ├── htmlmixed.js │ │ │ └── index.html │ │ ├── http │ │ │ ├── http.js │ │ │ └── index.html │ │ ├── idl │ │ │ ├── idl.js │ │ │ └── index.html │ │ ├── index.html │ │ ├── jade │ │ │ ├── index.html │ │ │ └── jade.js │ │ ├── javascript │ │ │ ├── index.html │ │ │ ├── javascript.js │ │ │ ├── json-ld.html │ │ │ ├── test.js │ │ │ └── typescript.html │ │ ├── jinja2 │ │ │ ├── index.html │ │ │ └── jinja2.js │ │ ├── julia │ │ │ ├── index.html │ │ │ └── julia.js │ │ ├── kotlin │ │ │ ├── index.html │ │ │ └── kotlin.js │ │ ├── livescript │ │ │ ├── index.html │ │ │ └── livescript.js │ │ ├── lua │ │ │ ├── index.html │ │ │ └── lua.js │ │ ├── markdown │ │ │ ├── index.html │ │ │ ├── markdown.js │ │ │ └── test.js │ │ ├── mathematica │ │ │ ├── index.html │ │ │ └── mathematica.js │ │ ├── meta.js │ │ ├── mirc │ │ │ ├── index.html │ │ │ └── mirc.js │ │ ├── mllike │ │ │ ├── index.html │ │ │ └── mllike.js │ │ ├── modelica │ │ │ ├── index.html │ │ │ └── modelica.js │ │ ├── mumps │ │ │ ├── index.html │ │ │ └── mumps.js │ │ ├── nginx │ │ │ ├── index.html │ │ │ └── nginx.js │ │ ├── ntriples │ │ │ ├── index.html │ │ │ └── ntriples.js │ │ ├── octave │ │ │ ├── index.html │ │ │ └── octave.js │ │ ├── pascal │ │ │ ├── index.html │ │ │ └── pascal.js │ │ ├── pegjs │ │ │ ├── index.html │ │ │ └── pegjs.js │ │ ├── perl │ │ │ ├── index.html │ │ │ └── perl.js │ │ ├── php │ │ │ ├── index.html │ │ │ ├── php.js │ │ │ └── test.js │ │ ├── pig │ │ │ ├── index.html │ │ │ └── pig.js │ │ ├── properties │ │ │ ├── index.html │ │ │ └── properties.js │ │ ├── puppet │ │ │ ├── index.html │ │ │ └── puppet.js │ │ ├── python │ │ │ ├── index.html │ │ │ └── python.js │ │ ├── q │ │ │ ├── index.html │ │ │ └── q.js │ │ ├── r │ │ │ ├── index.html │ │ │ └── r.js │ │ ├── rpm │ │ │ ├── changes │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ └── rpm.js │ │ ├── rst │ │ │ ├── index.html │ │ │ └── rst.js │ │ ├── ruby │ │ │ ├── index.html │ │ │ ├── ruby.js │ │ │ └── test.js │ │ ├── rust │ │ │ ├── index.html │ │ │ └── rust.js │ │ ├── sass │ │ │ ├── index.html │ │ │ └── sass.js │ │ ├── scheme │ │ │ ├── index.html │ │ │ └── scheme.js │ │ ├── shell │ │ │ ├── index.html │ │ │ ├── shell.js │ │ │ └── test.js │ │ ├── sieve │ │ │ ├── index.html │ │ │ └── sieve.js │ │ ├── slim │ │ │ ├── index.html │ │ │ ├── slim.js │ │ │ └── test.js │ │ ├── smalltalk │ │ │ ├── index.html │ │ │ └── smalltalk.js │ │ ├── smarty │ │ │ ├── index.html │ │ │ └── smarty.js │ │ ├── solr │ │ │ ├── index.html │ │ │ └── solr.js │ │ ├── soy │ │ │ ├── index.html │ │ │ └── soy.js │ │ ├── sparql │ │ │ ├── index.html │ │ │ └── sparql.js │ │ ├── spreadsheet │ │ │ ├── index.html │ │ │ └── spreadsheet.js │ │ ├── sql │ │ │ ├── index.html │ │ │ └── sql.js │ │ ├── stex │ │ │ ├── index.html │ │ │ ├── stex.js │ │ │ └── test.js │ │ ├── stylus │ │ │ ├── index.html │ │ │ └── stylus.js │ │ ├── swift │ │ │ ├── index.html │ │ │ └── swift.js │ │ ├── tcl │ │ │ ├── index.html │ │ │ └── tcl.js │ │ ├── textile │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── textile.js │ │ ├── tiddlywiki │ │ │ ├── index.html │ │ │ ├── tiddlywiki.css │ │ │ └── tiddlywiki.js │ │ ├── tiki │ │ │ ├── index.html │ │ │ ├── tiki.css │ │ │ └── tiki.js │ │ ├── toml │ │ │ ├── index.html │ │ │ └── toml.js │ │ ├── tornado │ │ │ ├── index.html │ │ │ └── tornado.js │ │ ├── troff │ │ │ ├── index.html │ │ │ └── troff.js │ │ ├── ttcn-cfg │ │ │ ├── index.html │ │ │ └── ttcn-cfg.js │ │ ├── ttcn │ │ │ ├── index.html │ │ │ └── ttcn.js │ │ ├── turtle │ │ │ ├── index.html │ │ │ └── turtle.js │ │ ├── twig │ │ │ ├── index.html │ │ │ └── twig.js │ │ ├── vb │ │ │ ├── index.html │ │ │ └── vb.js │ │ ├── vbscript │ │ │ ├── index.html │ │ │ └── vbscript.js │ │ ├── velocity │ │ │ ├── index.html │ │ │ └── velocity.js │ │ ├── verilog │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── verilog.js │ │ ├── vhdl │ │ │ ├── index.html │ │ │ └── vhdl.js │ │ ├── xml │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── xml.js │ │ ├── xquery │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── xquery.js │ │ ├── yaml │ │ │ ├── index.html │ │ │ └── yaml.js │ │ └── z80 │ │ │ ├── index.html │ │ │ └── z80.js │ └── theme │ │ ├── 3024-day.css │ │ ├── 3024-night.css │ │ ├── ambiance-mobile.css │ │ ├── ambiance.css │ │ ├── base16-dark.css │ │ ├── base16-light.css │ │ ├── blackboard.css │ │ ├── cobalt.css │ │ ├── colorforth.css │ │ ├── dracula.css │ │ ├── eclipse.css │ │ ├── elegant.css │ │ ├── erlang-dark.css │ │ ├── icecoder.css │ │ ├── lesser-dark.css │ │ ├── liquibyte.css │ │ ├── material.css │ │ ├── mbo.css │ │ ├── mdn-like.css │ │ ├── midnight.css │ │ ├── monokai.css │ │ ├── neat.css │ │ ├── neo.css │ │ ├── night.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── pastel-on-dark.css │ │ ├── rubyblue.css │ │ ├── seti.css │ │ ├── solarized.css │ │ ├── the-matrix.css │ │ ├── tomorrow-night-bright.css │ │ ├── tomorrow-night-eighties.css │ │ ├── ttcn.css │ │ ├── twilight.css │ │ ├── vibrant-ink.css │ │ ├── xq-dark.css │ │ ├── xq-light.css │ │ ├── yeti.css │ │ └── zenburn.css ├── css │ ├── 960.css │ ├── reset.css │ └── styles.css ├── index.html └── js │ ├── jquery-2.1.4.min.js │ ├── js.cookie.js │ └── script.js ├── tests └── default_test.go └── views ├── errorHead.tpl ├── layout.tpl ├── login.html ├── problem ├── addtest.tpl ├── create.tpl ├── list.tpl ├── show.tpl └── submit_head.tpl ├── sidebar ├── recently_solved_by.tpl └── showcategories.tpl ├── testExec.html └── user ├── login.tpl └── show.tpl /.gitattributes: -------------------------------------------------------------------------------- 1 | static/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tests 2 | OnlineJudge 3 | -------------------------------------------------------------------------------- /Judge/Listener.go: -------------------------------------------------------------------------------- 1 | package Judge 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | const ( 13 | directories = 10 14 | prefix = "d" 15 | requestName = "problem.json" 16 | solutionName = "solution.json" 17 | ProgramFileName = "code" 18 | ) 19 | 20 | func DirectoryListener(dir string) { 21 | i := true 22 | _, _ = os.Create(dir + "file") 23 | for i == true { 24 | if file, _ := os.OpenFile(dir+requestName, os.O_RDWR, 0777); file != nil { 25 | file.Close() 26 | bytes, _ := ioutil.ReadFile(dir + requestName) 27 | cr := CRManager{} 28 | json.Unmarshal(bytes, &cr) 29 | cr.Program.name = ProgramFileName 30 | cr.Program.path = dir 31 | cr.CR() 32 | solutionBytes, _ := json.Marshal(&cr) 33 | ioutil.WriteFile(dir+solutionName, solutionBytes, 0755) 34 | os.Remove(dir + requestName) 35 | } 36 | time.Sleep(time.Second) 37 | } 38 | } 39 | 40 | func init() { 41 | log.Println("Judge: Successful") 42 | for i := 1; i <= directories; i++ { 43 | dir := prefix + strconv.Itoa(i) + "/" 44 | go DirectoryListener(dir) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Judge/lxcmain.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "Judge" 5 | "time" 6 | ) 7 | 8 | func main() { 9 | time.Sleep(time.Hour * 10000) 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Ronak Jain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OnlineJudge (Deprecated) 2 | Judge built using Golang for hosting competetive programming contests and problems. Real time compilation and execution 3 | of programs against testcases. Safe compilation and execution of the user program carried out in Linux containers 4 | protecting host against malicious code. Languages supported are 5 | * C++ 6 | * C 7 | * Python (3.4 & 2.7) 8 | * Java 9 | * Golang (1.4) 10 | (Check serverLxc branch) 11 | 12 | ## Requirements 13 | * GoLang (1.4 or higher) 14 | * mysql 15 | 16 | ## Installation 17 | ``` 18 | go get -u github.com/JRonak/OnlineJudge 19 | ``` 20 | Run the firstsetup.bash to setup Linux containers 21 | In the project directory 22 | ``` 23 | bee run 24 | ``` 25 | Make sure $GOPATH and git are added to env. Also setup dependencies 26 | 27 | ## Dependancy 28 | * Beego Framework 29 | ``` 30 | go get github.com/astaxie/beego 31 | ``` 32 | * Bcrypt 33 | ``` 34 | golang.org/x/crypto/bcrypt 35 | ``` 36 | * Go-Sql-Driver 37 | ``` 38 | go get github.com/go-sql-driver/mysql 39 | ``` 40 | -------------------------------------------------------------------------------- /conf/app.conf: -------------------------------------------------------------------------------- 1 | appname = OnlineJudge 2 | httpport = 8080 3 | runmode = dev 4 | copyrequestbody = true -------------------------------------------------------------------------------- /controllers/Admin.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "OnlineJudge/models" 5 | "encoding/json" 6 | "strconv" 7 | ) 8 | 9 | type AdminController struct { 10 | BaseController 11 | } 12 | 13 | func (this *AdminController) isAdmin() bool { 14 | if !this.isLoggedIn() { 15 | this.Redirect("/user/login", 302) 16 | return false 17 | } 18 | name := this.GetSession("Uid") 19 | if name.(string) != "admin" { 20 | this.Redirect("/", 302) 21 | return false 22 | } 23 | return true 24 | } 25 | 26 | func (this *AdminController) isLoggedIn() bool { 27 | if this.GetSession("id") != nil { 28 | return true 29 | } 30 | return false 31 | } 32 | 33 | func (this *AdminController) ShowEditors() { 34 | if !this.isAdmin() { 35 | return 36 | } 37 | user := models.User{} 38 | users := user.GetEditors() 39 | bytes, _ := json.Marshal(users) 40 | this.Data["json"] = string(bytes) 41 | this.ServeJson() 42 | } 43 | 44 | // /admin/makeEditor/:uid 45 | func (this *AdminController) MakeEditor() { 46 | if !this.isAdmin() { 47 | return 48 | } 49 | uid := this.Ctx.Input.Param("uid") 50 | user := models.User{} 51 | id, _ := strconv.Atoi(uid) 52 | user.Uid = id 53 | status := user.MakeEditor() 54 | this.Data["status"] = status 55 | } 56 | 57 | // /admin/revokeEditor/:uid 58 | func (this *AdminController) RevokeEditor() { 59 | if !this.isAdmin() { 60 | return 61 | } 62 | uid := this.Ctx.Input.Param("uid") 63 | user := models.User{} 64 | id, _ := strconv.Atoi(uid) 65 | user.Uid = id 66 | status := user.RevokeEditor() 67 | this.Data["status"] = status 68 | } 69 | 70 | // /admin/search/name/:name 71 | func (this *AdminController) SearchName() { 72 | if !this.isAdmin() { 73 | return 74 | } 75 | name := this.Ctx.Input.Param(":name") 76 | user := models.User{} 77 | user.Name = name 78 | users, _ := user.SearchByName() 79 | bytes, _ := json.Marshal(users) 80 | this.Data["json"] = string(bytes) 81 | this.ServeJson() 82 | } 83 | 84 | // /admin/search/name/:uid 85 | func (this *AdminController) DeleteUser() { 86 | if !this.isAdmin() { 87 | return 88 | } 89 | 90 | uid := this.Ctx.Input.Param("uid") 91 | user := models.User{} 92 | id, _ := strconv.Atoi(uid) 93 | user.Uid = id 94 | status := user.Delete() 95 | this.Data["status"] = status 96 | } 97 | -------------------------------------------------------------------------------- /controllers/BaseController.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "OnlineJudge/models" 6 | ) 7 | 8 | type BaseController struct { 9 | beego.Controller 10 | } 11 | 12 | func (this *BaseController) Prepare() { 13 | uname := this.GetSession("Uid") 14 | uid := this.GetSession("id") 15 | 16 | this.Data["logged"] = false 17 | if uname != nil { 18 | user := models.User{ Uid: uid.(int), Username: uname.(string) } 19 | _ = user.GetUserInfo() 20 | this.Data["isEditor"] = false 21 | if user.IsEditor() { 22 | this.Data["isEditor"] = true 23 | } 24 | this.Data["user"] = user 25 | this.Data["login"] = uname.(string) 26 | this.Data["logged"] = true 27 | } 28 | } -------------------------------------------------------------------------------- /firstSetup.bash: -------------------------------------------------------------------------------- 1 | 2 | if [ "$EUID" -ne 0 ] 3 | then echo "Please run as root" 4 | exit 1 5 | fi 6 | apt-get install gcc 7 | if [ "$?" -ne 0 ] 8 | then echo "Gcc installation failed" 9 | exit 1 10 | fi 11 | apt-get install g++ 12 | if [ "$?" -ne 0 ] 13 | then echo "G++ installation failed" 14 | exit 1 15 | fi 16 | apt-get install python 17 | if [ "$?" -ne 0 ] 18 | then echo "Python2 installation failed" 19 | exit 1 20 | fi 21 | apt-get install python3 22 | if [ "$?" -ne 0 ] 23 | then echo "Python3 installation failed" 24 | exit 1 25 | fi 26 | apt-get install wget 27 | wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz 28 | tar -C /usr/local -xzf go*.tar.gz 29 | rm go*.tar.gz 30 | apt-get install openjdk-6-jdk 31 | if [ "$?" -ne 0 ] 32 | then echo "Python3 installation failed" 33 | exit 1 34 | fi 35 | i=1 36 | while [ $i -lt 11 ] 37 | do 38 | mkdir d$i 39 | chmod a+rwx d$i 40 | touch d$i/GoBackhomeKid 41 | chattr +i d$i/GoBackhomeKid 42 | ((i=i+1)) 43 | done 44 | mkdir -p go/src/Judge 45 | chmod o-r go 46 | export PATH=$PATH:/usr/local/go/bin 47 | export GOPATH=/home/ubuntu/go 48 | cp -R Judge firstSetup.bash *.bash go/src 49 | rm * 50 | rm -r Judge 51 | cd go/src/Judge 52 | cp lxc* ../ 53 | rm lxc** 54 | go build 55 | cd .. 56 | go build lxcmain.go 57 | cp lxcmain /home/ubuntu 58 | cp startJudge.bash /home/ubuntu 59 | cd /home/ubuntu 60 | chmod o+rw lxcmain startJudge.bash 61 | echo "Go to localhost:5000 Setup the constraints for the container 62 | Then run the startJudge.bash as user 63 | " -------------------------------------------------------------------------------- /lxcSetup.bash: -------------------------------------------------------------------------------- 1 | #!bin/bash 2 | container=judge1 3 | if [ "$EUID" -ne 0 ] 4 | then echo "Please run as root" 5 | exit 1 6 | fi 7 | apt-get install lxc-dev 8 | if [ "$?" -ne 0 ] 9 | then echo "*******Lxc package installation failed*********" 10 | exit 1 11 | fi 12 | echo "*********Installing primary container, please be patient***********" 13 | lxc-create -t ubuntu -n $container 14 | chmod a+rwx /var/lib/lxc/$container 15 | chmod a+rwx /var/lib/lxc/$container/rootfs 16 | chmod a+rxw /var/lib/lxc/$container/rootfs/home/ubuntu/ 17 | cp -R Judge /var/lib/lxc/$container/rootfs/home/ubuntu/ 18 | cp firstSetup.bash startJudge.bash restart.bash .lxcmain.go /var/lib/lxc/$container/rootfs/home/ubuntu/ 19 | echo "********Open another terminal, run the following command****** 20 | *lxc-start -n $container 21 | *lxc-console -n $container 22 | *Username:ubuntu 23 | *Password:ubuntu 24 | *Recommended to change the default Password 25 | *Setup root Password 26 | *As root run script firstSetup.bash*********" 27 | exit 0 28 | -------------------------------------------------------------------------------- /lxcWebPanel.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt-get install lxc debootstrap bridge-utils -y 3 | sudo su 4 | wget http://lxc-webpanel.github.com/tools/install.sh -O - | bash -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "OnlineJudge/routers" 5 | "github.com/astaxie/beego" 6 | "strings" 7 | ) 8 | 9 | func main() { 10 | beego.SessionOn = true 11 | beego.SessionName = "OnlineJudge" 12 | beego.SessionProvider = "OnlineJudge" 13 | beego.SessionCookieLifeTime = 0 14 | beego.SessionProvider = "file" 15 | beego.SessionSavePath = "./tmp" 16 | 17 | beego.AddFuncMap("n2br", n2br) 18 | beego.Run() 19 | } 20 | 21 | func n2br(str string) string { 22 | return strings.Replace(str,"\n","
",-1) 23 | } 24 | -------------------------------------------------------------------------------- /models/ContestScore.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | ) 6 | 7 | func (score *Contestlogs) Add() bool { 8 | o := orm.NewOrm() 9 | o.Using("default") 10 | _, err := o.Insert(score) 11 | if err != nil { 12 | return false 13 | } 14 | return true 15 | } 16 | 17 | func (score *Contestlogs) GetByUidCid() bool { 18 | o := orm.NewOrm() 19 | o.Using("default") 20 | err := o.QueryTable("contestlogs").Filter("uid", score.Uid).Filter("cid", score.Cid).One(score) 21 | if err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | 27 | func (score *Contestlogs) Update() bool { 28 | o := orm.NewOrm() 29 | o.Using("default") 30 | _, err := o.Update(score) 31 | if err != nil { 32 | return false 33 | } 34 | return true 35 | } 36 | 37 | func (score *Contestlogs) GetByCid() (*[]Contestlogs, bool) { 38 | logs := new([]Contestlogs) 39 | o := orm.NewOrm() 40 | o.Using("default") 41 | _, err := o.QueryTable("contestlogs").Filter("cid", score.Cid).OrderBy("-points").All(logs) 42 | if err != nil { 43 | return nil, false 44 | } 45 | return logs, true 46 | } 47 | -------------------------------------------------------------------------------- /models/Exec.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "OnlineJudge/Bridge" 5 | ) 6 | 7 | // Just run code used here. if stdin is nil, then sample input is used 8 | func Exec(pid int, rawCode string, lang string, stdin string) Bridge.Code { 9 | code := Bridge.Code{Lang: lang, Stdin: stdin} 10 | cr := Bridge.CRManager{Program: &code, RawCode: &rawCode} 11 | if stdin == "" { 12 | problem := new(Problem) 13 | problem.Pid = pid 14 | if err := problem.GetSampleIOByPid(); err != true { 15 | return Bridge.Code{} 16 | } 17 | code.Stdin = problem.Sample_input 18 | Bridge.CompileExec(&cr) 19 | if code.Stdout != problem.Sample_output { 20 | code.RunStatus = false 21 | } 22 | } else { 23 | Bridge.CompileExec(&cr) 24 | } 25 | return code 26 | } 27 | 28 | func ExecBatch(pid int, rawcode string, lang string) []Bridge.TestCaseStatus { 29 | testcase := Testcases{} 30 | testcase.Pid = pid 31 | testcases, count := testcase.GetAllByPid() 32 | j := Bridge.TestCaseStatus{} 33 | j.Comment = "Internal Error" 34 | j.Success = false 35 | if count == 0 { 36 | return []Bridge.TestCaseStatus{j} 37 | } 38 | code := Bridge.Code{} 39 | code.Lang = lang 40 | cr := Bridge.CRManager{} 41 | cr.RawCode = &rawcode 42 | cr.Program = &code 43 | cr.Isbatch = true 44 | testInput := make([]string, count) 45 | testOutput := make([]string, count) 46 | for i, test := range testcases { 47 | testInput[i] = test.Input 48 | testOutput[i] = test.Output 49 | 50 | } 51 | cr.TestInput = testInput 52 | cr.TestOutput = testOutput 53 | Bridge.CompileExec(&cr) 54 | return cr.TestCaseOutput 55 | } 56 | -------------------------------------------------------------------------------- /models/Models.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | _ "github.com/go-sql-driver/mysql" 6 | "time" 7 | ) 8 | 9 | type User struct { 10 | Uid int `orm:"pk"` 11 | Username string 12 | Password string `json:"-"` 13 | Name string 14 | College string 15 | Email string 16 | Score int 17 | Rank int 18 | Is_editor int `json:"-"` 19 | } 20 | 21 | type Problem struct { 22 | Pid int `orm:"pk"` 23 | Uid int 24 | Statement string 25 | Description string 26 | Constraints string 27 | Sample_input string 28 | Sample_output string 29 | Solution_description string `json:"-"` 30 | Solution_code string `json:"-"` 31 | Type string 32 | Difficulty string 33 | Created_at time.Time `orm:"auto_now_add;type(datetime)"` 34 | Points int 35 | Solve_count int 36 | } 37 | 38 | type Testcases struct { 39 | Id int `orm:"pk"` 40 | Pid int 41 | Tid int 42 | Input string 43 | Output string 44 | Timeout int 45 | } 46 | 47 | type Problemlogs struct { 48 | Id int `orm:"pk"` 49 | Pid int 50 | Uid int 51 | Solved int 52 | Points int 53 | Time time.Time `orm:"auto_now_add;type(datetime)"` 54 | } 55 | 56 | type Contest struct { 57 | Id int `orm:"pk"` 58 | Name string 59 | Description string 60 | StartTime time.Time 61 | EndTime time.Time 62 | } 63 | 64 | type Contestlogs struct { 65 | Id int `orm:"pk"` 66 | Uid int 67 | Cid int 68 | Points int 69 | Time time.Time `orm:"auto_now_add;type(datetime)"` 70 | } 71 | 72 | func init() { 73 | orm.RegisterDriver("mysql", orm.DR_MySQL) 74 | orm.RegisterDataBase("default", "mysql", "ronak:ronak@/OnlineJudge") 75 | orm.RegisterModel(new(User)) 76 | orm.RegisterModel(new(Problem)) 77 | orm.RegisterModel(new(Problemlogs)) 78 | orm.RegisterModel(new(Testcases)) 79 | orm.RegisterModel(new(Contest)) 80 | orm.RegisterModel(new(Contestlogs)) 81 | } 82 | -------------------------------------------------------------------------------- /models/ProblemLogs.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | ) 6 | 7 | func (log *Problemlogs) CommitByPidUid() bool { 8 | o := orm.NewOrm() 9 | o.Using("default") 10 | _, er := o.Insert(log) 11 | if er == nil { 12 | return true 13 | } 14 | return false 15 | } 16 | 17 | func (log *Problemlogs) Update() bool { 18 | o := orm.NewOrm() 19 | o.Using("default") 20 | _, err := o.Update(log) 21 | if err == nil { 22 | return true 23 | } 24 | return false 25 | } 26 | 27 | func (log *Problemlogs) GetByPidUid() bool { 28 | o := orm.NewOrm() 29 | o.Using("default") 30 | err := o.Read(log, "Pid", "Uid") 31 | if err == nil { 32 | return true 33 | } 34 | return false 35 | } 36 | 37 | func (log *Problemlogs) GetByUid() ([]Problemlogs, int64) { 38 | var logs []Problemlogs 39 | o := orm.NewOrm() 40 | o.Using("default") 41 | count, err := o.QueryTable("problemlogs").OrderBy("-Time").Filter("uid", log.Uid).All(&logs) 42 | if err == nil { 43 | return logs, count 44 | } 45 | return nil, count 46 | } 47 | 48 | func (log *Problemlogs) GetRecentByPid() ([]Problemlogs, int64) { 49 | var logs []Problemlogs 50 | o := orm.NewOrm() 51 | o.Using("default") 52 | count, err := o.QueryTable("problemlogs").OrderBy("-Time").Filter("pid", log.Pid).All(&logs) 53 | if err == nil { 54 | return logs, count 55 | } 56 | return nil, count 57 | } 58 | -------------------------------------------------------------------------------- /models/Score.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "OnlineJudge/Bridge" 5 | "time" 6 | ) 7 | 8 | type SubmitResponse struct { 9 | Score int 10 | Status []Bridge.TestCaseStatus 11 | } 12 | 13 | func SubmitUpdateScore(uid int, pid int, rawcode string, lang string) SubmitResponse { 14 | testCaseStatus := ExecBatch(pid, rawcode, lang) 15 | submitResponse := SubmitResponse{} 16 | submitResponse.Status = testCaseStatus 17 | problem := Problem{} 18 | problem.Pid = pid 19 | _ = problem.GetByPid() 20 | problemlog := Problemlogs{} 21 | problemlog.Pid = pid 22 | problemlog.Uid = uid 23 | b := problemlog.GetByPidUid() 24 | score := computeScore(problem.Points, testCaseStatus) 25 | if score == 0 { 26 | return submitResponse 27 | } 28 | if b == false { 29 | problemlog.Uid = uid 30 | problemlog.Pid = pid 31 | problemlog.Solved = 1 32 | problemlog.Points = score 33 | problemlog.Time = time.Now() 34 | problemlog.CommitByPidUid() 35 | problem.Solve_count++ 36 | problem.Update() 37 | user := User{Uid: uid} 38 | user.AddScore(score) 39 | } else { 40 | if problemlog.Points < score { 41 | user := User{Uid: uid} 42 | user.AddScore(score - problemlog.Points) 43 | problemlog.Points = score 44 | problemlog.Solved++ 45 | problemlog.Update() 46 | } 47 | } 48 | submitResponse.Score = score 49 | return submitResponse 50 | } 51 | 52 | func computeScore(maxScore int, testCaseStatus []Bridge.TestCaseStatus) int { 53 | casePassed := 0 54 | for _, status := range testCaseStatus { 55 | if status.Success == true { 56 | casePassed++ 57 | } 58 | } 59 | return (casePassed * maxScore) / len(testCaseStatus) 60 | } 61 | -------------------------------------------------------------------------------- /models/TestCases.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | ) 6 | 7 | func (testcase *Testcases) Create() bool { 8 | o := orm.NewOrm() 9 | o.Using("default") 10 | _, err := o.Insert(testcase) 11 | if err == nil { 12 | return true 13 | } 14 | return false 15 | } 16 | 17 | func (testcase *Testcases) GetAllByPid() ([]Testcases, int64) { 18 | var testcases []Testcases 19 | o := orm.NewOrm() 20 | o.Using("default") 21 | count, err := o.QueryTable("testcases").Filter("Pid", testcase.Pid).All(&testcases) 22 | if err == nil { 23 | return testcases, count 24 | } 25 | return nil, 0 26 | } 27 | 28 | func (testcase *Testcases) GetOneByPidTid() (Testcases, bool) { 29 | var testcaseN Testcases 30 | o := orm.NewOrm() 31 | o.Using("default") 32 | err := o.QueryTable("testcases").Filter("Pid", testcase.Pid).Filter("Tid", testcase.Tid).One(&testcaseN) 33 | if err == nil { 34 | return testcaseN, true 35 | } 36 | return testcaseN, false 37 | } 38 | 39 | func (testcase *Testcases) DeleteAllByPid() (int64, bool) { 40 | o := orm.NewOrm() 41 | o.Using("default") 42 | count, err := o.QueryTable("testcases").Filter("Pid", testcase.Pid).Delete() 43 | if err == nil { 44 | return count, true 45 | } 46 | return 0, false 47 | } 48 | 49 | func (testcase *Testcases) DeleteOneByPidTid() bool { 50 | o := orm.NewOrm() 51 | o.Using("default") 52 | _, err := o.QueryTable("testcases").Filter("Pid", testcase.Pid).Filter("Tid", testcase.Tid).Delete() 53 | if err == nil { 54 | return true 55 | } 56 | return false 57 | } 58 | -------------------------------------------------------------------------------- /models/Verify.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "regexp" 5 | "unicode" 6 | ) 7 | 8 | var ( 9 | usernameMatcher *regexp.Regexp 10 | emailMatcher *regexp.Regexp 11 | nameMatcher *regexp.Regexp 12 | collegeMatcher *regexp.Regexp 13 | ) 14 | 15 | func init() { 16 | usernameMatcher = regexp.MustCompile("^[\\w\\d_\\.]*$") 17 | emailMatcher = regexp.MustCompile("^[\\w\\d_\\.]{2,}\\@[\\w\\d]*\\.[\\w]{2,4}(\\.[\\w]{2,4})?$") 18 | nameMatcher = regexp.MustCompile("^([\\w]{1,}\\s?){1,}$") 19 | collegeMatcher = regexp.MustCompile("^([\\w-]{1,}\\s?){1,}$") 20 | } 21 | 22 | func CheckUserName(username string) bool { 23 | if len(username) < 6 { 24 | return false 25 | } 26 | return usernameMatcher.Match([]byte(username)) 27 | } 28 | 29 | func CheckEmail(email string) bool { 30 | return emailMatcher.Match([]byte(email)) 31 | } 32 | 33 | func CheckPassword(password string) bool { 34 | if len(password) < 8 { 35 | return false 36 | } 37 | return matchPassword(password) 38 | } 39 | 40 | func CheckName(name string) bool { 41 | return nameMatcher.Match([]byte(name)) 42 | } 43 | 44 | func CheckCollege(college string) bool { 45 | return collegeMatcher.Match([]byte(college)) 46 | } 47 | 48 | func matchPassword(password string) bool { 49 | var ( 50 | letter bool 51 | number bool 52 | ) 53 | for _, r := range password { 54 | if unicode.IsLetter(r) { 55 | letter = true 56 | } else if unicode.IsNumber(r) { 57 | number = true 58 | } else { 59 | return false 60 | } 61 | } 62 | return letter && number 63 | } 64 | -------------------------------------------------------------------------------- /models/contest.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | "log" 6 | ) 7 | 8 | func (this *Contest) Create() (int64, bool) { 9 | o := orm.NewOrm() 10 | o.Using("default") 11 | id, err := o.Insert(this) 12 | if err != nil { 13 | log.Println("Contest Model: ", err) 14 | return -1, false 15 | } 16 | return id, true 17 | } 18 | 19 | func (this *Contest) Edit() bool { 20 | o := orm.NewOrm() 21 | o.Using("default") 22 | _, err := o.Update(this) 23 | if err != nil { 24 | log.Println("Contest Model: ", err) 25 | return false 26 | } 27 | return true 28 | } 29 | 30 | func (this *Contest) GetByName() bool { 31 | o := orm.NewOrm() 32 | o.Using("default") 33 | err := o.QueryTable("contest").Filter("name", this.Name).One(this) 34 | if err != nil { 35 | return false 36 | } 37 | return true 38 | } 39 | 40 | func (this *Contest) Delete() bool { 41 | o := orm.NewOrm() 42 | o.Using("default") 43 | _, err := o.Delete(this) 44 | if err != nil { 45 | log.Println("Contest Model: ", err) 46 | return false 47 | } 48 | return true 49 | } 50 | -------------------------------------------------------------------------------- /restart.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ "$EUID" -ne 0 ] 3 | then echo "Please run as root" 4 | exit 1 5 | fi 6 | cd go/src 7 | cp lxcmain /home/ubuntu 8 | cp start* /home/ubuntu 9 | echo "Run the startJudge in $HOME as user" -------------------------------------------------------------------------------- /routers/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "OnlineJudge/controllers" 5 | "github.com/astaxie/beego" 6 | ) 7 | 8 | func init() { 9 | // List problems (or have a seperate controller as IndexController?) 10 | beego.Router("/", &controllers.ProblemController{}, "*:List") 11 | 12 | // On User -- Includes user profiles, settings and login and sign up routes 13 | beego.AutoRouter(&controllers.UserController{}) 14 | 15 | // On Problems 16 | beego.Router("/problem/create", &controllers.ProblemController{}, "*:Create;post:SaveProblem") 17 | beego.Router("/problem/:id/addtest", &controllers.ProblemController{}, "*:AddTestCase;post:SaveTestCase") 18 | beego.Router("/problem/:id", &controllers.ProblemController{}, "*:ProblemById") 19 | beego.Router("/problem/:type/:page", &controllers.ProblemController{}, "*:ProblemByCategory") 20 | beego.Router("/problem/:id/submit", &controllers.ProblemController{}, "post:SaveSubmission") // ->ProblemController(notes that user has tried solving problem)->ExecController(seek for helper to exec)->ProblemController(get result info & build on it) 21 | beego.Router("/problem/:id/run", &controllers.ProblemController{}, "post:RunCode") 22 | beego.Router("/test", &controllers.ProblemController{}, "post:Test") 23 | // beego.Router("/problem/:id/edit", &controllers.ProblemController{}, "post:SaveProblem;*:Edit") 24 | } 25 | -------------------------------------------------------------------------------- /startJudge.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export PATH=$PATH:/usr/local/go/bin 3 | export GOPATH=/home/ubuntu/go 4 | nohup ./lxcmain & 5 | rm startJudge.bash 6 | echo "Judge is running, on reboot run script restart.bash in go/src as root" -------------------------------------------------------------------------------- /static/CodeMirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: inherit; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: inherit; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/display/fullscreen.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { 15 | if (old == CodeMirror.Init) old = false; 16 | if (!old == !val) return; 17 | if (val) setFullscreen(cm); 18 | else setNormal(cm); 19 | }); 20 | 21 | function setFullscreen(cm) { 22 | var wrap = cm.getWrapperElement(); 23 | cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, 24 | width: wrap.style.width, height: wrap.style.height}; 25 | wrap.style.width = ""; 26 | wrap.style.height = "auto"; 27 | wrap.className += " CodeMirror-fullscreen"; 28 | document.documentElement.style.overflow = "hidden"; 29 | cm.refresh(); 30 | } 31 | 32 | function setNormal(cm) { 33 | var wrap = cm.getWrapperElement(); 34 | wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); 35 | document.documentElement.style.overflow = ""; 36 | var info = cm.state.fullScreenRestore; 37 | wrap.style.width = info.width; wrap.style.height = info.height; 38 | window.scrollTo(info.scrollLeft, info.scrollTop); 39 | cm.refresh(); 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/display/placeholder.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("placeholder", "", function(cm, val, old) { 13 | var prev = old && old != CodeMirror.Init; 14 | if (val && !prev) { 15 | cm.on("blur", onBlur); 16 | cm.on("change", onChange); 17 | onChange(cm); 18 | } else if (!val && prev) { 19 | cm.off("blur", onBlur); 20 | cm.off("change", onChange); 21 | clearPlaceholder(cm); 22 | var wrapper = cm.getWrapperElement(); 23 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); 24 | } 25 | 26 | if (val && !cm.hasFocus()) onBlur(cm); 27 | }); 28 | 29 | function clearPlaceholder(cm) { 30 | if (cm.state.placeholder) { 31 | cm.state.placeholder.parentNode.removeChild(cm.state.placeholder); 32 | cm.state.placeholder = null; 33 | } 34 | } 35 | function setPlaceholder(cm) { 36 | clearPlaceholder(cm); 37 | var elt = cm.state.placeholder = document.createElement("pre"); 38 | elt.style.cssText = "height: 0; overflow: visible"; 39 | elt.className = "CodeMirror-placeholder"; 40 | elt.appendChild(document.createTextNode(cm.getOption("placeholder"))); 41 | cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); 42 | } 43 | 44 | function onBlur(cm) { 45 | if (isEmpty(cm)) setPlaceholder(cm); 46 | } 47 | function onChange(cm) { 48 | var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); 49 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); 50 | 51 | if (empty) setPlaceholder(cm); 52 | else clearPlaceholder(cm); 53 | } 54 | 55 | function isEmpty(cm) { 56 | return (cm.lineCount() === 1) && (cm.getLine(0) === ""); 57 | } 58 | }); 59 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/display/rulers.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("rulers", false, function(cm, val, old) { 15 | if (old && old != CodeMirror.Init) { 16 | clearRulers(cm); 17 | cm.off("refresh", refreshRulers); 18 | } 19 | if (val && val.length) { 20 | setRulers(cm); 21 | cm.on("refresh", refreshRulers); 22 | } 23 | }); 24 | 25 | function clearRulers(cm) { 26 | for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) { 27 | var node = cm.display.lineSpace.childNodes[i]; 28 | if (/(^|\s)CodeMirror-ruler($|\s)/.test(node.className)) 29 | node.parentNode.removeChild(node); 30 | } 31 | } 32 | 33 | function setRulers(cm) { 34 | var val = cm.getOption("rulers"); 35 | var cw = cm.defaultCharWidth(); 36 | var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left; 37 | var minH = cm.display.scroller.offsetHeight + 30; 38 | for (var i = 0; i < val.length; i++) { 39 | var elt = document.createElement("div"); 40 | elt.className = "CodeMirror-ruler"; 41 | var col, conf = val[i]; 42 | if (typeof conf == "number") { 43 | col = conf; 44 | } else { 45 | col = conf.column; 46 | if (conf.className) elt.className += " " + conf.className; 47 | if (conf.color) elt.style.borderColor = conf.color; 48 | if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle; 49 | if (conf.width) elt.style.borderLeftWidth = conf.width; 50 | } 51 | elt.style.left = (left + col * cw) + "px"; 52 | elt.style.top = "-50px"; 53 | elt.style.bottom = "-20px"; 54 | elt.style.minHeight = minH + "px"; 55 | cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv); 56 | } 57 | } 58 | 59 | function refreshRulers(cm) { 60 | clearRulers(cm); 61 | setRulers(cm); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/edit/continuelist.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/, 15 | emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/, 16 | unorderedListRE = /[*+-]\s/; 17 | 18 | CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { 19 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 20 | var ranges = cm.listSelections(), replacements = []; 21 | for (var i = 0; i < ranges.length; i++) { 22 | var pos = ranges[i].head; 23 | var eolState = cm.getStateAfter(pos.line); 24 | var inList = eolState.list !== false; 25 | var inQuote = eolState.quote !== 0; 26 | 27 | var line = cm.getLine(pos.line), match = listRE.exec(line); 28 | if (!ranges[i].empty() || (!inList && !inQuote) || !match) { 29 | cm.execCommand("newlineAndIndent"); 30 | return; 31 | } 32 | if (emptyListRE.test(line)) { 33 | cm.replaceRange("", { 34 | line: pos.line, ch: 0 35 | }, { 36 | line: pos.line, ch: pos.ch + 1 37 | }); 38 | replacements[i] = "\n"; 39 | } else { 40 | var indent = match[1], after = match[5]; 41 | var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 42 | ? match[2] 43 | : (parseInt(match[3], 10) + 1) + match[4]; 44 | 45 | replacements[i] = "\n" + indent + bullet + after; 46 | } 47 | } 48 | 49 | cm.replaceSelections(replacements); 50 | }; 51 | }); 52 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/edit/trailingspace.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { 13 | if (prev == CodeMirror.Init) prev = false; 14 | if (prev && !val) 15 | cm.removeOverlay("trailingspace"); 16 | else if (!prev && val) 17 | cm.addOverlay({ 18 | token: function(stream) { 19 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} 20 | if (i > stream.pos) { stream.pos = i; return null; } 21 | stream.pos = l; 22 | return "trailingspace"; 23 | }, 24 | name: "trailingspace" 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/fold/comment-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { 15 | return mode.blockCommentStart && mode.blockCommentEnd; 16 | }, function(cm, start) { 17 | var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd; 18 | if (!startToken || !endToken) return; 19 | var line = start.line, lineText = cm.getLine(line); 20 | 21 | var startCh; 22 | for (var at = start.ch, pass = 0;;) { 23 | var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1); 24 | if (found == -1) { 25 | if (pass == 1) return; 26 | pass = 1; 27 | at = lineText.length; 28 | continue; 29 | } 30 | if (pass == 1 && found < start.ch) return; 31 | if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { 32 | startCh = found + startToken.length; 33 | break; 34 | } 35 | at = found - 1; 36 | } 37 | 38 | var depth = 1, lastLine = cm.lastLine(), end, endCh; 39 | outer: for (var i = line; i <= lastLine; ++i) { 40 | var text = cm.getLine(i), pos = i == line ? startCh : 0; 41 | for (;;) { 42 | var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); 43 | if (nextOpen < 0) nextOpen = text.length; 44 | if (nextClose < 0) nextClose = text.length; 45 | pos = Math.min(nextOpen, nextClose); 46 | if (pos == text.length) break; 47 | if (pos == nextOpen) ++depth; 48 | else if (!--depth) { end = i; endCh = pos; break outer; } 49 | ++pos; 50 | } 51 | } 52 | if (end == null || line == end && endCh == startCh) return; 53 | return {from: CodeMirror.Pos(line, startCh), 54 | to: CodeMirror.Pos(end, endCh)}; 55 | }); 56 | 57 | }); 58 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/fold/foldgutter.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-foldmarker { 2 | color: blue; 3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; 4 | font-family: arial; 5 | line-height: .3; 6 | cursor: pointer; 7 | } 8 | .CodeMirror-foldgutter { 9 | width: .7em; 10 | } 11 | .CodeMirror-foldgutter-open, 12 | .CodeMirror-foldgutter-folded { 13 | cursor: pointer; 14 | } 15 | .CodeMirror-foldgutter-open:after { 16 | content: "\25BE"; 17 | } 18 | .CodeMirror-foldgutter-folded:after { 19 | content: "\25B8"; 20 | } 21 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/fold/indent-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "indent", function(cm, start) { 15 | var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); 16 | if (!/\S/.test(firstLine)) return; 17 | var getIndent = function(line) { 18 | return CodeMirror.countColumn(line, null, tabSize); 19 | }; 20 | var myIndent = getIndent(firstLine); 21 | var lastLineInFold = null; 22 | // Go through lines until we find a line that definitely doesn't belong in 23 | // the block we're folding, or to the end. 24 | for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) { 25 | var curLine = cm.getLine(i); 26 | var curIndent = getIndent(curLine); 27 | if (curIndent > myIndent) { 28 | // Lines with a greater indent are considered part of the block. 29 | lastLineInFold = i; 30 | } else if (!/\S/.test(curLine)) { 31 | // Empty lines might be breaks within the block we're trying to fold. 32 | } else { 33 | // A non-empty line at an indent equal to or less than ours marks the 34 | // start of another block. 35 | break; 36 | } 37 | } 38 | if (lastLineInFold) return { 39 | from: CodeMirror.Pos(start.line, firstLine.length), 40 | to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length) 41 | }; 42 | }); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/fold/markdown-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "markdown", function(cm, start) { 15 | var maxDepth = 100; 16 | 17 | function isHeader(lineNo) { 18 | var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0)); 19 | return tokentype && /\bheader\b/.test(tokentype); 20 | } 21 | 22 | function headerLevel(lineNo, line, nextLine) { 23 | var match = line && line.match(/^#+/); 24 | if (match && isHeader(lineNo)) return match[0].length; 25 | match = nextLine && nextLine.match(/^[=\-]+\s*$/); 26 | if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2; 27 | return maxDepth; 28 | } 29 | 30 | var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1); 31 | var level = headerLevel(start.line, firstLine, nextLine); 32 | if (level === maxDepth) return undefined; 33 | 34 | var lastLineNo = cm.lastLine(); 35 | var end = start.line, nextNextLine = cm.getLine(end + 2); 36 | while (end < lastLineNo) { 37 | if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break; 38 | ++end; 39 | nextLine = nextNextLine; 40 | nextNextLine = cm.getLine(end + 2); 41 | } 42 | 43 | return { 44 | from: CodeMirror.Pos(start.line, firstLine.length), 45 | to: CodeMirror.Pos(end, cm.getLine(end).length) 46 | }; 47 | }); 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/hint/anyword-hint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var WORD = /[\w$]+/, RANGE = 500; 15 | 16 | CodeMirror.registerHelper("hint", "anyword", function(editor, options) { 17 | var word = options && options.word || WORD; 18 | var range = options && options.range || RANGE; 19 | var cur = editor.getCursor(), curLine = editor.getLine(cur.line); 20 | var end = cur.ch, start = end; 21 | while (start && word.test(curLine.charAt(start - 1))) --start; 22 | var curWord = start != end && curLine.slice(start, end); 23 | 24 | var list = [], seen = {}; 25 | var re = new RegExp(word.source, "g"); 26 | for (var dir = -1; dir <= 1; dir += 2) { 27 | var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir; 28 | for (; line != endLine; line += dir) { 29 | var text = editor.getLine(line), m; 30 | while (m = re.exec(text)) { 31 | if (line == cur.line && m[0] === curWord) continue; 32 | if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) { 33 | seen[m[0]] = true; 34 | list.push(m[0]); 35 | } 36 | } 37 | } 38 | } 39 | return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/lint/coffeescript-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js 5 | 6 | // declare global: coffeelint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "coffeescript", function(text) { 19 | var found = []; 20 | var parseError = function(err) { 21 | var loc = err.lineNumber; 22 | found.push({from: CodeMirror.Pos(loc-1, 0), 23 | to: CodeMirror.Pos(loc, 0), 24 | severity: err.level, 25 | message: err.message}); 26 | }; 27 | try { 28 | var res = coffeelint.lint(text); 29 | for(var i = 0; i < res.length; i++) { 30 | parseError(res[i]); 31 | } 32 | } catch(e) { 33 | found.push({from: CodeMirror.Pos(e.location.first_line, 0), 34 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 35 | severity: 'error', 36 | message: e.message}); 37 | } 38 | return found; 39 | }); 40 | 41 | }); 42 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/lint/css-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on csslint.js from https://github.com/stubbornella/csslint 5 | 6 | // declare global: CSSLint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "css", function(text) { 19 | var found = []; 20 | if (!window.CSSLint) return found; 21 | var results = CSSLint.verify(text), messages = results.messages, message = null; 22 | for ( var i = 0; i < messages.length; i++) { 23 | message = messages[i]; 24 | var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col; 25 | found.push({ 26 | from: CodeMirror.Pos(startLine, startCol), 27 | to: CodeMirror.Pos(endLine, endCol), 28 | message: message.message, 29 | severity : message.type 30 | }); 31 | } 32 | return found; 33 | }); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/lint/json-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint 5 | 6 | // declare global: jsonlint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "json", function(text) { 19 | var found = []; 20 | jsonlint.parseError = function(str, hash) { 21 | var loc = hash.loc; 22 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 23 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 24 | message: str}); 25 | }; 26 | try { jsonlint.parse(text); } 27 | catch(e) {} 28 | return found; 29 | }); 30 | 31 | }); 32 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/lint/yaml-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | // Depends on js-yaml.js from https://github.com/nodeca/js-yaml 15 | 16 | // declare global: jsyaml 17 | 18 | CodeMirror.registerHelper("lint", "yaml", function(text) { 19 | var found = []; 20 | try { jsyaml.load(text); } 21 | catch(e) { 22 | var loc = e.mark; 23 | found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message }); 24 | } 25 | return found; 26 | }); 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | CodeMirror.defineMode("markdown_with_stex", function(){ 6 | var inner = CodeMirror.getMode({}, "stex"); 7 | var outer = CodeMirror.getMode({}, "markdown"); 8 | 9 | var innerOptions = { 10 | open: '$', 11 | close: '$', 12 | mode: inner, 13 | delimStyle: 'delim', 14 | innerStyle: 'inner' 15 | }; 16 | 17 | return CodeMirror.multiplexingMode(outer, innerOptions); 18 | }); 19 | 20 | var mode = CodeMirror.getMode({}, "markdown_with_stex"); 21 | 22 | function MT(name) { 23 | test.mode( 24 | name, 25 | mode, 26 | Array.prototype.slice.call(arguments, 1), 27 | 'multiplexing'); 28 | } 29 | 30 | MT( 31 | "stexInsideMarkdown", 32 | "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]"); 33 | })(); 34 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("./runmode")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "./runmode"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 15 | 16 | function textContent(node, out) { 17 | if (node.nodeType == 3) return out.push(node.nodeValue); 18 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 19 | textContent(ch, out); 20 | if (isBlock.test(node.nodeType)) out.push("\n"); 21 | } 22 | } 23 | 24 | CodeMirror.colorize = function(collection, defaultMode) { 25 | if (!collection) collection = document.body.getElementsByTagName("pre"); 26 | 27 | for (var i = 0; i < collection.length; ++i) { 28 | var node = collection[i]; 29 | var mode = node.getAttribute("data-lang") || defaultMode; 30 | if (!mode) continue; 31 | 32 | var text = []; 33 | textContent(node, text); 34 | node.innerHTML = ""; 35 | CodeMirror.runMode(text.join(""), mode, node); 36 | 37 | node.className += " cm-s-default"; 38 | } 39 | }; 40 | }); 41 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/scroll/scrollpastend.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) { 15 | if (old && old != CodeMirror.Init) { 16 | cm.off("change", onChange); 17 | cm.off("refresh", updateBottomMargin); 18 | cm.display.lineSpace.parentNode.style.paddingBottom = ""; 19 | cm.state.scrollPastEndPadding = null; 20 | } 21 | if (val) { 22 | cm.on("change", onChange); 23 | cm.on("refresh", updateBottomMargin); 24 | updateBottomMargin(cm); 25 | } 26 | }); 27 | 28 | function onChange(cm, change) { 29 | if (CodeMirror.changeEnd(change).line == cm.lastLine()) 30 | updateBottomMargin(cm); 31 | } 32 | 33 | function updateBottomMargin(cm) { 34 | var padding = ""; 35 | if (cm.lineCount() > 1) { 36 | var totalH = cm.display.scroller.clientHeight - 30, 37 | lastLineH = cm.getLineHandle(cm.lastLine()).height; 38 | padding = (totalH - lastLineH) + "px"; 39 | } 40 | if (cm.state.scrollPastEndPadding != padding) { 41 | cm.state.scrollPastEndPadding = padding; 42 | cm.display.lineSpace.parentNode.style.paddingBottom = padding; 43 | cm.setSize(); 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/scroll/simplescrollbars.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div { 2 | position: absolute; 3 | background: #ccc; 4 | -moz-box-sizing: border-box; 5 | box-sizing: border-box; 6 | border: 1px solid #bbb; 7 | border-radius: 2px; 8 | } 9 | 10 | .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical { 11 | position: absolute; 12 | z-index: 6; 13 | background: #eee; 14 | } 15 | 16 | .CodeMirror-simplescroll-horizontal { 17 | bottom: 0; left: 0; 18 | height: 8px; 19 | } 20 | .CodeMirror-simplescroll-horizontal div { 21 | bottom: 0; 22 | height: 100%; 23 | } 24 | 25 | .CodeMirror-simplescroll-vertical { 26 | right: 0; top: 0; 27 | width: 8px; 28 | } 29 | .CodeMirror-simplescroll-vertical div { 30 | right: 0; 31 | width: 100%; 32 | } 33 | 34 | 35 | .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { 36 | display: none; 37 | } 38 | 39 | .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { 40 | position: absolute; 41 | background: #bcd; 42 | border-radius: 3px; 43 | } 44 | 45 | .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { 46 | position: absolute; 47 | z-index: 6; 48 | } 49 | 50 | .CodeMirror-overlayscroll-horizontal { 51 | bottom: 0; left: 0; 52 | height: 6px; 53 | } 54 | .CodeMirror-overlayscroll-horizontal div { 55 | bottom: 0; 56 | height: 100%; 57 | } 58 | 59 | .CodeMirror-overlayscroll-vertical { 60 | right: 0; top: 0; 61 | width: 6px; 62 | } 63 | .CodeMirror-overlayscroll-vertical div { 64 | right: 0; 65 | width: 100%; 66 | } 67 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/tern/tern.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-Tern-completion { 2 | padding-left: 22px; 3 | position: relative; 4 | line-height: 1.5; 5 | } 6 | .CodeMirror-Tern-completion:before { 7 | position: absolute; 8 | left: 2px; 9 | bottom: 2px; 10 | border-radius: 50%; 11 | font-size: 12px; 12 | font-weight: bold; 13 | height: 15px; 14 | width: 15px; 15 | line-height: 16px; 16 | text-align: center; 17 | color: white; 18 | -moz-box-sizing: border-box; 19 | box-sizing: border-box; 20 | } 21 | .CodeMirror-Tern-completion-unknown:before { 22 | content: "?"; 23 | background: #4bb; 24 | } 25 | .CodeMirror-Tern-completion-object:before { 26 | content: "O"; 27 | background: #77c; 28 | } 29 | .CodeMirror-Tern-completion-fn:before { 30 | content: "F"; 31 | background: #7c7; 32 | } 33 | .CodeMirror-Tern-completion-array:before { 34 | content: "A"; 35 | background: #c66; 36 | } 37 | .CodeMirror-Tern-completion-number:before { 38 | content: "1"; 39 | background: #999; 40 | } 41 | .CodeMirror-Tern-completion-string:before { 42 | content: "S"; 43 | background: #999; 44 | } 45 | .CodeMirror-Tern-completion-bool:before { 46 | content: "B"; 47 | background: #999; 48 | } 49 | 50 | .CodeMirror-Tern-completion-guess { 51 | color: #999; 52 | } 53 | 54 | .CodeMirror-Tern-tooltip { 55 | border: 1px solid silver; 56 | border-radius: 3px; 57 | color: #444; 58 | padding: 2px 5px; 59 | font-size: 90%; 60 | font-family: monospace; 61 | background-color: white; 62 | white-space: pre-wrap; 63 | 64 | max-width: 40em; 65 | position: absolute; 66 | z-index: 10; 67 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 68 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 69 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 70 | 71 | transition: opacity 1s; 72 | -moz-transition: opacity 1s; 73 | -webkit-transition: opacity 1s; 74 | -o-transition: opacity 1s; 75 | -ms-transition: opacity 1s; 76 | } 77 | 78 | .CodeMirror-Tern-hint-doc { 79 | max-width: 25em; 80 | margin-top: -3px; 81 | } 82 | 83 | .CodeMirror-Tern-fname { color: black; } 84 | .CodeMirror-Tern-farg { color: #70a; } 85 | .CodeMirror-Tern-farg-current { text-decoration: underline; } 86 | .CodeMirror-Tern-type { color: #07c; } 87 | .CodeMirror-Tern-fhint-guess { opacity: .7; } 88 | -------------------------------------------------------------------------------- /static/CodeMirror/addon/tern/worker.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // declare global: tern, server 5 | 6 | var server; 7 | 8 | this.onmessage = function(e) { 9 | var data = e.data; 10 | switch (data.type) { 11 | case "init": return startServer(data.defs, data.plugins, data.scripts); 12 | case "add": return server.addFile(data.name, data.text); 13 | case "del": return server.delFile(data.name); 14 | case "req": return server.request(data.body, function(err, reqData) { 15 | postMessage({id: data.id, body: reqData, err: err && String(err)}); 16 | }); 17 | case "getFile": 18 | var c = pending[data.id]; 19 | delete pending[data.id]; 20 | return c(data.err, data.text); 21 | default: throw new Error("Unknown message type: " + data.type); 22 | } 23 | }; 24 | 25 | var nextId = 0, pending = {}; 26 | function getFile(file, c) { 27 | postMessage({type: "getFile", name: file, id: ++nextId}); 28 | pending[nextId] = c; 29 | } 30 | 31 | function startServer(defs, plugins, scripts) { 32 | if (scripts) importScripts.apply(null, scripts); 33 | 34 | server = new tern.Server({ 35 | getFile: getFile, 36 | async: true, 37 | defs: defs, 38 | plugins: plugins 39 | }); 40 | } 41 | 42 | this.console = { 43 | log: function(v) { postMessage({type: "debug", message: v}); } 44 | }; 45 | -------------------------------------------------------------------------------- /static/CodeMirror/doc/activebookmark.js: -------------------------------------------------------------------------------- 1 | // Kludge in HTML5 tag recognition in IE8 2 | document.createElement("section"); 3 | document.createElement("article"); 4 | 5 | (function() { 6 | if (!window.addEventListener) return; 7 | var pending = false, prevVal = null; 8 | 9 | function updateSoon() { 10 | if (!pending) { 11 | pending = true; 12 | setTimeout(update, 250); 13 | } 14 | } 15 | 16 | function update() { 17 | pending = false; 18 | var marks = document.getElementById("nav").getElementsByTagName("a"), found; 19 | for (var i = 0; i < marks.length; ++i) { 20 | var mark = marks[i], m; 21 | if (mark.getAttribute("data-default")) { 22 | if (found == null) found = i; 23 | } else if (m = mark.href.match(/#(.*)/)) { 24 | var ref = document.getElementById(m[1]); 25 | if (ref && ref.getBoundingClientRect().top < 50) 26 | found = i; 27 | } 28 | } 29 | if (found != null && found != prevVal) { 30 | prevVal = found; 31 | var lis = document.getElementById("nav").getElementsByTagName("li"); 32 | for (var i = 0; i < lis.length; ++i) lis[i].className = ""; 33 | for (var i = 0; i < marks.length; ++i) { 34 | if (found == i) { 35 | marks[i].className = "active"; 36 | for (var n = marks[i]; n; n = n.parentNode) 37 | if (n.nodeName == "LI") n.className = "active"; 38 | } else { 39 | marks[i].className = ""; 40 | } 41 | } 42 | } 43 | } 44 | 45 | window.addEventListener("scroll", updateSoon); 46 | window.addEventListener("load", updateSoon); 47 | window.addEventListener("hashchange", function() { 48 | setTimeout(function() { 49 | var hash = document.location.hash, found = null, m; 50 | var marks = document.getElementById("nav").getElementsByTagName("a"); 51 | for (var i = 0; i < marks.length; i++) 52 | if ((m = marks[i].href.match(/(#.*)/)) && m[1] == hash) { found = i; break; } 53 | if (found != null) for (var i = 0; i < marks.length; i++) 54 | marks[i].className = i == found ? "active" : ""; 55 | }, 300); 56 | }); 57 | })(); 58 | -------------------------------------------------------------------------------- /static/CodeMirror/doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jronak/OnlineJudge/f6b89fe09600e42565dec08cc80c28b70e1801aa/static/CodeMirror/doc/logo.png -------------------------------------------------------------------------------- /static/CodeMirror/doc/reporting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Reporting Bugs 4 | 5 | 6 | 7 | 19 | 20 |
21 | 22 |

Reporting bugs effectively

23 | 24 |
25 | 26 |

So you found a problem in CodeMirror. By all means, report it! Bug 27 | reports from users are the main drive behind improvements to 28 | CodeMirror. But first, please read over these points:

29 | 30 |
    31 |
  1. CodeMirror is maintained by volunteers. They don't owe you 32 | anything, so be polite. Reports with an indignant or belligerent 33 | tone tend to be moved to the bottom of the pile.
  2. 34 | 35 |
  3. Include information about the browser in which the 36 | problem occurred. Even if you tested several browsers, and 37 | the problem occurred in all of them, mention this fact in the bug 38 | report. Also include browser version numbers and the operating 39 | system that you're on.
  4. 40 | 41 |
  5. Mention which release of CodeMirror you're using. Preferably, 42 | try also with the current development snapshot, to ensure the 43 | problem has not already been fixed.
  6. 44 | 45 |
  7. Mention very precisely what went wrong. "X is broken" is not a 46 | good bug report. What did you expect to happen? What happened 47 | instead? Describe the exact steps a maintainer has to take to make 48 | the problem occur. We can not fix something that we can not 49 | observe.
  8. 50 | 51 |
  9. If the problem can not be reproduced in any of the demos 52 | included in the CodeMirror distribution, please provide an HTML 53 | document that demonstrates the problem. The best way to do this is 54 | to go to jsbin.com, enter 55 | it there, press save, and include the resulting link in your bug 56 | report.
  10. 57 |
58 | 59 |
60 | 61 |
62 | -------------------------------------------------------------------------------- /static/CodeMirror/doc/yinyang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jronak/OnlineJudge/f6b89fe09600e42565dec08cc80c28b70e1801aa/static/CodeMirror/doc/yinyang.png -------------------------------------------------------------------------------- /static/CodeMirror/mode/asciiarmor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: ASCII Armor (PGP) mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

ASCII Armor (PGP) mode

27 |
36 | 37 | 42 | 43 |

MIME types 44 | defined: application/pgp, application/pgp-keys, application/pgp-signature

45 | 46 |
47 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/clike/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-c"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("indent", 9 | "[variable-3 void] [def foo]([variable-3 void*] [variable a], [variable-3 int] [variable b]) {", 10 | " [variable-3 int] [variable c] [operator =] [variable b] [operator +]", 11 | " [number 1];", 12 | " [keyword return] [operator *][variable a];", 13 | "}"); 14 | 15 | MT("indent_switch", 16 | "[keyword switch] ([variable x]) {", 17 | " [keyword case] [number 10]:", 18 | " [keyword return] [number 20];", 19 | " [keyword default]:", 20 | " [variable printf]([string \"foo %c\"], [variable x]);", 21 | "}"); 22 | 23 | MT("def", 24 | "[variable-3 void] [def foo]() {}", 25 | "[keyword struct] [def bar]{}", 26 | "[variable-3 int] [variable-3 *][def baz]() {}"); 27 | 28 | MT("double_block", 29 | "[keyword for] (;;)", 30 | " [keyword for] (;;)", 31 | " [variable x][operator ++];", 32 | "[keyword return];"); 33 | })(); 34 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/css/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: CSS mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 |
29 |

CSS mode

30 |
65 | 70 | 71 |

MIME types defined: text/css, text/x-scss (demo), text/x-less (demo).

72 | 73 |

Parsing/Highlighting Tests: normal, verbose.

74 | 75 |
76 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/css/less_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | "use strict"; 6 | 7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less"); 8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); } 9 | 10 | MT("variable", 11 | "[variable-2 @base]: [atom #f04615];", 12 | "[qualifier .class] {", 13 | " [property width]: [variable percentage]([number 0.5]); [comment // returns `50%`]", 14 | " [property color]: [variable saturate]([variable-2 @base], [number 5%]);", 15 | "}"); 16 | 17 | MT("amp", 18 | "[qualifier .child], [qualifier .sibling] {", 19 | " [qualifier .parent] [atom &] {", 20 | " [property color]: [keyword black];", 21 | " }", 22 | " [atom &] + [atom &] {", 23 | " [property color]: [keyword red];", 24 | " }", 25 | "}"); 26 | 27 | MT("mixin", 28 | "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {", 29 | " [property color]: [variable darken]([variable-2 @color], [number 10%]);", 30 | "}", 31 | "[qualifier .mixin] ([variable light]; [variable-2 @color]) {", 32 | " [property color]: [variable lighten]([variable-2 @color], [number 10%]);", 33 | "}", 34 | "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {", 35 | " [property display]: [atom block];", 36 | "}", 37 | "[variable-2 @switch]: [variable light];", 38 | "[qualifier .class] {", 39 | " [qualifier .mixin]([variable-2 @switch]; [atom #888]);", 40 | "}"); 41 | 42 | MT("nest", 43 | "[qualifier .one] {", 44 | " [def @media] ([property width]: [number 400px]) {", 45 | " [property font-size]: [number 1.2em];", 46 | " [def @media] [attribute print] [keyword and] [property color] {", 47 | " [property color]: [keyword blue];", 48 | " }", 49 | " }", 50 | "}"); 51 | 52 | 53 | MT("interpolation", ".@{[variable foo]} { [property font-weight]: [atom bold]; }"); 54 | })(); 55 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/cypher/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Cypher Mode for CodeMirror 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 30 | 31 |
32 |

Cypher Mode for CodeMirror

33 |
34 | 40 |
41 |

MIME types defined: 42 | application/x-cypher-query 43 |

44 | 62 | 63 |
64 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/dart/dart.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../clike/clike")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../clike/clike"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var keywords = ("this super static final const abstract class extends external factory " + 15 | "implements get native operator set typedef with enum throw rethrow " + 16 | "assert break case continue default in return new deferred async await " + 17 | "try catch finally do else for if switch while import library export " + 18 | "part of show hide is").split(" "); 19 | var blockKeywords = "try catch finally do else for if switch while".split(" "); 20 | var atoms = "true false null".split(" "); 21 | var builtins = "void bool num int double dynamic var String".split(" "); 22 | 23 | function set(words) { 24 | var obj = {}; 25 | for (var i = 0; i < words.length; ++i) obj[words[i]] = true; 26 | return obj; 27 | } 28 | 29 | CodeMirror.defineMIME("application/dart", { 30 | name: "clike", 31 | keywords: set(keywords), 32 | multiLineStrings: true, 33 | blockKeywords: set(blockKeywords), 34 | builtin: set(builtins), 35 | atoms: set(atoms), 36 | hooks: { 37 | "@": function(stream) { 38 | stream.eatWhile(/[\w\$_]/); 39 | return "meta"; 40 | } 41 | } 42 | }); 43 | 44 | CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins)); 45 | 46 | // This is needed to make loading through meta.js work. 47 | CodeMirror.defineMode("dart", function(conf) { 48 | return CodeMirror.getMode(conf, "application/dart"); 49 | }, "clike"); 50 | }); 51 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/dart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Dart mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Dart mode

27 |
28 | 62 |
63 | 64 | 70 | 71 |
72 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("diff", function() { 15 | 16 | var TOKEN_NAMES = { 17 | '+': 'positive', 18 | '-': 'negative', 19 | '@': 'meta' 20 | }; 21 | 22 | return { 23 | token: function(stream) { 24 | var tw_pos = stream.string.search(/[\t ]+?$/); 25 | 26 | if (!stream.sol() || tw_pos === 0) { 27 | stream.skipToEnd(); 28 | return ("error " + ( 29 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 30 | } 31 | 32 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 33 | 34 | if (tw_pos === -1) { 35 | stream.skipToEnd(); 36 | } else { 37 | stream.pos = tw_pos; 38 | } 39 | 40 | return token_name; 41 | } 42 | }; 43 | }); 44 | 45 | CodeMirror.defineMIME("text/x-diff", "diff"); 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/ecl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: ECL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

ECL mode

27 |
45 | 48 | 49 |

Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

50 |

MIME types defined: text/x-ecl.

51 | 52 |
53 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/elm/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Elm mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Elm mode

27 | 28 |
52 | 53 | 59 | 60 |

MIME types defined: text/x-elm.

61 |
62 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/factor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Factor mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 31 | 32 |
33 | 34 |

Factor mode

35 | 36 |
60 |
61 | 62 | 72 |

73 |

Simple mode that handles Factor Syntax (Factor on WikiPedia).

74 | 75 |

MIME types defined: text/x-factor.

76 | 77 |
78 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/forth/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Forth mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 31 | 32 |
33 | 34 |

Forth mode

35 | 36 |
57 |
58 | 59 | 70 | 71 |

Simple mode that handle Forth-Syntax (Forth on WikiPedia).

72 | 73 |

MIME types defined: text/x-forth.

74 | 75 |
76 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/gas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Gas mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Gas mode

27 |
28 | 50 |
51 | 52 | 58 | 59 |

Handles AT&T assembler syntax (more specifically this handles 60 | the GNU Assembler (gas) syntax.) 61 | It takes a single optional configuration parameter: 62 | architecture, which can be one of "ARM", 63 | "ARMv6" or "x86". 64 | Including the parameter adds syntax for the registers and special 65 | directives for the supplied architecture. 66 | 67 |

MIME types defined: text/x-gas

68 |
69 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/gherkin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Gherkin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Gherkin mode

27 |
42 | 45 | 46 |

MIME types defined: text/x-feature.

47 | 48 |
49 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/handlebars/handlebars.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../../addon/mode/simple"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineSimpleMode("handlebars", { 15 | start: [ 16 | { regex: /\{\{!--/, push: "dash_comment", token: "comment" }, 17 | { regex: /\{\{!/, push: "comment", token: "comment" }, 18 | { regex: /\{\{/, push: "handlebars", token: "tag" } 19 | ], 20 | handlebars: [ 21 | { regex: /\}\}/, pop: true, token: "tag" }, 22 | 23 | // Double and single quotes 24 | { regex: /"(?:[^\\]|\\.)*?"/, token: "string" }, 25 | { regex: /'(?:[^\\]|\\.)*?'/, token: "string" }, 26 | 27 | // Handlebars keywords 28 | { regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" }, 29 | { regex: /(?:else|this)\b/, token: "keyword" }, 30 | 31 | // Numeral 32 | { regex: /\d+/i, token: "number" }, 33 | 34 | // Atoms like = and . 35 | { regex: /=|~|@|true|false/, token: "atom" }, 36 | 37 | // Paths 38 | { regex: /(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/, token: "variable-2" } 39 | ], 40 | dash_comment: [ 41 | { regex: /--\}\}/, pop: true, token: "comment" }, 42 | 43 | // Commented code 44 | { regex: /./, token: "comment"} 45 | ], 46 | comment: [ 47 | { regex: /\}\}/, pop: true, token: "comment" }, 48 | { regex: /./, token: "comment" } 49 | ] 50 | }); 51 | 52 | CodeMirror.defineMIME("text/x-handlebars-template", "handlebars"); 53 | }); 54 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/htmlembedded/htmlembedded.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), 7 | require("../../addon/mode/multiplex")); 8 | else if (typeof define == "function" && define.amd) // AMD 9 | define(["../../lib/codemirror", "../htmlmixed/htmlmixed", 10 | "../../addon/mode/multiplex"], mod); 11 | else // Plain browser env 12 | mod(CodeMirror); 13 | })(function(CodeMirror) { 14 | "use strict"; 15 | 16 | CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { 17 | return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), { 18 | open: parserConfig.open || parserConfig.scriptStartRegex || "<%", 19 | close: parserConfig.close || parserConfig.scriptEndRegex || "%>", 20 | mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec) 21 | }); 22 | }, "htmlmixed"); 23 | 24 | CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"}); 25 | CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); 26 | CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"}); 27 | CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"}); 28 | }); 29 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/htmlembedded/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Html Embedded Scripts mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 | 30 |
31 |

Html Embedded Scripts mode

32 |
44 | 45 | 53 | 54 |

Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on 55 | JavaScript, CSS and XML.
Other dependancies include those of the scriping language chosen.

56 | 57 |

MIME types defined: application/x-aspx (ASP.NET), 58 | application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

59 |
60 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: HTTP mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

HTTP mode

27 | 28 | 29 |
39 | 40 | 43 | 44 |

MIME types defined: message/http.

45 |
46 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/idl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: IDL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

IDL mode

27 | 28 |
52 | 62 | 63 |

MIME types defined: text/x-idl.

64 |
65 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/javascript/typescript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: TypeScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

TypeScript mode

27 | 28 | 29 |
51 | 52 | 59 | 60 |

This is a specialization of the JavaScript mode.

61 |
62 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/jinja2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Jinja2 mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Jinja2 mode

27 |
49 | 54 |
55 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/modelica/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Modelica mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 |
29 |

Modelica mode

30 | 31 |
52 | 53 | 62 | 63 |

Simple mode that tries to handle Modelica as well as it can.

64 | 65 |

MIME types defined: text/x-modelica 66 | (Modlica code).

67 |
68 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/ntriples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: NTriples mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 28 | 29 |
30 |

NTriples mode

31 |
32 | 39 |
40 | 41 | 44 |

MIME types defined: text/n-triples.

45 |
46 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/octave/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Octave mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Octave mode

27 | 28 |
71 | 81 | 82 |

MIME types defined: text/x-octave.

83 |
84 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/pascal/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pascal mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Pascal mode

27 | 28 | 29 |
52 | 53 | 59 | 60 |

MIME types defined: text/x-pascal.

61 |
62 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/pegjs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeMirror: PEG.js Mode 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 |
30 |

PEG.js Mode

31 |
56 | 62 |

The PEG.js Mode

63 |

Created by Forbes Lindesay.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/perl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Perl mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Perl mode

27 | 28 | 29 |
67 | 68 | 73 | 74 |

MIME types defined: text/x-perl.

75 |
76 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/php/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: PHP mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 30 | 31 |
32 |

PHP mode

33 |
48 | 49 | 58 | 59 |

Simple HTML/PHP mode based on 60 | the C-like mode. Depends on XML, 61 | JavaScript, CSS, HTMLMixed, and C-like modes.

62 | 63 |

MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

64 |
65 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/pig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pig Latin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Pig Latin mode

27 |
39 | 40 | 47 | 48 |

49 | Simple mode that handles Pig Latin language. 50 |

51 | 52 |

MIME type defined: text/x-pig 53 | (PIG code) 54 | 55 |

56 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/properties/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Properties files mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Properties files mode

27 |
46 | 49 | 50 |

MIME types defined: text/x-properties, 51 | text/x-ini.

52 | 53 |
54 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/ruby/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("divide_equal_operator", 9 | "[variable bar] [operator /=] [variable foo]"); 10 | 11 | MT("divide_equal_operator_no_spacing", 12 | "[variable foo][operator /=][number 42]"); 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/rust/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Rust mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Rust mode

27 | 28 | 29 |
52 | 53 | 58 | 59 |

MIME types defined: text/x-rustsrc.

60 |
61 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/sass/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Sass mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Sass mode

28 |
58 | 64 | 65 |

MIME types defined: text/x-sass.

66 |
67 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/shell/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Shell mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 27 | 28 |
29 |

Shell mode

30 | 31 | 32 | 56 | 57 | 64 | 65 |

MIME types defined: text/x-sh.

66 |
67 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/shell/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({}, "shell"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("var", 9 | "text [def $var] text"); 10 | MT("varBraces", 11 | "text[def ${var}]text"); 12 | MT("varVar", 13 | "text [def $a$b] text"); 14 | MT("varBracesVarBraces", 15 | "text[def ${a}${b}]text"); 16 | 17 | MT("singleQuotedVar", 18 | "[string 'text $var text']"); 19 | MT("singleQuotedVarBraces", 20 | "[string 'text ${var} text']"); 21 | 22 | MT("doubleQuotedVar", 23 | '[string "text ][def $var][string text"]'); 24 | MT("doubleQuotedVarBraces", 25 | '[string "text][def ${var}][string text"]'); 26 | MT("doubleQuotedVarPunct", 27 | '[string "text ][def $@][string text"]'); 28 | MT("doubleQuotedVarVar", 29 | '[string "][def $a$b][string "]'); 30 | MT("doubleQuotedVarBracesVarBraces", 31 | '[string "][def ${a}${b}][string "]'); 32 | 33 | MT("notAString", 34 | "text\\'text"); 35 | MT("escapes", 36 | "outside\\'\\\"\\`\\\\[string \"inside\\`\\'\\\"\\\\`\\$notAVar\"]outside\\$\\(notASubShell\\)"); 37 | 38 | MT("subshell", 39 | "[builtin echo] [quote $(whoami)] s log, stardate [quote `date`]."); 40 | MT("doubleQuotedSubshell", 41 | "[builtin echo] [string \"][quote $(whoami)][string 's log, stardate `date`.\"]"); 42 | 43 | MT("hashbang", 44 | "[meta #!/bin/bash]"); 45 | MT("comment", 46 | "text [comment # Blurb]"); 47 | 48 | MT("numbers", 49 | "[number 0] [number 1] [number 2]"); 50 | MT("keywords", 51 | "[keyword while] [atom true]; [keyword do]", 52 | " [builtin sleep] [number 3]", 53 | "[keyword done]"); 54 | MT("options", 55 | "[builtin ls] [attribute -l] [attribute --human-readable]"); 56 | MT("operator", 57 | "[def var][operator =]value"); 58 | })(); 59 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/smalltalk/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Smalltalk mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 29 | 30 |
31 |

Smalltalk mode

32 |
55 | 56 | 64 | 65 |

Simple Smalltalk mode.

66 | 67 |

MIME types defined: text/x-stsrc.

68 |
69 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/solr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Solr mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 33 | 34 |
35 |

Solr mode

36 | 37 |
38 | 47 |
48 | 49 | 55 | 56 |

MIME types defined: text/x-solr.

57 |
58 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/soy/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Soy (Closure Template) mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 | 30 |
31 |

Soy (Closure Template) mode

32 |
55 | 56 | 65 | 66 |

A mode for Closure Templates (Soy).

67 |

MIME type defined: text/x-soy.

68 |
69 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/sparql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: SPARQL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

SPARQL mode

28 |
52 | 58 | 59 |

MIME types defined: application/sparql-query.

60 | 61 |
62 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/spreadsheet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Spreadsheet mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Spreadsheet mode

28 |
29 | 30 | 37 | 38 |

MIME types defined: text/x-spreadsheet.

39 | 40 |

The Spreadsheet Mode

41 |

Created by Robert Plummer

42 |
43 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/tiki/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Tiki wiki mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Tiki wiki mode

28 | 29 | 30 |
87 | 88 | 94 | 95 |
96 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFF; 3 | background-color: #900; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /static/CodeMirror/mode/toml/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: TOML Mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

TOML Mode

27 |
64 | 70 |

The TOML Mode

71 |

Created by Forbes Lindesay.

72 |

MIME type defined: text/x-toml.

73 |
74 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/tornado/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Tornado template mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 |
29 |

Tornado template mode

30 |
50 | 51 | 59 | 60 |

Mode for HTML with embedded Tornado template markup.

61 | 62 |

MIME types defined: text/x-tornado

63 |
64 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/turtle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Turtle mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Turtle mode

27 |
41 | 47 | 48 |

MIME types defined: text/turtle.

49 | 50 |
51 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/twig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Twig mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Twig mode

27 |
40 | 45 |
46 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/vbscript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: VBScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

VBScript mode

27 | 28 | 29 |
46 | 47 | 53 | 54 |

MIME types defined: text/vbscript.

55 |
56 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/xml/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: XML mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

XML mode

27 |
39 | 45 |

The XML mode supports two configuration parameters:

46 |
47 |
htmlMode (boolean)
48 |
This switches the mode to parse HTML instead of XML. This 49 | means attributes do not have to be quoted, and some elements 50 | (such as br) do not require a closing tag.
51 |
alignCDATA (boolean)
52 |
Setting this to true will force the opening tag of CDATA 53 | blocks to not be indented.
54 |
55 | 56 |

MIME types defined: application/xml, text/html.

57 |
58 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/xml/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml"; 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); } 7 | 8 | MT("matching", 9 | "[tag&bracket <][tag top][tag&bracket >]", 10 | " text", 11 | " [tag&bracket <][tag inner][tag&bracket />]", 12 | "[tag&bracket ]"); 13 | 14 | MT("nonmatching", 15 | "[tag&bracket <][tag top][tag&bracket >]", 16 | " [tag&bracket <][tag inner][tag&bracket />]", 17 | " [tag&bracket ]"); 18 | 19 | MT("doctype", 20 | "[meta ]", 21 | "[tag&bracket <][tag top][tag&bracket />]"); 22 | 23 | MT("cdata", 24 | "[tag&bracket <][tag top][tag&bracket >]", 25 | " [atom ]", 27 | "[tag&bracket ]"); 28 | 29 | // HTML tests 30 | mode = CodeMirror.getMode({indentUnit: 2}, "text/html"); 31 | 32 | MT("selfclose", 33 | "[tag&bracket <][tag html][tag&bracket >]", 34 | " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]", 35 | "[tag&bracket ]"); 36 | 37 | MT("list", 38 | "[tag&bracket <][tag ol][tag&bracket >]", 39 | " [tag&bracket <][tag li][tag&bracket >]one", 40 | " [tag&bracket <][tag li][tag&bracket >]two", 41 | "[tag&bracket ]"); 42 | 43 | MT("valueless", 44 | "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]"); 45 | 46 | MT("pThenArticle", 47 | "[tag&bracket <][tag p][tag&bracket >]", 48 | " foo", 49 | "[tag&bracket <][tag article][tag&bracket >]bar"); 50 | 51 | })(); 52 | -------------------------------------------------------------------------------- /static/CodeMirror/mode/z80/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Z80 assembly mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Z80 assembly mode

27 | 28 | 29 |
45 | 46 | 51 | 52 |

MIME types defined: text/x-z80, text/x-ez80.

53 |
54 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/3024-day.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 day 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;} 12 | .cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;} 13 | 14 | .cm-s-3024-day .CodeMirror-line::selection, .cm-s-3024-day .CodeMirror-line > span::selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d6d5d4; } 15 | .cm-s-3024-day .CodeMirror-line::-moz-selection, .cm-s-3024-day .CodeMirror-line > span::-moz-selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d9d9d9; } 16 | 17 | .cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;} 18 | .cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; } 19 | .cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; } 20 | .cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;} 21 | 22 | .cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;} 23 | 24 | .cm-s-3024-day span.cm-comment {color: #cdab53;} 25 | .cm-s-3024-day span.cm-atom {color: #a16a94;} 26 | .cm-s-3024-day span.cm-number {color: #a16a94;} 27 | 28 | .cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;} 29 | .cm-s-3024-day span.cm-keyword {color: #db2d20;} 30 | .cm-s-3024-day span.cm-string {color: #fded02;} 31 | 32 | .cm-s-3024-day span.cm-variable {color: #01a252;} 33 | .cm-s-3024-day span.cm-variable-2 {color: #01a0e4;} 34 | .cm-s-3024-day span.cm-def {color: #e8bbd0;} 35 | .cm-s-3024-day span.cm-bracket {color: #3a3432;} 36 | .cm-s-3024-day span.cm-tag {color: #db2d20;} 37 | .cm-s-3024-day span.cm-link {color: #a16a94;} 38 | .cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;} 39 | 40 | .cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;} 41 | .cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;} 42 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/3024-night.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 night 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;} 12 | .cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;} 13 | .cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); } 14 | .cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); } 15 | .cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;} 16 | .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; } 17 | .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; } 18 | .cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;} 19 | 20 | .cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;} 21 | 22 | .cm-s-3024-night span.cm-comment {color: #cdab53;} 23 | .cm-s-3024-night span.cm-atom {color: #a16a94;} 24 | .cm-s-3024-night span.cm-number {color: #a16a94;} 25 | 26 | .cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;} 27 | .cm-s-3024-night span.cm-keyword {color: #db2d20;} 28 | .cm-s-3024-night span.cm-string {color: #fded02;} 29 | 30 | .cm-s-3024-night span.cm-variable {color: #01a252;} 31 | .cm-s-3024-night span.cm-variable-2 {color: #01a0e4;} 32 | .cm-s-3024-night span.cm-def {color: #e8bbd0;} 33 | .cm-s-3024-night span.cm-bracket {color: #d6d5d4;} 34 | .cm-s-3024-night span.cm-tag {color: #db2d20;} 35 | .cm-s-3024-night span.cm-link {color: #a16a94;} 36 | .cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;} 37 | 38 | .cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;} 39 | .cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 40 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/base16-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Base16 Default Dark 4 | Author: Chris Kempson (http://chriskempson.com) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;} 12 | .cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;} 13 | .cm-s-base16-dark .CodeMirror-line::selection, .cm-s-base16-dark .CodeMirror-line > span::selection, .cm-s-base16-dark .CodeMirror-line > span > span::selection { background: rgba(48, 48, 48, .99); } 14 | .cm-s-base16-dark .CodeMirror-line::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(48, 48, 48, .99); } 15 | .cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;} 16 | .cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; } 17 | .cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; } 18 | .cm-s-base16-dark .CodeMirror-linenumber {color: #505050;} 19 | .cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;} 20 | 21 | .cm-s-base16-dark span.cm-comment {color: #8f5536;} 22 | .cm-s-base16-dark span.cm-atom {color: #aa759f;} 23 | .cm-s-base16-dark span.cm-number {color: #aa759f;} 24 | 25 | .cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;} 26 | .cm-s-base16-dark span.cm-keyword {color: #ac4142;} 27 | .cm-s-base16-dark span.cm-string {color: #f4bf75;} 28 | 29 | .cm-s-base16-dark span.cm-variable {color: #90a959;} 30 | .cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;} 31 | .cm-s-base16-dark span.cm-def {color: #d28445;} 32 | .cm-s-base16-dark span.cm-bracket {color: #e0e0e0;} 33 | .cm-s-base16-dark span.cm-tag {color: #ac4142;} 34 | .cm-s-base16-dark span.cm-link {color: #aa759f;} 35 | .cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;} 36 | 37 | .cm-s-base16-dark .CodeMirror-activeline-background {background: #202020 !important;} 38 | .cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/base16-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Base16 Default Light 4 | Author: Chris Kempson (http://chriskempson.com) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;} 12 | .cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;} 13 | .cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; } 14 | .cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; } 15 | .cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;} 16 | .cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; } 17 | .cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; } 18 | .cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;} 19 | .cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;} 20 | 21 | .cm-s-base16-light span.cm-comment {color: #8f5536;} 22 | .cm-s-base16-light span.cm-atom {color: #aa759f;} 23 | .cm-s-base16-light span.cm-number {color: #aa759f;} 24 | 25 | .cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;} 26 | .cm-s-base16-light span.cm-keyword {color: #ac4142;} 27 | .cm-s-base16-light span.cm-string {color: #f4bf75;} 28 | 29 | .cm-s-base16-light span.cm-variable {color: #90a959;} 30 | .cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;} 31 | .cm-s-base16-light span.cm-def {color: #d28445;} 32 | .cm-s-base16-light span.cm-bracket {color: #202020;} 33 | .cm-s-base16-light span.cm-tag {color: #ac4142;} 34 | .cm-s-base16-light span.cm-link {color: #aa759f;} 35 | .cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;} 36 | 37 | .cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;} 38 | .cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/blackboard.css: -------------------------------------------------------------------------------- 1 | /* Port of TextMate's Blackboard theme */ 2 | 3 | .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } 4 | .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } 5 | .cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); } 6 | .cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); } 7 | .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } 8 | .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } 9 | .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } 10 | .cm-s-blackboard .CodeMirror-linenumber { color: #888; } 11 | .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } 12 | 13 | .cm-s-blackboard .cm-keyword { color: #FBDE2D; } 14 | .cm-s-blackboard .cm-atom { color: #D8FA3C; } 15 | .cm-s-blackboard .cm-number { color: #D8FA3C; } 16 | .cm-s-blackboard .cm-def { color: #8DA6CE; } 17 | .cm-s-blackboard .cm-variable { color: #FF6400; } 18 | .cm-s-blackboard .cm-operator { color: #FBDE2D;} 19 | .cm-s-blackboard .cm-comment { color: #AEAEAE; } 20 | .cm-s-blackboard .cm-string { color: #61CE3C; } 21 | .cm-s-blackboard .cm-string-2 { color: #61CE3C; } 22 | .cm-s-blackboard .cm-meta { color: #D8FA3C; } 23 | .cm-s-blackboard .cm-builtin { color: #8DA6CE; } 24 | .cm-s-blackboard .cm-tag { color: #8DA6CE; } 25 | .cm-s-blackboard .cm-attribute { color: #8DA6CE; } 26 | .cm-s-blackboard .cm-header { color: #FF6400; } 27 | .cm-s-blackboard .cm-hr { color: #AEAEAE; } 28 | .cm-s-blackboard .cm-link { color: #8DA6CE; } 29 | .cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } 30 | 31 | .cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;} 32 | .cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} -------------------------------------------------------------------------------- /static/CodeMirror/theme/cobalt.css: -------------------------------------------------------------------------------- 1 | .cm-s-cobalt.CodeMirror { background: #002240; color: white; } 2 | .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } 3 | .cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); } 4 | .cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); } 5 | .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 6 | .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; } 7 | .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 8 | .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } 9 | .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } 10 | 11 | .cm-s-cobalt span.cm-comment { color: #08f; } 12 | .cm-s-cobalt span.cm-atom { color: #845dc4; } 13 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } 14 | .cm-s-cobalt span.cm-keyword { color: #ffee80; } 15 | .cm-s-cobalt span.cm-string { color: #3ad900; } 16 | .cm-s-cobalt span.cm-meta { color: #ff9d00; } 17 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } 18 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } 19 | .cm-s-cobalt span.cm-bracket { color: #d8d8d8; } 20 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } 21 | .cm-s-cobalt span.cm-link { color: #845dc4; } 22 | .cm-s-cobalt span.cm-error { color: #9d1e15; } 23 | 24 | .cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;} 25 | .cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} 26 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/colorforth.css: -------------------------------------------------------------------------------- 1 | .cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; } 2 | .cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 3 | .cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; } 4 | .cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; } 5 | .cm-s-colorforth .CodeMirror-linenumber { color: #bababa; } 6 | .cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; } 7 | 8 | .cm-s-colorforth span.cm-comment { color: #ededed; } 9 | .cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; } 10 | .cm-s-colorforth span.cm-keyword { color: #ffd900; } 11 | .cm-s-colorforth span.cm-builtin { color: #00d95a; } 12 | .cm-s-colorforth span.cm-variable { color: #73ff00; } 13 | .cm-s-colorforth span.cm-string { color: #007bff; } 14 | .cm-s-colorforth span.cm-number { color: #00c4ff; } 15 | .cm-s-colorforth span.cm-atom { color: #606060; } 16 | 17 | .cm-s-colorforth span.cm-variable-2 { color: #EEE; } 18 | .cm-s-colorforth span.cm-variable-3 { color: #DDD; } 19 | .cm-s-colorforth span.cm-property {} 20 | .cm-s-colorforth span.cm-operator {} 21 | 22 | .cm-s-colorforth span.cm-meta { color: yellow; } 23 | .cm-s-colorforth span.cm-qualifier { color: #FFF700; } 24 | .cm-s-colorforth span.cm-bracket { color: #cc7; } 25 | .cm-s-colorforth span.cm-tag { color: #FFBD40; } 26 | .cm-s-colorforth span.cm-attribute { color: #FFF700; } 27 | .cm-s-colorforth span.cm-error { color: #f00; } 28 | 29 | .cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; } 30 | 31 | .cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); } 32 | 33 | .cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;} 34 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta {color: #FF1717;} 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom {color: #219;} 4 | .cm-s-eclipse span.cm-number {color: #164;} 5 | .cm-s-eclipse span.cm-def {color: #00f;} 6 | .cm-s-eclipse span.cm-variable {color: black;} 7 | .cm-s-eclipse span.cm-variable-2 {color: #0000C0;} 8 | .cm-s-eclipse span.cm-variable-3 {color: #0000C0;} 9 | .cm-s-eclipse span.cm-property {color: black;} 10 | .cm-s-eclipse span.cm-operator {color: black;} 11 | .cm-s-eclipse span.cm-comment {color: #3F7F5F;} 12 | .cm-s-eclipse span.cm-string {color: #2A00FF;} 13 | .cm-s-eclipse span.cm-string-2 {color: #f50;} 14 | .cm-s-eclipse span.cm-qualifier {color: #555;} 15 | .cm-s-eclipse span.cm-builtin {color: #30a;} 16 | .cm-s-eclipse span.cm-bracket {color: #cc7;} 17 | .cm-s-eclipse span.cm-tag {color: #170;} 18 | .cm-s-eclipse span.cm-attribute {color: #00c;} 19 | .cm-s-eclipse span.cm-link {color: #219;} 20 | .cm-s-eclipse span.cm-error {color: #f00;} 21 | 22 | .cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;} 23 | .cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 24 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} 2 | .cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} 3 | .cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} 4 | .cm-s-elegant span.cm-variable {color: black;} 5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} 6 | .cm-s-elegant span.cm-qualifier {color: #555;} 7 | .cm-s-elegant span.cm-keyword {color: #730;} 8 | .cm-s-elegant span.cm-builtin {color: #30a;} 9 | .cm-s-elegant span.cm-link {color: #762;} 10 | .cm-s-elegant span.cm-error {background-color: #fdd;} 11 | 12 | .cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;} 13 | .cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 14 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/mbo.css: -------------------------------------------------------------------------------- 1 | /****************************************************************/ 2 | /* Based on mbonaci's Brackets mbo theme */ 3 | /* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */ 4 | /* Create your own: http://tmtheme-editor.herokuapp.com */ 5 | /****************************************************************/ 6 | 7 | .cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;} 8 | .cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;} 9 | .cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); } 10 | .cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); } 11 | .cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;} 12 | .cm-s-mbo .CodeMirror-guttermarker { color: white; } 13 | .cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; } 14 | .cm-s-mbo .CodeMirror-linenumber {color: #dadada;} 15 | .cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;} 16 | 17 | .cm-s-mbo span.cm-comment {color: #95958a;} 18 | .cm-s-mbo span.cm-atom {color: #00a8c6;} 19 | .cm-s-mbo span.cm-number {color: #00a8c6;} 20 | 21 | .cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;} 22 | .cm-s-mbo span.cm-keyword {color: #ffb928;} 23 | .cm-s-mbo span.cm-string {color: #ffcf6c;} 24 | .cm-s-mbo span.cm-string.cm-property {color: #ffffec;} 25 | 26 | .cm-s-mbo span.cm-variable {color: #ffffec;} 27 | .cm-s-mbo span.cm-variable-2 {color: #00a8c6;} 28 | .cm-s-mbo span.cm-def {color: #ffffec;} 29 | .cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;} 30 | .cm-s-mbo span.cm-tag {color: #9ddfe9;} 31 | .cm-s-mbo span.cm-link {color: #f54b07;} 32 | .cm-s-mbo span.cm-error {border-bottom: #636363; color: #ffffec;} 33 | .cm-s-mbo span.cm-qualifier {color: #ffffec;} 34 | 35 | .cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;} 36 | .cm-s-mbo .CodeMirror-matchingbracket {color: #222 !important;} 37 | .cm-s-mbo .CodeMirror-matchingtag {background: rgba(255, 255, 255, .37);} 38 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/midnight.css: -------------------------------------------------------------------------------- 1 | /* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ 2 | 3 | /**/ 4 | .cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; } 5 | .cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; } 6 | 7 | /**/ 8 | .cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;} 9 | 10 | .cm-s-midnight.CodeMirror { 11 | background: #0F192A; 12 | color: #D1EDFF; 13 | } 14 | 15 | .cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} 16 | 17 | .cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;} 18 | .cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); } 19 | .cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); } 20 | .cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;} 21 | .cm-s-midnight .CodeMirror-guttermarker { color: white; } 22 | .cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 23 | .cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;} 24 | .cm-s-midnight .CodeMirror-cursor { 25 | border-left: 1px solid #F8F8F0 !important; 26 | } 27 | 28 | .cm-s-midnight span.cm-comment {color: #428BDD;} 29 | .cm-s-midnight span.cm-atom {color: #AE81FF;} 30 | .cm-s-midnight span.cm-number {color: #D1EDFF;} 31 | 32 | .cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;} 33 | .cm-s-midnight span.cm-keyword {color: #E83737;} 34 | .cm-s-midnight span.cm-string {color: #1DC116;} 35 | 36 | .cm-s-midnight span.cm-variable {color: #FFAA3E;} 37 | .cm-s-midnight span.cm-variable-2 {color: #FFAA3E;} 38 | .cm-s-midnight span.cm-def {color: #4DD;} 39 | .cm-s-midnight span.cm-bracket {color: #D1EDFF;} 40 | .cm-s-midnight span.cm-tag {color: #449;} 41 | .cm-s-midnight span.cm-link {color: #AE81FF;} 42 | .cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;} 43 | 44 | .cm-s-midnight .CodeMirror-matchingbracket { 45 | text-decoration: underline; 46 | color: white !important; 47 | } 48 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/monokai.css: -------------------------------------------------------------------------------- 1 | /* Based on Sublime Text's Monokai theme */ 2 | 3 | .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} 4 | .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} 5 | .cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); } 6 | .cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); } 7 | .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} 8 | .cm-s-monokai .CodeMirror-guttermarker { color: white; } 9 | .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 10 | .cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} 11 | .cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} 12 | 13 | .cm-s-monokai span.cm-comment {color: #75715e;} 14 | .cm-s-monokai span.cm-atom {color: #ae81ff;} 15 | .cm-s-monokai span.cm-number {color: #ae81ff;} 16 | 17 | .cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;} 18 | .cm-s-monokai span.cm-keyword {color: #f92672;} 19 | .cm-s-monokai span.cm-string {color: #e6db74;} 20 | 21 | .cm-s-monokai span.cm-variable {color: #f8f8f2;} 22 | .cm-s-monokai span.cm-variable-2 {color: #9effff;} 23 | .cm-s-monokai span.cm-variable-3 {color: #66d9ef;} 24 | .cm-s-monokai span.cm-def {color: #fd971f;} 25 | .cm-s-monokai span.cm-bracket {color: #f8f8f2;} 26 | .cm-s-monokai span.cm-tag {color: #f92672;} 27 | .cm-s-monokai span.cm-header {color: #ae81ff;} 28 | .cm-s-monokai span.cm-link {color: #ae81ff;} 29 | .cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;} 30 | 31 | .cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;} 32 | .cm-s-monokai .CodeMirror-matchingbracket { 33 | text-decoration: underline; 34 | color: white !important; 35 | } 36 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta {color: #555;} 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | 11 | .cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;} 12 | .cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 13 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment {color:#75787b} 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3} 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a} 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328} 14 | .cm-s-neo .cm-string {color:#b35e14} 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65} 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | 38 | .cm-s-neo div.CodeMirror-cursor { 39 | width: auto; 40 | border: 0; 41 | background: rgba(155,157,162,0.37); 42 | z-index: 1; 43 | } 44 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/night.css: -------------------------------------------------------------------------------- 1 | /* Loosely based on the Midnight Textmate theme */ 2 | 3 | .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } 4 | .cm-s-night div.CodeMirror-selected { background: #447 !important; } 5 | .cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); } 6 | .cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); } 7 | .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 8 | .cm-s-night .CodeMirror-guttermarker { color: white; } 9 | .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; } 10 | .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } 11 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } 12 | 13 | .cm-s-night span.cm-comment { color: #6900a1; } 14 | .cm-s-night span.cm-atom { color: #845dc4; } 15 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } 16 | .cm-s-night span.cm-keyword { color: #599eff; } 17 | .cm-s-night span.cm-string { color: #37f14a; } 18 | .cm-s-night span.cm-meta { color: #7678e2; } 19 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } 20 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } 21 | .cm-s-night span.cm-bracket { color: #8da6ce; } 22 | .cm-s-night span.cm-comment { color: #6900a1; } 23 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } 24 | .cm-s-night span.cm-link { color: #845dc4; } 25 | .cm-s-night span.cm-error { color: #9d1e15; } 26 | 27 | .cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;} 28 | .cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} 29 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Dark) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;} 12 | .cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;} 13 | .cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); } 14 | .cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); } 15 | .cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;} 16 | .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; } 17 | .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; } 18 | .cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;} 19 | .cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;} 20 | 21 | .cm-s-paraiso-dark span.cm-comment {color: #e96ba8;} 22 | .cm-s-paraiso-dark span.cm-atom {color: #815ba4;} 23 | .cm-s-paraiso-dark span.cm-number {color: #815ba4;} 24 | 25 | .cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;} 26 | .cm-s-paraiso-dark span.cm-keyword {color: #ef6155;} 27 | .cm-s-paraiso-dark span.cm-string {color: #fec418;} 28 | 29 | .cm-s-paraiso-dark span.cm-variable {color: #48b685;} 30 | .cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;} 31 | .cm-s-paraiso-dark span.cm-def {color: #f99b15;} 32 | .cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;} 33 | .cm-s-paraiso-dark span.cm-tag {color: #ef6155;} 34 | .cm-s-paraiso-dark span.cm-link {color: #815ba4;} 35 | .cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;} 36 | 37 | .cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;} 38 | .cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Light) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;} 12 | .cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;} 13 | .cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; } 14 | .cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; } 15 | .cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;} 16 | .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; } 17 | .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; } 18 | .cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;} 19 | .cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;} 20 | 21 | .cm-s-paraiso-light span.cm-comment {color: #e96ba8;} 22 | .cm-s-paraiso-light span.cm-atom {color: #815ba4;} 23 | .cm-s-paraiso-light span.cm-number {color: #815ba4;} 24 | 25 | .cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;} 26 | .cm-s-paraiso-light span.cm-keyword {color: #ef6155;} 27 | .cm-s-paraiso-light span.cm-string {color: #fec418;} 28 | 29 | .cm-s-paraiso-light span.cm-variable {color: #48b685;} 30 | .cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;} 31 | .cm-s-paraiso-light span.cm-def {color: #f99b15;} 32 | .cm-s-paraiso-light span.cm-bracket {color: #41323f;} 33 | .cm-s-paraiso-light span.cm-tag {color: #ef6155;} 34 | .cm-s-paraiso-light span.cm-link {color: #815ba4;} 35 | .cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;} 36 | 37 | .cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;} 38 | .cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/rubyblue.css: -------------------------------------------------------------------------------- 1 | .cm-s-rubyblue.CodeMirror { background: #112435; color: white; } 2 | .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } 3 | .cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); } 4 | .cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); } 5 | .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } 6 | .cm-s-rubyblue .CodeMirror-guttermarker { color: white; } 7 | .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; } 8 | .cm-s-rubyblue .CodeMirror-linenumber { color: white; } 9 | .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } 10 | 11 | .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } 12 | .cm-s-rubyblue span.cm-atom { color: #F4C20B; } 13 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } 14 | .cm-s-rubyblue span.cm-keyword { color: #F0F; } 15 | .cm-s-rubyblue span.cm-string { color: #F08047; } 16 | .cm-s-rubyblue span.cm-meta { color: #F0F; } 17 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } 18 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } 19 | .cm-s-rubyblue span.cm-bracket { color: #F0F; } 20 | .cm-s-rubyblue span.cm-link { color: #F4C20B; } 21 | .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } 22 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } 23 | .cm-s-rubyblue span.cm-error { color: #AF2018; } 24 | 25 | .cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;} 26 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/the-matrix.css: -------------------------------------------------------------------------------- 1 | .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } 2 | .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; } 3 | .cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); } 4 | .cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); } 5 | .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } 6 | .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; } 7 | .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; } 8 | .cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } 9 | .cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; } 10 | 11 | .cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;} 12 | .cm-s-the-matrix span.cm-atom {color: #3FF;} 13 | .cm-s-the-matrix span.cm-number {color: #FFB94F;} 14 | .cm-s-the-matrix span.cm-def {color: #99C;} 15 | .cm-s-the-matrix span.cm-variable {color: #F6C;} 16 | .cm-s-the-matrix span.cm-variable-2 {color: #C6F;} 17 | .cm-s-the-matrix span.cm-variable-3 {color: #96F;} 18 | .cm-s-the-matrix span.cm-property {color: #62FFA0;} 19 | .cm-s-the-matrix span.cm-operator {color: #999} 20 | .cm-s-the-matrix span.cm-comment {color: #CCCCCC;} 21 | .cm-s-the-matrix span.cm-string {color: #39C;} 22 | .cm-s-the-matrix span.cm-meta {color: #C9F;} 23 | .cm-s-the-matrix span.cm-qualifier {color: #FFF700;} 24 | .cm-s-the-matrix span.cm-builtin {color: #30a;} 25 | .cm-s-the-matrix span.cm-bracket {color: #cc7;} 26 | .cm-s-the-matrix span.cm-tag {color: #FFBD40;} 27 | .cm-s-the-matrix span.cm-attribute {color: #FFF700;} 28 | .cm-s-the-matrix span.cm-error {color: #FF0000;} 29 | 30 | .cm-s-the-matrix .CodeMirror-activeline-background {background: #040;} 31 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Tomorrow Night - Bright 4 | Author: Chris Kempson 5 | 6 | Port done by Gerard Braad 7 | 8 | */ 9 | 10 | .cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;} 11 | .cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;} 12 | .cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;} 13 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; } 14 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; } 15 | .cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;} 16 | .cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;} 17 | 18 | .cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;} 19 | .cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;} 20 | .cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;} 21 | 22 | .cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;} 23 | .cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;} 24 | .cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;} 25 | 26 | .cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;} 27 | .cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;} 28 | .cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;} 29 | .cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;} 30 | .cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;} 31 | .cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;} 32 | .cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;} 33 | 34 | .cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;} 35 | .cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 36 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/ttcn.css: -------------------------------------------------------------------------------- 1 | .cm-quote {color: #090;} 2 | .cm-negative {color: #d44;} 3 | .cm-positive {color: #292;} 4 | .cm-header, .cm-strong {font-weight: bold;} 5 | .cm-em {font-style: italic;} 6 | .cm-link {text-decoration: underline;} 7 | .cm-strikethrough {text-decoration: line-through;} 8 | .cm-header {color: #00f; font-weight: bold;} 9 | 10 | .cm-atom {color: #219;} 11 | .cm-attribute {color: #00c;} 12 | .cm-bracket {color: #997;} 13 | .cm-comment {color: #333333;} 14 | .cm-def {color: #00f;} 15 | .cm-em {font-style: italic;} 16 | .cm-error {color: #f00;} 17 | .cm-hr {color: #999;} 18 | .cm-invalidchar {color: #f00;} 19 | .cm-keyword {font-weight:bold} 20 | .cm-link {color: #00c; text-decoration: underline;} 21 | .cm-meta {color: #555;} 22 | .cm-negative {color: #d44;} 23 | .cm-positive {color: #292;} 24 | .cm-qualifier {color: #555;} 25 | .cm-strikethrough {text-decoration: line-through;} 26 | .cm-string {color: #006400;} 27 | .cm-string-2 {color: #f50;} 28 | .cm-strong {font-weight: bold;} 29 | .cm-tag {color: #170;} 30 | .cm-variable {color: #8B2252;} 31 | .cm-variable-2 {color: #05a;} 32 | .cm-variable-3 {color: #085;} 33 | 34 | .cm-s-default .cm-error {color: #f00;} 35 | .cm-invalidchar {color: #f00;} 36 | 37 | /* ASN */ 38 | .cm-s-ttcn .cm-accessTypes, 39 | .cm-s-ttcn .cm-compareTypes {color: #27408B} 40 | .cm-s-ttcn .cm-cmipVerbs {color: #8B2252} 41 | .cm-s-ttcn .cm-modifier {color:#D2691E} 42 | .cm-s-ttcn .cm-status {color:#8B4545} 43 | .cm-s-ttcn .cm-storage {color:#A020F0} 44 | .cm-s-ttcn .cm-tags {color:#006400} 45 | 46 | /* CFG */ 47 | .cm-s-ttcn .cm-externalCommands {color: #8B4545; font-weight:bold} 48 | .cm-s-ttcn .cm-fileNCtrlMaskOptions, 49 | .cm-s-ttcn .cm-sectionTitle {color: #2E8B57; font-weight:bold} 50 | 51 | /* TTCN */ 52 | .cm-s-ttcn .cm-booleanConsts, 53 | .cm-s-ttcn .cm-otherConsts, 54 | .cm-s-ttcn .cm-verdictConsts {color: #006400} 55 | .cm-s-ttcn .cm-configOps, 56 | .cm-s-ttcn .cm-functionOps, 57 | .cm-s-ttcn .cm-portOps, 58 | .cm-s-ttcn .cm-sutOps, 59 | .cm-s-ttcn .cm-timerOps, 60 | .cm-s-ttcn .cm-verdictOps {color: #0000FF} 61 | .cm-s-ttcn .cm-preprocessor, 62 | .cm-s-ttcn .cm-templateMatch, 63 | .cm-s-ttcn .cm-ttcn3Macros {color: #27408B} 64 | .cm-s-ttcn .cm-types {color: #A52A2A; font-weight:bold} 65 | .cm-s-ttcn .cm-visibilityModifiers {font-weight:bold} 66 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/twilight.css: -------------------------------------------------------------------------------- 1 | .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ 2 | .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ 3 | .cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); } 4 | .cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); } 5 | 6 | .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } 7 | .cm-s-twilight .CodeMirror-guttermarker { color: white; } 8 | .cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; } 9 | .cm-s-twilight .CodeMirror-linenumber { color: #aaa; } 10 | .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } 11 | 12 | .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ 13 | .cm-s-twilight .cm-atom { color: #FC0; } 14 | .cm-s-twilight .cm-number { color: #ca7841; } /**/ 15 | .cm-s-twilight .cm-def { color: #8DA6CE; } 16 | .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ 17 | .cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ 18 | .cm-s-twilight .cm-operator { color: #cda869; } /**/ 19 | .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ 20 | .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ 21 | .cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/ 22 | .cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ 23 | .cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ 24 | .cm-s-twilight .cm-tag { color: #997643; } /**/ 25 | .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ 26 | .cm-s-twilight .cm-header { color: #FF6400; } 27 | .cm-s-twilight .cm-hr { color: #AEAEAE; } 28 | .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ 29 | .cm-s-twilight .cm-error { border-bottom: 1px solid red; } 30 | 31 | .cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;} 32 | .cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} 33 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/vibrant-ink.css: -------------------------------------------------------------------------------- 1 | /* Taken from the popular Visual Studio Vibrant Ink Schema */ 2 | 3 | .cm-s-vibrant-ink.CodeMirror { background: black; color: white; } 4 | .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } 5 | .cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); } 6 | .cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); } 7 | 8 | .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 9 | .cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; } 10 | .cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 11 | .cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } 12 | .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } 13 | 14 | .cm-s-vibrant-ink .cm-keyword { color: #CC7832; } 15 | .cm-s-vibrant-ink .cm-atom { color: #FC0; } 16 | .cm-s-vibrant-ink .cm-number { color: #FFEE98; } 17 | .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } 18 | .cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D } 19 | .cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D } 20 | .cm-s-vibrant-ink .cm-operator { color: #888; } 21 | .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } 22 | .cm-s-vibrant-ink .cm-string { color: #A5C25C } 23 | .cm-s-vibrant-ink .cm-string-2 { color: red } 24 | .cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } 25 | .cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } 26 | .cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } 27 | .cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } 28 | .cm-s-vibrant-ink .cm-header { color: #FF6400; } 29 | .cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } 30 | .cm-s-vibrant-ink .cm-link { color: blue; } 31 | .cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } 32 | 33 | .cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;} 34 | .cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} 35 | -------------------------------------------------------------------------------- /static/CodeMirror/theme/yeti.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: yeti 4 | Author: Michael Kaminsky (http://github.com/mkaminsky11) 5 | 6 | Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax) 7 | 8 | */ 9 | 10 | 11 | .cm-s-yeti.CodeMirror { 12 | background-color: #ECEAE8 !important; 13 | color: #d1c9c0 !important; 14 | border: none; 15 | } 16 | 17 | .cm-s-yeti .CodeMirror-gutters{ 18 | color: #adaba6; 19 | background-color: #E5E1DB; 20 | border: none; 21 | } 22 | .cm-s-yeti .CodeMirror-cursor { 23 | border-left: solid thin #d1c9c0 !important; 24 | } 25 | .cm-s-yeti .CodeMirror-linenumber { 26 | color: #adaba6; 27 | } 28 | .cm-s-yeti.CodeMirror-focused .CodeMirror-selected { 29 | background: #DCD8D2; 30 | } 31 | .cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { 32 | background: #DCD8D2; 33 | } 34 | .cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { 35 | background: #DCD8D2; 36 | } 37 | .cm-s-yeti span.cm-comment { 38 | color: #d4c8be; 39 | } 40 | .cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { 41 | color: #96c0d8; 42 | } 43 | .cm-s-yeti span.cm-number { 44 | color: #a074c4; 45 | } 46 | .cm-s-yeti span.cm-variable { 47 | color: #55b5db; 48 | } 49 | .cm-s-yeti span.cm-variable-2 { 50 | color: #a074c4; 51 | } 52 | .cm-s-yeti span.cm-def { 53 | color: #55b5db; 54 | } 55 | .cm-s-yeti span.cm-operator { 56 | color: #9fb96e; 57 | } 58 | .cm-s-yeti span.cm-keyword { 59 | color: #9fb96e; 60 | } 61 | .cm-s-yeti span.cm-atom { 62 | color:##a074c4; 63 | } 64 | .cm-s-yeti span.cm-meta { 65 | color: #96c0d8; 66 | } 67 | .cm-s-yeti span.cm-tag { 68 | color: #96c0d8; 69 | } 70 | .cm-s-yeti span.cm-attribute { 71 | color: #9fb96e; 72 | } 73 | .cm-s-yeti span.cm-qualifier { 74 | color: #96c0d8; 75 | } 76 | .cm-s-yeti span.cm-property { 77 | color: #a074c4; 78 | } 79 | .cm-s-yeti span.cm-builtin { 80 | color: #a074c4; 81 | } 82 | .cm-s-yeti span.cm-variable-3 { 83 | color: #96c0d8; 84 | } 85 | .cm-s-yeti .CodeMirror-activeline-background {background: #E7E4E0 !important;} 86 | .cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline;} -------------------------------------------------------------------------------- /static/CodeMirror/theme/zenburn.css: -------------------------------------------------------------------------------- 1 | /** 2 | * " 3 | * Using Zenburn color palette from the Emacs Zenburn Theme 4 | * https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el 5 | * 6 | * Also using parts of https://github.com/xavi/coderay-lighttable-theme 7 | * " 8 | * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css 9 | */ 10 | 11 | .cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; } 12 | .cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; } 13 | .cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white !important; } 14 | .cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; } 15 | .cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; } 16 | .cm-s-zenburn span.cm-comment { color: #7f9f7f; } 17 | .cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; } 18 | .cm-s-zenburn span.cm-atom { color: #bfebbf; } 19 | .cm-s-zenburn span.cm-def { color: #dcdccc; } 20 | .cm-s-zenburn span.cm-variable { color: #dfaf8f; } 21 | .cm-s-zenburn span.cm-variable-2 { color: #dcdccc; } 22 | .cm-s-zenburn span.cm-string { color: #cc9393; } 23 | .cm-s-zenburn span.cm-string-2 { color: #cc9393; } 24 | .cm-s-zenburn span.cm-number { color: #dcdccc; } 25 | .cm-s-zenburn span.cm-tag { color: #93e0e3; } 26 | .cm-s-zenburn span.cm-property { color: #dfaf8f; } 27 | .cm-s-zenburn span.cm-attribute { color: #dfaf8f; } 28 | .cm-s-zenburn span.cm-qualifier { color: #7cb8bb; } 29 | .cm-s-zenburn span.cm-meta { color: #f0dfaf; } 30 | .cm-s-zenburn span.cm-header { color: #f0efd0; } 31 | .cm-s-zenburn span.cm-operator { color: #f0efd0; } 32 | .cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; } 33 | .cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; } 34 | .cm-s-zenburn .CodeMirror-activeline { background: #000000; } 35 | .cm-s-zenburn .CodeMirror-activeline-background { background: #000000; } 36 | .cm-s-zenburn .CodeMirror-selected { background: #545454; } 37 | .cm-s-zenburn .CodeMirror-focused .CodeMirror-selected { background: #4f4f4f; } 38 | -------------------------------------------------------------------------------- /static/css/styles.css: -------------------------------------------------------------------------------- 1 | /* General Styles */ 2 | .center { 3 | text-align: center; 4 | } 5 | a { 6 | color: #2F4C84; 7 | text-decoration: none; 8 | } 9 | a:hover { 10 | text-decoration: underline; 11 | } 12 | .margin-15 { 13 | margin: 15px 0; 14 | } 15 | .left { 16 | display: block; 17 | float: left; 18 | } 19 | .right { 20 | display: inline-block; 21 | float: right; 22 | } 23 | .bottom-border { 24 | border-bottom: solid 1px #DDD; 25 | } 26 | 27 | /* All-through pages styles */ 28 | #logo a { 29 | color: #000; 30 | text-decoration: none; 31 | } 32 | #header h1 { 33 | margin: 10px 0; 34 | } 35 | .login-button { 36 | padding: 18px 0; 37 | font-size: 14px; 38 | text-align: center; 39 | background-color: #F2F2F2; 40 | } 41 | .login-button:hover { 42 | background-color: #F8F8F8; 43 | } 44 | #content, #sidebar { 45 | margin: 10px 0 20px 0; 46 | border: solid 1px #F0F0F0; 47 | padding: 5px 10px; 48 | } 49 | 50 | /* List Page */ 51 | .problems-list { 52 | margin: 15px 0; 53 | background-color: #F9F9F9; 54 | } 55 | 56 | .problem { 57 | padding: 5px; 58 | border-bottom: solid 1px #DDD; 59 | } 60 | .problem:hover { 61 | border: solid 1px #DDD; 62 | padding-left: 4px; 63 | } 64 | 65 | .problem span { 66 | margin-right: 20px; 67 | } 68 | 69 | 70 | /* Problem Page */ 71 | .problem-details { 72 | margin: 15px; 73 | } 74 | 75 | .write-code { 76 | margin-top: 50px; 77 | margin-left: 20px; 78 | } -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jronak/OnlineJudge/f6b89fe09600e42565dec08cc80c28b70e1801aa/static/index.html -------------------------------------------------------------------------------- /static/js/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jronak/OnlineJudge/f6b89fe09600e42565dec08cc80c28b70e1801aa/static/js/script.js -------------------------------------------------------------------------------- /tests/default_test.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | "runtime" 8 | "path/filepath" 9 | _ "OnlineJudge/routers" 10 | 11 | "github.com/astaxie/beego" 12 | . "github.com/smartystreets/goconvey/convey" 13 | ) 14 | 15 | func init() { 16 | _, file, _, _ := runtime.Caller(1) 17 | apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator)))) 18 | beego.TestBeegoInit(apppath) 19 | } 20 | 21 | 22 | // TestMain is a sample to run an endpoint test 23 | func TestMain(t *testing.T) { 24 | r, _ := http.NewRequest("GET", "/", nil) 25 | w := httptest.NewRecorder() 26 | beego.BeeApp.Handlers.ServeHTTP(w, r) 27 | 28 | beego.Trace("testing", "TestMain", "Code[%d]\n%s", w.Code, w.Body.String()) 29 | 30 | Convey("Subject: Test Station Endpoint\n", t, func() { 31 | Convey("Status Code Should Be 200", func() { 32 | So(w.Code, ShouldEqual, 200) 33 | }) 34 | Convey("The Result Should Not Be Empty", func() { 35 | So(w.Body.Len(), ShouldBeGreaterThan, 0) 36 | }) 37 | }) 38 | } 39 | 40 | -------------------------------------------------------------------------------- /views/errorHead.tpl: -------------------------------------------------------------------------------- 1 |
2 | {{.flash.error}} 3 | {{.flash.warning}} 4 | {{.flash.notice}} 5 |
-------------------------------------------------------------------------------- /views/layout.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{.title}} | OnlineJudge 5 | 6 | 7 | 8 | 9 | 10 | {{ .HtmlHead }} 11 | 12 | 13 | 14 |
15 | 32 | 33 |
34 | 35 | {{ .ErrorHead }} 36 | 37 |
38 |
39 | {{ .LayoutContent }} 40 |
41 |
42 |
43 | 46 |
47 |
48 | 49 | -------------------------------------------------------------------------------- /views/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Online Judge 5 | 6 | 7 |
8 |

9 |

10 |

11 | 12 |
13 |

{{.error}}

14 | 15 | -------------------------------------------------------------------------------- /views/problem/addtest.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Tests Present for {{str2html (.problem.Statement | n2br)}}

4 | {{range $key, $val := .cases}} 5 |
6 |

Input:
{{str2html (.Input | n2br)}}
7 | Output:
{{str2html (.Output | n2br)}}
8 | Timeout:
{{.Timeout}}
9 |

10 |
11 | {{end}} 12 |

Create Test Case

13 |
14 |

15 |

16 |

22 | 23 |
24 |
-------------------------------------------------------------------------------- /views/problem/create.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Create Problem

4 |
5 |

6 |

7 |

8 |

9 |

10 |

15 |

20 |

25 | 26 |
27 |
-------------------------------------------------------------------------------- /views/problem/list.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{range $key, $val := .problems}} 4 |
5 |
{{.Statement}}
6 |

Type: {{.Type}}Difficulty: {{.Difficulty}}Solved by: {{.Solve_count}}Created: {{.Created_at}}

7 |
8 | {{end}} 9 |
-------------------------------------------------------------------------------- /views/problem/show.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 |

{{.problem.Statement}}

4 |

Problem Description{{ if .isEditor }}+{{ end }}
{{str2html (.problem.Description | n2br)}}

5 |

Constraints
{{str2html (.problem.Constraints | n2br)}}

6 |

Sample Input
{{str2html (.problem.Sample_input | n2br)}}

7 |

Sample Output
{{str2html (.problem.Sample_output | n2br)}}

8 |
9 |
10 |
Submit your code
11 |
12 | 13 |
14 | 22 |
      
23 |
24 |
25 |

26 |
27 |
28 | 29 | -------------------------------------------------------------------------------- /views/sidebar/recently_solved_by.tpl: -------------------------------------------------------------------------------- 1 |

Recently Solved by

2 | {{ if .recentlySolvedUsersExist }} 3 | {{range $key, $val := .recentlySolvedUsers}} 4 | {{.Username}}
5 | {{end}} 6 | {{ else }} 7 | Be the first to solve! 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /views/sidebar/showcategories.tpl: -------------------------------------------------------------------------------- 1 |

Categories

2 | {{range $key, $val := .types}} 3 | {{.}}
4 | {{end}} -------------------------------------------------------------------------------- /views/testExec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yo 5 | 6 | 7 |
8 | 10 |
11 | 12 |
13 | 21 |
22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /views/user/login.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Login

5 |
6 |

7 |

8 |

9 |
10 |
11 |
12 |

Don't have an account? Sign up!

13 |
14 |

15 |

16 |

17 |

18 |

19 | 20 |
21 |
22 |
-------------------------------------------------------------------------------- /views/user/show.tpl: -------------------------------------------------------------------------------- 1 |
2 |

{{.userDetails.Name}} @{{.userDetails.Username}}

3 |

4 | Score: {{.userDetails.Score}}
5 | College: {{.userDetails.College}}
6 |

7 |
8 |
Problems Solved
9 | {{ if .solvedProblemsExist }} 10 | {{range $key, $val := .solvedProblems}} 11 | {{.Statement}}
12 | {{end}} 13 | {{ else }} 14 | Not solved any yet. 15 | {{ end }} 16 |
17 |
--------------------------------------------------------------------------------