├── .gitignore ├── README.md ├── project.clj ├── resources └── templates │ ├── asc │ ├── pages │ │ └── adoc-page.asc │ └── posts │ │ └── 2014-10-10-adoc-post.asc │ ├── config.edn │ ├── css │ ├── example.css │ └── sassexample.scss │ ├── img │ ├── cider-logo-w640.png │ └── cryogen.png │ ├── md │ ├── pages │ │ └── about.md │ └── posts │ │ ├── 2017-04-26-beginning-to-hack-on-cider.md │ │ ├── 2017-04-27-basic-setup-cider-nrepl.md │ │ ├── 2017-04-30-eval-walkthrough.md │ │ └── 2017-05-10-font-lock-bug.md │ └── themes │ ├── blue │ ├── css │ │ └── screen.css │ ├── html │ │ ├── 404.html │ │ ├── archives.html │ │ ├── author.html │ │ ├── base.html │ │ ├── home.html │ │ ├── page.html │ │ ├── post-content.html │ │ ├── post.html │ │ ├── previews.html │ │ ├── tag.html │ │ └── tags.html │ └── js │ │ └── highlight.pack.js │ ├── blue_centered │ ├── css │ │ └── screen.css │ ├── html │ │ ├── 404.html │ │ ├── archives.html │ │ ├── author.html │ │ ├── base.html │ │ ├── home.html │ │ ├── page.html │ │ ├── post-content.html │ │ ├── post.html │ │ ├── previews.html │ │ ├── tag.html │ │ └── tags.html │ └── js │ │ └── highlight.pack.js │ └── nucleus │ ├── css │ ├── buttons.css │ ├── menu.css │ ├── reset.css │ ├── style.css │ └── typography.css │ ├── html │ ├── 404.html │ ├── archives.html │ ├── author.html │ ├── base.html │ ├── home.html │ ├── page.html │ ├── post-content.html │ ├── post.html │ ├── previews.html │ ├── tag.html │ └── tags.html │ └── js │ ├── highlight.pack.js │ └── scripts.js └── src └── cryogen ├── core.clj └── server.clj /.gitignore: -------------------------------------------------------------------------------- 1 | pom.xml 2 | pom.xml.asc 3 | *jar 4 | /lib/ 5 | /classes/ 6 | /target/ 7 | /checkouts/ 8 | .lein-deps-sum 9 | .lein-repl-history 10 | .lein-plugins/ 11 | .lein-failures 12 | /resources/public/ 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Hacking CIDER ## 2 | 3 | This is a site about hacking on CIDER. Anyone can contribute through pull requests with articles about working out bugs, adding features, or just documenting how some aspects of CIDER work. The point is to get more people comfortable in the codebase and willing to add changes. We are all working in Clojure so picking up lisp should come easy, and we want to provide as many guides as we can to that end here. 4 | 5 | This site is a static site compiled with [Cryogen](http://cryogenweb.org/index.html). Blog posts are in markdown and placed in `resources/templates/md/` and must conform to the filename `yyyy-dd-mm-title-name.md`. The top of each file must contain some metadata in the form of a clojure map along the following structure: 6 | 7 | ```clojure 8 | {:title "Basic setup of CIDER for hacking" 9 | :layout :post 10 | :tags ["CIDER" "setup" "emacs"] 11 | :toc true} 12 | ``` 13 | 14 | The site is located at [www.hackingcider.com](http://www.hackingcider.com). 15 | 16 | ## How to Add ## 17 | 18 | Just clone the site and run `lein ring server`. This creates the webserver and serves the articles. Make your own article in the directory mentioned above and then send a pull request our way. 19 | 20 | To compile the site, just run `lein run` which will create the `resources/public` directory. 21 | 22 | If you would like to customize the look of the site, please feel free as it is very basic and could use some visual tweaks. 23 | -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject cryogen "0.1.0" 2 | :description "Simple static site generator" 3 | :url "https://github.com/lacarmen/cryogen" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.8.0"] 7 | [ring/ring-devel "1.5.1"] 8 | [compojure "1.5.2"] 9 | [ring-server "0.4.0"] 10 | [cryogen-markdown "0.1.6"] 11 | [cryogen-core "0.1.55"]] 12 | :plugins [[lein-ring "0.9.7"]] 13 | :main cryogen.core 14 | :ring {:init cryogen.server/init 15 | :handler cryogen.server/handler}) 16 | -------------------------------------------------------------------------------- /resources/templates/asc/pages/adoc-page.asc: -------------------------------------------------------------------------------- 1 | {:title "Adoc Page" 2 | :layout :page 3 | :page-index 0 4 | :navbar? true} 5 | 6 | == Adoc Page == 7 | 8 | We support http://asciidoc.org/[asciidoc] too! 9 | -------------------------------------------------------------------------------- /resources/templates/asc/posts/2014-10-10-adoc-post.asc: -------------------------------------------------------------------------------- 1 | {:title "Adoc Post" 2 | :layout :post 3 | :tags ["cryogen" "asciidoc"] 4 | :toc false 5 | } 6 | 7 | :toc: macro 8 | 9 | == Example Asciidoc Post == 10 | This is an example asciidoc post. 11 | 12 | You can use a manually placed table of contents by setting `:toc false` in the front matter, but use `:toc: macro` at the top of the post, and `toc::[]` where the table of contents is supposed to be, like here: 13 | 14 | toc::[] 15 | 16 | === Section 1 === 17 | 18 | .Heading 19 | 20 | With some text and maybe even a bulleted list: 21 | 22 | - Thing 1 23 | - Thing 2 24 | 25 | Or how about some *bold* or _italicized_ text? 26 | 27 | === Section 2 === 28 | 29 | Will a code snippet work? 30 | 31 | .bash 32 | [source,bash] 33 | ---- 34 | $ echo "foo" 35 | ---- 36 | 37 | .clojure 38 | [source,clojure] 39 | ---- 40 | (defn echo [s] 41 | (println s)) 42 | ---- 43 | 44 | 45 | -------------------------------------------------------------------------------- /resources/templates/config.edn: -------------------------------------------------------------------------------- 1 | {:site-title "Hacking CIDER" 2 | :author "clojure-emacs" 3 | :description "A site about hacking on CIDER" 4 | :site-url "http://www.hackingcider.com/" 5 | :post-root "posts" 6 | :page-root "pages" 7 | :post-root-uri "posts-output" 8 | :page-root-uri "pages-output" 9 | :tag-root-uri "tags-output" 10 | :author-root-uri "authors-output" 11 | :blog-prefix "" 12 | :rss-name "feed.xml" 13 | :rss-filters ["cryogen"] 14 | :recent-posts 3 15 | :post-date-format "yyyy-MM-dd" 16 | :archive-group-format "yyyy MMMM" 17 | :sass-src [] 18 | :sass-path "sass" 19 | :compass-path "compass" 20 | :theme "blue" 21 | :resources ["img"] 22 | :keep-files [".git"] 23 | :disqus? false 24 | :disqus-shortname "" 25 | :ignored-files [#"\.#.*" #".*\.swp$"] 26 | :posts-per-page 5 27 | :blocks-per-preview 4 28 | :previews? true 29 | :clean-urls? true 30 | :hide-future-posts? true 31 | :klipse {} 32 | :debug? false} 33 | -------------------------------------------------------------------------------- /resources/templates/css/example.css: -------------------------------------------------------------------------------- 1 | a { 2 | text-decoration-style: dashed; 3 | } -------------------------------------------------------------------------------- /resources/templates/css/sassexample.scss: -------------------------------------------------------------------------------- 1 | body { 2 | a { 3 | text-decoration-style: dashed; 4 | } 5 | } -------------------------------------------------------------------------------- /resources/templates/img/cider-logo-w640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure-emacs/hackingcider/1cd304665943d09862df97178f975437628c8c44/resources/templates/img/cider-logo-w640.png -------------------------------------------------------------------------------- /resources/templates/img/cryogen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure-emacs/hackingcider/1cd304665943d09862df97178f975437628c8c44/resources/templates/img/cryogen.png -------------------------------------------------------------------------------- /resources/templates/md/pages/about.md: -------------------------------------------------------------------------------- 1 | {:title "About" 2 | :layout :page 3 | :page-index 0 4 | :navbar? true} 5 | 6 | ## Hacking CIDER 7 | 8 | This site aims to be a resource for hacking on CIDER. It's not about flashy websites or graphics, but a way to learn how to delve into the CIDER codebase, both elisp and Clojure. Pull requests are encouraged. Pull requests are not just for experts: feel free to contribute "tiny" fixes that clean up the visuals, articles about your own CIDER hacking and prototyping, or core contributors tips and tricks. 9 | 10 | The great thing about elisp is that if you're here, you're already familiar with parentheses and evaluation. Understanding and modifying elisp will come second nature. All it takes is an introduction to the codebase, a few tools, and how to write some tests. 11 | -------------------------------------------------------------------------------- /resources/templates/md/posts/2017-04-26-beginning-to-hack-on-cider.md: -------------------------------------------------------------------------------- 1 | {:title "Basic setup of CIDER for hacking" 2 | :layout :post 3 | :tags ["CIDER" "setup" "emacs"] 4 | :toc true} 5 | 6 | ## Installation ## 7 | 8 | Emacs normally downloads packages into a directory in `~/.emacs.d/` or somewhere else not super accessible. The first step to setting up a way to start hacking on CIDER is to have your own copy that you own. [Fork](https://github.com/clojure-emacs/cider) it, and then add the following to your your init.el or equivalent, but substituting wherever you cloned it for `~/projects/cider`: 9 | 10 | ```emacs-lisp 11 | ;; load local version of cider 12 | (add-to-list 'load-path "~/projects/cider") 13 | (require 'cider) 14 | ``` 15 | 16 | Delete any residual CIDER code left over in your melpa directory so that you know there's only one copy of CIDER running and its a permanent one. (This, in [prelude](https://github.com/bbatsov/prelude) is located at `~/.emacs.d/elpa`). 17 | 18 | If you don't have CIDER's dependencies from running it previously from melpa, ensure that the following packages are installed: 19 | 20 | - clojure-mode 21 | - pkg-info 22 | - queue 23 | - spinner 24 | - seq 25 | 26 | See the [installation docs](https://cider.readthedocs.io/en/latest/installation/#manual-installation) for more info. 27 | 28 | ## Begin Introspecting ## 29 | 30 | ### Looking at traffic ### 31 | 32 | CIDER at a highlevel is an elisp client that sends messages back and forth with the cider-nrepl clojure server. The best place to start--whether gathering information for bug reports, development or prototyping--is by toggling the recording of these messages. Toggle this by `M-x nrepl-toggle-message-loggin`. After any interaction, be it autocompelete, code evaluation, etc, there will be a messages buffer with the back and forth of your code. 33 | 34 | ```clojure 35 | (--> 36 | id "55" 37 | op "eldoc" 38 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 39 | time-stamp "2017-04-26 22:52:29.466403690" 40 | ns "fizzbuzz.core" 41 | symbol "div-yo" 42 | ) 43 | (<-- 44 | id "55" 45 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 46 | time-stamp "2017-04-26 22:52:29.471443612" 47 | docstring nil 48 | eldoc (("x" "y")) 49 | name "div-yo" 50 | ns "fizzbuzz.core" 51 | status ("done") 52 | type "function" 53 | ) 54 | (--> 55 | id "56" 56 | op "eval" 57 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 58 | time-stamp "2017-04-26 22:52:31.746495637" 59 | code "(div-yo 4 3) 60 | " 61 | column 16 62 | file "*cider-repl fizzbuzz*" 63 | line 68 64 | ns "fizzbuzz.core" 65 | ) 66 | (<-- 67 | id "56" 68 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 69 | time-stamp "2017-04-26 22:52:31.755104708" 70 | ns "fizzbuzz.core" 71 | value "4/3" 72 | ) 73 | (<-- 74 | id "56" 75 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 76 | time-stamp "2017-04-26 22:52:31.766114712" 77 | status ("done") 78 | ) 79 | (<-- 80 | id "56" 81 | session "d36ae5a8-16e5-4454-985f-aa028767f33f" 82 | time-stamp "2017-04-26 22:52:31.767151265" 83 | changed-namespaces (dict) 84 | repl-type "clj" 85 | status ("state") 86 | ) 87 | 88 | ``` 89 | 90 | These are actual messages from a test project, fizzbuzz, that I keep up for prototyping and testing. Broadly, each message is an id, session, timestamp, and then whatever information happens to be going across. Here, the first of these messages, message 55, is a request for eldoc information about the function `div-yo`. Message 56 is requesting evaluation of a simple invocation of the function and its return value, followed by a done message and a state message. 91 | 92 | Each of these values could probably be a good topic of a post. For example, the session dictates which repl you're talking to, sorta. Each repl (really client buffer) has a process attached with actually two sessions. One session is for standard evaluation like above `(div-yo 3 4)` and the other is the tooling session, meant for things like eldoc and compeletion requests. The fact that these two are in the same session is a bug actually. The separation comes so that when you ask for the last result, `*1`, you'll never get a completition result or eldoc signature but the `4/3` that the function returned. 93 | 94 | ### Debugging Elisp Code ### 95 | 96 | Emacs is quite a beast; self-documenting, several vm's, it is a lisp interpreter at heart. Getting familiar with the debugging tooling and navigation will become quickly second nature due to shared keybindings with Clojure navigation and debugging shortcuts. 97 | 98 | Navigating to functions is trivial in emacs with `M-x find-function`, bound to `C-h f` in vanilla emacsen. If you're running emacs 25 you have a really nice new feature with the `Xref` [package](https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html) for navigation. Its a general purpose go to definition bound by default to `M-.` and popping with `M-,`, just like CIDER navigation. 99 | 100 | Once you've found the code you'd like to look at, instrumenting for debugging is trivial as well. Again, it is the same keybinding as CIDER, `C-u C-M-x`. This looks like a mouthful but my hands do this chord out of instinct: it's just the [prefix argument](https://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html) along with the `eval-defun` command. Just like in CIDER, to de-instrument the function simply re-eval it with `C-M-x` or `eval-defun`. 101 | 102 | Instrumenting code gives you a debugger that's quite extensive. But just remember `n` for next and `c` for continue and you've got perhaps 50% of what you need to get stepping and introspecting and hit `?` for some help. 103 | 104 | ## Running Tests ## 105 | 106 | The testing situation in emacs is not, uhh, the best. But there are a few frameworks in use in emacs and CIDER: 107 | 108 | - [buttercup](https://github.com/jorgenschaefer/emacs-buttercup) 109 | - [cask](https://github.com/cask/cask) 110 | 111 | You'll need to install cask yourself to run the tests reliably. Cask will run emacs headless, make sure that all the dependencies are met, byte compile files and then run your tests for you. The others are assertion libraries for actual tests. Once you have this met, testing is simple as: 112 | 113 | ```shell 114 | cider|master⚡ ⇒ cask install 115 | cider|master⚡ ⇒ make test 116 | 117 | ... 118 | ... 119 | 120 | nrepl--merge 121 | preserves id and session keys of dict1 122 | appends all other keys 123 | dict1 is updated destructively 124 | 125 | Ran 248 specs, 0 failed, in 2.3 seconds. 126 | cider|master⚡ ⇒ 127 | 128 | ``` 129 | 130 | ## Contributing ## 131 | 132 | The above should be enough to get started hacking in CIDER. The issues list always welcomes discussions and questions from new contributors. There's even a bug label [low-hanging fruit](https://github.com/clojure-emacs/cider/labels/low%20hanging%20fruit) to label things as approachable to those who don't know the code-base very well. Feel free to take issues, fix what bugs you, or contribute to discussions about open issues. The chatroom #cider on [slack](https://clojurians.slack.com/) is a place for help and discussion of feature development. 133 | 134 | For pull requests, make sure to follow the following [guidelines](https://github.com/clojure-emacs/cider/blob/master/.github/CONTRIBUTING.md) 135 | -------------------------------------------------------------------------------- /resources/templates/md/posts/2017-04-27-basic-setup-cider-nrepl.md: -------------------------------------------------------------------------------- 1 | {:title "Basic setup of cider-nrepl for hacking" 2 | :layout :post 3 | :tags ["cider-nrepl" "setup" "clojure"] 4 | :toc true} 5 | 6 | ## Installation ## 7 | 8 | Working with cider-nrepl is a little more difficult and a little less straightforward. The best way that I've found with it is to install it in your maven directory. When I'm developing on it, I run the shell command `rm -rf ~/.m2/repository/cider/ && lein install`. 9 | 10 | Cider looks for the version that matches it's own: 11 | 12 | ```emacs-lisp 13 | (defvar cider-jack-in-lein-plugins nil 14 | "List of Leiningen plugins where elements are lists of artifact name and version.") 15 | (put 'cider-jack-in-lein-plugins 'risky-local-variable t) 16 | (cider-add-to-alist 'cider-jack-in-lein-plugins 17 | "cider/cider-nrepl" (upcase cider-version)) 18 | 19 | ``` 20 | 21 | So we just make sure that the cider-nrepl version matches the CIDER version you are working against. If you keep both up to date with the source you should almost never have to worry about this. When CIDER asks for the dependency, it will find your local copy in the maven cache and not fetch a version from clojars. 22 | 23 | ```clojure 24 | (def VERSION "0.15.0-SNAPSHOT") 25 | 26 | (defproject cider/cider-nrepl VERSION 27 | :description "nREPL middlewares for CIDER" 28 | ... ) 29 | 30 | ``` 31 | 32 | More information is found at the [cider docs](https://cider.readthedocs.io/en/latest/hacking_on_cider/#hacking-on-cider-nrepl). 33 | 34 | ## Broad Overview ## 35 | 36 | The middleware lets you define operations on top of what nrepl itself handles. You can define an operation, say which middleware it requires, and then put its implementation. At the bottom of each middleware file is a macro `set-descriptor!` describing which operations the middleware handles and the handler function. So for example, here's the handler function that refreshes namespaces: 37 | 38 | ```clojure 39 | (defn wrap-refresh 40 | "Middleware that provides code reloading." 41 | [handler] 42 | (fn [{:keys [op] :as msg}] 43 | (case op 44 | "refresh" (refresh-reply (assoc msg :scan-fn dir/scan)) 45 | "refresh-all" (refresh-reply (assoc msg :scan-fn dir/scan-all)) 46 | "refresh-clear" (clear-reply msg) 47 | (handler msg)))) 48 | ``` 49 | 50 | As always, consult some documentation at the [nrepl github page.](https://github.com/clojure/tools.nrepl#middleware) 51 | 52 | ## Working In the Codebase ## 53 | 54 | You can jack-in and work with things. The debugger works somewhat as well. Just be prepared to restart emacs or the repl as things get wonky easily. 55 | 56 | I often resort to print statements in the codebase and then install in the maven repository to watch the statements bubble up in CIDER. I wish I had a better solution to this and if anyone does, please do a pull request or your own article about your process. 57 | 58 | ## Testing ## 59 | 60 | In order to run all tests, you need to invoke the tests with profiles, as you can see from the `project.clj`: 61 | 62 | ```clojure 63 | :test-clj {:test-paths ["test/clj"] 64 | :java-source-paths ["test/java"] 65 | :resource-paths ["test/resources"]} 66 | :test-cljs {:test-paths ["test/cljs"] 67 | :dependencies [[com.cemerick/piggieback "0.2.1"] 68 | [org.clojure/clojurescript "1.7.189"]]} 69 | ``` 70 | You can see that the testpaths for the CIDER test runner are extended with profiles. So when jacked-in, you can't easily just `C-c C-t p` to run all tests in project, nor does `lein test` run them all. 71 | 72 | The best way to run the tests would be 73 | 74 | ```shell 75 | cider-nrepl> lein with-profile +test-clj test 76 | cider-nrepl> lein with-profile +test-cljs test 77 | 78 | ``` 79 | I'm not sure I see a benefit of excluding the test-clj test sources from the base profile and the [docs](https://cider.readthedocs.io/en/latest/hacking_on_cider/#testing-the-code_1) even hint that perhaps its time for this to change. 80 | 81 | -------------------------------------------------------------------------------- /resources/templates/md/posts/2017-04-30-eval-walkthrough.md: -------------------------------------------------------------------------------- 1 | {:title "Lifecycle Of a Evaluation" 2 | :layout :post 3 | :tags ["cider" "evaluation" "walkthrough"] 4 | :toc true} 5 | 6 | ## Lifecycle of a request ## 7 | 8 | I wanted to give a broad overview of the lifecycle of an eval request, from invocation to marking completed. As with any code walkthrough, ultimately every guide will elide details as the only true witness of what will happen is the code itself. That being said, I'm trying to thread a fine line of not drowning in details while still giving a fairly technical overview of the eval mechanism of CIDER. 9 | 10 | This is a good system to serve as a walkthrough as this is largely what CIDER is: emacs lisp sending messages to your project code running in clojure code. There are lots of other features but at its core, any repl interaction will be this functionality. A good place to start is the message logging that happens when you invoke `M-x nrepl-toggle-message-logging`. 11 | 12 | ```clojure 13 | (--> 14 | id "16" 15 | op "eval" 16 | session "42da1513-54f2-4a29-b4b1-603d07a18434" 17 | time-stamp "2017-04-30 11:20:56.916993414" 18 | code "(+ 1 2) 19 | " 20 | column 12 21 | file "*cider-repl CLJS cljc-bug*" 22 | line 49 23 | ns "cljs.user" 24 | ) 25 | (<-- 26 | id "16" 27 | session "42da1513-54f2-4a29-b4b1-603d07a18434" 28 | time-stamp "2017-04-30 11:20:56.975191155" 29 | ns "cljs.user" 30 | value "3" 31 | ) 32 | (<-- 33 | id "16" 34 | session "42da1513-54f2-4a29-b4b1-603d07a18434" 35 | time-stamp "2017-04-30 11:20:56.986582000" 36 | status ("done") 37 | ) 38 | (<-- 39 | id "16" 40 | session "42da1513-54f2-4a29-b4b1-603d07a18434" 41 | time-stamp "2017-04-30 11:20:56.987795668" 42 | changed-namespaces (dict) 43 | repl-type "cljs" 44 | status ("state") 45 | ) 46 | ``` 47 | 48 | This post tries to present a fairly technical explanation of these messages and the code that drives evaluation in CIDER. 49 | 50 | ### Outgoing ### 51 | 52 | #### cider-interactive-eval #### 53 | 54 | The code quickly hits [cider-interactive-eval](https://github.com/clojure-emacs/cider/blob/master/cider-interaction.el#L1098). Since we might be eval-ing code in a namespace that has not been loaded yet, [cider--prep-interactive-eval](https://github.com/clojure-emacs/cider/blob/master/cider-interaction.el#L1076)) will make sure that the namespace has been found and evaluated. 55 | 56 | #### asynchronous setup #### 57 | 58 | The communication channel with nrepl is asynchronous using registered callbacks to handle the results of interaction with nrepl. To setup the handler defaults for interactive evaluation, `cider-interactive-eval-handler`. But the real important stuff happens in the [nrepl-make-response-handler](https://github.com/clojure-emacs/cider/blob/master/nrepl-client.el#L737). 59 | 60 | Owing to the asynchronous manner of calling, this makes sure that response handlers clean up after themselves. In particular, from nrepl-make-response-handler: 61 | 62 | ```emacs-lisp 63 | (when (member "done" status) 64 | (nrepl--mark-id-completed id) 65 | (when done-handler 66 | (funcall done-handler buffer))) 67 | ``` 68 | 69 | With this callback constructed, it heads into last legs of the outgoing side where the spinner is started up and the callback modified to stop it as well. 70 | 71 | #### Nrepl encoding and operation #### 72 | 73 | The penultimate step on the outgoing side is to set which operation is to be performed, `("op" "eval")`, and then finally sent it "across". This last bit of code is fairly straightforward in [nrepl-send-request](https://github.com/clojure-emacs/cider/blob/master/nrepl-client.el#L805): 74 | 75 | ```emacs-lisp 76 | (defun nrepl-send-request (request callback connection &optional tooling) 77 | "Send REQUEST and register response handler CALLBACK using CONNECTION. 78 | REQUEST is a pair list of the form (\"op\" \"operation\" \"par1-name\" 79 | \"par1\" ... ). See the code of `nrepl-request:clone', 80 | `nrepl-request:stdin', etc. This expects that the REQUEST does not have a 81 | session already in it. This code will add it as appropriate to prevent 82 | connection/session drift. 83 | Return the ID of the sent message. 84 | Optional argument TOOLING Set to t if desiring the tooling session rather than the standard session." 85 | (with-current-buffer connection 86 | (when-let ((session (if tooling nrepl-tooling-session nrepl-session))) 87 | (setq request (append request `("session" ,session)))) 88 | (let* ((id (nrepl-next-request-id connection)) 89 | (request (cons 'dict (lax-plist-put request "id" id))) 90 | (message (nrepl-bencode request))) 91 | (nrepl-log-message request 'request) 92 | (puthash id callback nrepl-pending-requests) 93 | (process-send-string nil message) 94 | id))) 95 | ``` 96 | 97 | Here the session id is extracted from the connection. Connections keep buffer-local variables for the two sessions, tooling and standard, which is now put into the request. Previously, this session was put into the request at earlier stages, leading to some subtle bugs. An id is generated from the buffer-local `nrepl-request-counter`, and the message is bencoded, the transport format used for communication. The message is logged (if toggled, ie, the first `(-->` form at the top of this post). The callback is registered in `nrepl-pending-requests` and the actual transmission is accomplished with `(process-send-string nil message)`. 98 | 99 | ### Incoming ### 100 | 101 | Emacs runs the jvm as a process. And the communication is by the above `process-send-string` and by [filter functions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Filter-Functions.html) that read the resulting output written to standard out. 102 | 103 | When creating the client process in [nrepl-start-client-process](https://github.com/clojure-emacs/cider/blob/master/nrepl-client.el#L637), several things happen: 104 | 105 | - `:response-q` is created `(process-put client-proc :response-q (nrepl-response-queue))` 106 | - `:string-q` is created 107 | - project-dir is set 108 | - endpoints are set 109 | - hash-table for pending and completed requests are set 110 | - the filter is set on outcoming text from nrepl to handle responses. 111 | 112 | The [nrepl-client-filter](https://github.com/clojure-emacs/cider/blob/master/nrepl-client.el#L467) watches the output and keeps storing it in a variable associated with the process called :string-q (think string queue) to gather incoming strings. This gets moved over into the response queue when the following failsafe test is true: 113 | 114 | ```emacs-lisp 115 | ;; Start decoding only if the last letter is 'e' 116 | (when (eq ?e (aref string (1- (length string)))) 117 | ``` 118 | The letter `e` is a fine marker for the end of encoded input. Once the string has been decoded and put into the response queue, the callbacks are called. `nrepl-response-handler-functions`, which is something set globally at repl creation, and the meat: `(nrepl--dispatch-response response)`. 119 | 120 | ```emacs-lisp 121 | (while (queue-head response-q) 122 | (with-current-buffer (process-buffer proc) 123 | (let ((response (queue-dequeue response-q))) 124 | (with-demoted-errors "Error in one of the `nrepl-response-handler-functions': %s" 125 | (run-hook-with-args 'nrepl-response-handler-functions response)) 126 | (nrepl--dispatch-response response)))) 127 | ``` 128 | 129 | The dispatch response function logs the message, gets the callback and invokes it. The importance of the id is shown here, as this is the key logged into the `nrepl-pending-requests` hashmap and used to invoke the callback later after as the response is received. In our example here, this would write the to the repl, but in general this is just a big case statement: 130 | 131 | ```emacs-lisp 132 | (cond (value 133 | (when value-handler 134 | (funcall value-handler buffer value))) 135 | (out 136 | (when stdout-handler 137 | (funcall stdout-handler buffer out))) 138 | (pprint-out 139 | (cond (pprint-out-handler (funcall pprint-out-handler buffer pprint-out)) 140 | (stdout-handler (funcall stdout-handler buffer pprint-out)))) 141 | (err 142 | (when stderr-handler 143 | (funcall stderr-handler buffer err))) 144 | (status 145 | (when (member "interrupted" status) 146 | (message "Evaluation interrupted.")) 147 | (when (member "eval-error" status) 148 | (funcall (or eval-error-handler nrepl-err-handler))) 149 | (when (member "namespace-not-found" status) 150 | (message "Namespace not found.")) 151 | (when (member "need-input" status) 152 | (cider-need-input buffer)) 153 | (when (member "done" status) 154 | (nrepl--mark-id-completed id) 155 | (when done-handler 156 | (funcall done-handler buffer)))))))) 157 | ``` 158 | 159 | We can again see when the id is marked complete `(nrepl--mark-id-completed id)`. 160 | 161 | The last bit that happens in the lifecycle of a request is the hook that runs from the client-filter: 162 | 163 | ```emacs-lisp 164 | (run-hook-with-args 'nrepl-response-handler-functions response) 165 | ``` 166 | 167 | This serves to invoke the following state handler: 168 | 169 | ```emacs-lisp 170 | (defun cider-repl--state-handler (response) 171 | "Handle the server state contained in RESPONSE. 172 | Currently, this is only used to keep `cider-repl-type' updated." 173 | (with-demoted-errors "Error in `cider-repl--state-handler': %s" 174 | (when (member "state" (nrepl-dict-get response "status")) 175 | (nrepl-dbind-response response (repl-type changed-namespaces) 176 | (when repl-type 177 | (setq cider-repl-type repl-type)) 178 | (unless (nrepl-dict-empty-p changed-namespaces) 179 | (setq cider-repl-ns-cache (nrepl-dict-merge cider-repl-ns-cache changed-namespaces)) 180 | (dolist (b (buffer-list)) 181 | (with-current-buffer b 182 | ;; Metadata changed, so signatures may have changed too. 183 | (setq cider-eldoc-last-symbol nil) 184 | (when (or cider-mode (derived-mode-p 'cider-repl-mode)) 185 | (when-let ((ns-dict (or (nrepl-dict-get changed-namespaces (cider-current-ns)) 186 | (let ((ns-dict (cider-resolve--get-in (cider-current-ns)))) 187 | (when (seq-find (lambda (ns) (nrepl-dict-get changed-namespaces ns)) 188 | (nrepl-dict-get ns-dict "aliases")) 189 | ns-dict))))) 190 | (cider-refresh-dynamic-font-lock ns-dict)))))))))) 191 | ``` 192 | 193 | This is some not very nice code. This watches for the following status messages: 194 | 195 | ```clojure 196 | (<-- 197 | id "16" 198 | session "42da1513-54f2-4a29-b4b1-603d07a18434" 199 | time-stamp "2017-04-30 11:20:56.987795668" 200 | changed-namespaces (dict) 201 | repl-type "cljs" 202 | status ("state") 203 | ) 204 | ``` 205 | 206 | In particular, note the looping over all open buffers **not just clojure buffers** and sets buffer local variables (it hopes) to nil. Further, it's not smart enough to remember its important buffers but uses `cider-mode` and `cider-repl-mode` as markers for important dictionaries of namespaces. These are used to font-lock the relevant buffers with known clojure and project function names, macros, etc. 207 | 208 | The main point of it is to record what the repl type is, `'clj` or `'cljs` as well as font-lock the buffers. 209 | 210 | ## Navigation ## 211 | 212 | Throughout all of this, `xref-find-defintion` and `M-x rgrep` have been invaluable. Getting used to these tools makes navigating CIDER quite easy. 213 | 214 | ## Wrap-up ## 215 | 216 | While its possible that there are some minor mistakes, this cuts quite a swatch across the codebase. the hope is that knowing these mechanics, idioms, and variables gives aid in bug reporting, debugging, and general confidence for newcomers to jump into the codebase. Take a few minutes and navigate through the whole lifecycle. 217 | 218 | -------------------------------------------------------------------------------- /resources/templates/md/posts/2017-05-10-font-lock-bug.md: -------------------------------------------------------------------------------- 1 | {:title "Font Locking Required Namespaces" 2 | :layout :post 3 | :tags ["cider" "bug"] 4 | :toc true} 5 | 6 | ## Description of the bug ## 7 | 8 | This is a walkthrough of what I've done so far to diagnose the bug report for CIDER [bug 1985](https://github.com/clojure-emacs/cider/issues/1985). When we are loading dependencies, external or just other project namespaces, we are losing the font-locking. 9 | 10 | ```clojure 11 | (ns stuff.core 12 | (:require [stuff.other :as other])) 13 | 14 | (other/function :foo) ;; is not font-locked 15 | 16 | ``` 17 | 18 | ## Moving Parts ## 19 | 20 | ### The Handler ### 21 | 22 | The main entry-point for font-locking is in `cider-repl--state-handler`. This watches the nrepl output and when it sees a state message, it inspects it, sets the repl type, watches for new namespaces to cache, and updates the font-locking. CIDER maintains a cache of vars just watching for changes. 23 | 24 | ```emacs-lisp 25 | (defun cider-repl--state-handler (response) 26 | .... 27 | (when-let ((ns-dict (or (nrepl-dict-get changed-namespaces (cider-current-ns)) 28 | (let ((ns-dict (cider-resolve--get-in (cider-current-ns)))) 29 | (when (seq-find (lambda (ns) (nrepl-dict-get changed-namespaces ns)) 30 | (nrepl-dict-get ns-dict "aliases")) 31 | ns-dict))))) 32 | (cider-refresh-dynamic-font-lock ns-dict)))))))))) ;; beginning of the font-locking 33 | ``` 34 | 35 | ### cider-refresh-dynamic-font-lock ### 36 | 37 | This function just grabs the necessary information and compiles the regex that is used by the font-locking mechanism. For our purposes, it has two important parts: gets the symbols to font-lock in `(cider-resolve-ns-symbols ns)` (which notable puts the separator `/`) and then calls emacs font-locking mechanism with the compiled font-lock keywords. 38 | 39 | ```emacs-lisp 40 | (setq-local cider--dynamic-font-lock-keywords 41 | (cider--compile-font-lock-keywords 42 | symbols (cider-resolve-ns-symbols (cider-resolve-core-ns)))) 43 | (font-lock-add-keywords nil cider--dynamic-font-lock-keywords 'end) 44 | ``` 45 | 46 | ### cider--compile-font-lock-keywords ### 47 | 48 | Oddly enough, this function seemingly works correctly. I modified this function so that it does less work and is easier to step through so we can investigate what is going on. 49 | 50 | (defun cider--compile-font-lock-keywords (symbols-plist core-plist) 51 | "Return a list of font-lock rules for the symbols in SYMBOLS-PLIST and CORE-PLIST." 52 | (let ((cider-font-lock-dynamically ;; (if (eq cider-font-lock-dynamically t) 53 | ;; '(function var macro core deprecated) 54 | ;; cider-font-lock-dynamically) 55 | '(function) 56 | ) 57 | deprecated enlightened 58 | macros functions vars instrumented traced) 59 | (cl-labels ((handle-plist 60 | (plist) 61 | (let ((do-function (memq 'function cider-font-lock-dynamically)) 62 | (do-var (memq 'var cider-font-lock-dynamically)) 63 | (do-macro (memq 'macro cider-font-lock-dynamically)) 64 | (do-deprecated (memq 'deprecated cider-font-lock-dynamically))) 65 | (while plist 66 | (let ((sym (pop plist)) 67 | (meta (pop plist))) 68 | ;; (pcase (nrepl-dict-get meta "cider.nrepl.middleware.util.instrument/breakfunction") 69 | ;; (`nil nil) 70 | ;; (`"#'cider.nrepl.middleware.debug/breakpoint-if-interesting" 71 | ;; (push sym instrumented)) 72 | ;; (`"#'cider.nrepl.middleware.enlighten/light-form" 73 | ;; (push sym enlightened))) 74 | ;; ;; The ::traced keywords can be inlined by MrAnderson, so 75 | ;; ;; we catch that case too. 76 | ;; ;; FIXME: This matches values too, not just keys. 77 | ;; (when (seq-find (lambda (k) (and (stringp k) 78 | ;; (string-match (rx "clojure.tools.trace/traced" eos) k))) 79 | ;; meta) 80 | ;; (push sym traced)) 81 | ;; (when (and do-deprecated (nrepl-dict-get meta "deprecated")) 82 | ;; (push sym deprecated)) 83 | (cond ((and do-macro (nrepl-dict-get meta "macro")) 84 | (push sym macros)) 85 | ((and do-function (nrepl-dict-get meta "arglists")) 86 | (push sym functions)) 87 | (do-var (push sym vars)))))))) 88 | (when (memq 'core cider-font-lock-dynamically) 89 | (let ((cider-font-lock-dynamically '(function var macro core deprecated))) 90 | (handle-plist core-plist))) 91 | (handle-plist symbols-plist)) 92 | `( 93 | ,@(when macros 94 | `((,(concat (rx (or "(" "#'")) ; Can't take the value of macros. 95 | "\\(" (regexp-opt macros 'symbols) "\\)") 96 | 1 (cider--unless-local-match font-lock-keyword-face)))) 97 | ,@(when functions 98 | `((,(regexp-opt functions 'symbols) 0 99 | (cider--unless-local-match font-lock-function-name-face)))) 100 | ;; ,@(when vars 101 | ;; `((,(regexp-opt vars 'symbols) 0 102 | ;; (cider--unless-local-match font-lock-variable-name-face)))) 103 | ;; ,@(when deprecated 104 | ;; `((,(regexp-opt deprecated 'symbols) 0 105 | ;; (cider--unless-local-match 'cider-deprecated-face) append))) 106 | ;; ,@(when enlightened 107 | ;; `((,(regexp-opt enlightened 'symbols) 0 108 | ;; (cider--unless-local-match 'cider-enlightened-face) append))) 109 | ;; ,@(when instrumented 110 | ;; `((,(regexp-opt instrumented 'symbols) 0 111 | ;; (cider--unless-local-match 'cider-instrumented-face) append))) 112 | ;; ,@(when traced 113 | ;; `((,(regexp-opt traced 'symbols) 0 114 | ;; (cider--unless-local-match 'cider-traced-face) append))) 115 | ))) 116 | 117 | You can see the way that font locking is divided up: `(function var macro core deprecated)` We only want to investigate functions so we set it to that. This also prevents the core from being font-locked as well, as this will make the result quite large. There are several accumulators setup for macros, deprecated, vars, etc. The important bit for this here is 118 | 119 | ```emacs-lisp 120 | ((and do-function (nrepl-dict-get meta "arglists")) 121 | (push sym functions)) 122 | ``` 123 | 124 | So there's the secret sauce for font-locking: it looks for arglists metadata. If so, you get font-locked. Since we've commented out so much of the function, I instrument it so we can step through it and watch for any bad information. The plist we are working through looks like this: 125 | 126 | ```emacs-lisp 127 | (foo (dict arglists ([x]) doc "I don't do a whole lot.") uses-import (dict arglists ([x])) i/bar (dict arglists ([x]))) 128 | ``` 129 | 130 | If you visit the nrepl-dict files, you'll find out that a cider dictionary is a list with the first term of `dict`. Owing to grabbing this from string methosd, some quotation marks are missing but basically this is a plist of term to dictionary: `"foo"` has a dictionary of arglists and doc. Since we are looking for arglists, all three of these functions qualify. The `regex-opt` function will compile that down into this beauty: 131 | 132 | ```emacs-lisp 133 | (("\\_<\\(foo\\|i/bar\\|uses-import\\)\\_>" 0 134 | (cider--unless-local-match font-lock-function-name-face))) 135 | ``` 136 | Earlier when I said that it was working out, this is my evidence. That regex includes `i/bar` in it. The best I can think of is that emacs internal stuff requires some extra escaping, but it doesn't really make sense. To make matters _more_ confusing, you can edit the separator and then it will work. For example, in `cider-resolve-ns-symbols`, you can see where the separator is introduced when you map over the ns cache aliases: 137 | 138 | ```emacs-lisp 139 | (nrepl-dict-flat-map (lambda (sym meta) 140 | (list (concat alias "/" sym) meta)) 141 | (cider-resolve--get-in namespace "interns")) 142 | ``` 143 | 144 | So if you turn that slash into `*` and change the separator you use in your code, your code won't compile but it _will_ font-lock. I have no idea and I'm just hoping that if anyone wants to pick up this thread this can help them along the way. 145 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/css/screen.css: -------------------------------------------------------------------------------- 1 | h1, h2, h3, h4, h5, h6 { 2 | font-family: 'Alegreya'; 3 | } 4 | 5 | body { 6 | color: #333; 7 | background-color: #f2f2f2; 8 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 9 | font-size: 16px; 10 | } 11 | 12 | .container { 13 | max-width: 1000px; 14 | } 15 | 16 | .right { 17 | float: right; 18 | text-align: right; 19 | } 20 | 21 | .navbar { 22 | border-radius: 0; 23 | box-shadow: 0 0 0 0,0 6px 12px rgba(34,34,34,0.3); 24 | } 25 | 26 | .navbar-default { 27 | background-color: #428bca; 28 | border: none; 29 | } 30 | 31 | .navbar-default .navbar-brand { 32 | color: #fff; 33 | font-family: 'Alegreya'; 34 | } 35 | 36 | .navbar-default .navbar-brand:hover { 37 | color: #fff; 38 | } 39 | 40 | .navbar-default .navbar-nav li a { 41 | color: #fff; 42 | } 43 | 44 | .navbar-default .navbar-nav li a:hover { 45 | color: #fff; 46 | background-color: #3d80ba; 47 | } 48 | 49 | .navbar-default .navbar-nav .active a { 50 | color: #fff; 51 | background-color: #3d80ba; 52 | } 53 | 54 | .navbar-default .navbar-toggle:hover{ 55 | background-color: #3d80ba; 56 | } 57 | 58 | .navbar-default .navbar-toggle .icon-bar { 59 | background-color: #fff; 60 | } 61 | 62 | #sidebar { 63 | margin-left: 15px; 64 | margin-top: 50px; 65 | } 66 | 67 | #content { 68 | background-color: #fff; 69 | border-radius: 3px; 70 | box-shadow: 0 0 0 0,0 6px 12px rgba(34,34,34,0.1); 71 | } 72 | 73 | #content img { 74 | max-width: 100%; 75 | height: auto; 76 | } 77 | 78 | footer { 79 | font-size: 14px; 80 | text-align: center; 81 | padding-top: 75px; 82 | padding-bottom: 30px; 83 | } 84 | 85 | #post-tags { 86 | margin-top: 30px; 87 | } 88 | 89 | #prev-next { 90 | padding: 15px 0; 91 | } 92 | 93 | .post-header { 94 | margin-bottom: 20px; 95 | } 96 | .post-header h2 { 97 | font-size: 32px; 98 | } 99 | 100 | #post-meta { 101 | font-size: 14px; 102 | color: rgba(0,0,0,0.4) 103 | } 104 | 105 | #page-header { 106 | border-bottom: 1px solid #dbdbdb; 107 | margin-bottom: 20px; 108 | } 109 | #page-header h2 { 110 | font-size: 32px; 111 | } 112 | 113 | pre { 114 | overflow-x: auto; 115 | } 116 | pre code { 117 | display: block; 118 | padding: 0.5em; 119 | overflow-wrap: normal; 120 | white-space: pre; 121 | } 122 | 123 | code { 124 | color: #428bca; 125 | } 126 | 127 | pre, code, .hljs { 128 | background-color: #f7f9fd; 129 | } 130 | 131 | @media (min-width: 768px) { 132 | .navbar { 133 | min-height: 70px; 134 | } 135 | .navbar-nav>li>a { 136 | padding: 30px 20px; 137 | } 138 | .navbar-default .navbar-brand { 139 | font-size: 36px; 140 | padding: 25px 15px; 141 | } 142 | #content{ 143 | margin-top: 30px; 144 | padding: 30px 40px; 145 | } 146 | } 147 | 148 | @media (max-width: 767px) { 149 | body{ 150 | font-size: 14px; 151 | } 152 | .navbar-default .navbar-brand { 153 | font-size: 30px; 154 | } 155 | #content{ 156 | padding: 15px; 157 | } 158 | #post-meta .right { 159 | float:left; 160 | text-align: left; 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | 30 |
31 |
32 |
33 |

404

34 |

Error ! Page Not Found

35 |
36 |
37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/archives.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Archives{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% for group in groups %} 9 |

{{group.group}}

10 | 17 | {% endfor %} 18 | 19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/author.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts by {{author}} {% endblock %} 3 | {% block content %} 4 |
5 |
6 |

Posts by {{author}}

7 |
8 | {% for group in groups %} 9 |

{{group.group}}

10 | 17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}}{% block subtitle %}{% endblock %} 6 | 7 | 8 | 10 | 11 | 12 | 13 | {% style "css/screen.css" %} 14 | 15 | 16 | 17 | 18 | 45 | 46 | 47 |
48 | 49 | 50 |
51 |
52 |
53 | {% block content %} 54 | {% endblock %} 55 |
56 |
57 | 58 |
59 | 90 |
91 |
92 | 94 |
95 | 96 | 97 | {% script "js/highlight.pack.js" %} 98 | 99 | {% if post.klipse %} {{post.klipse|safe}} {% endif %} 100 | {% if page.klipse %} {{page.klipse|safe}} {% endif %} 101 | 102 | 103 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/home.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% include "/html/post-content.html" %} 5 | {% if disqus? %} 6 |
7 | View Comments 8 |
9 | {% endif %} 10 | 11 |
12 | {% if post.prev %} 13 | « {{post.prev.title}} 14 | {% endif %} 15 | {% if post.next %} 16 | {{post.next.title}} » 17 | {% endif %} 18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/page.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{page.title}}{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% if page.toc %}{{page.toc|safe}}{% endif %} 9 | {{page.content|safe}} 10 | 11 |
12 | {% if page.prev %} 13 | « {{page.prev.title}} 14 | {% endif %} 15 | {% if all page.prev page.next %} 16 | || 17 | {% endif %} 18 | {% if page.next %} 19 | {{page.next.title}} » 20 | {% endif %} 21 |
22 |
23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/post-content.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
{{post.date|date:longDate}}
4 | {% if post.author %} 5 | By: {{post.author}} 6 | {% endif %} 7 |
8 |

{{post.title}}

9 |
10 |
11 | {% if post.toc %}{{post.toc|safe}}{% endif %} 12 | {{post.content|safe}} 13 |
14 | {% if post.tags|not-empty %} 15 |
16 | Tags: 17 | {% for tag in post.tags %} 18 | {{tag.name}} 19 | {% endfor %} 20 |
21 | {% endif %} 22 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/post.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{post.title}}{% endblock %} 3 | {% block content %} 4 |
5 | {% include "/html/post-content.html" %} 6 |
7 | {% if post.prev %} 8 | « {{post.prev.title}} 9 | {% endif %} 10 | {% if post.next %} 11 | {{post.next.title}} » 12 | {% endif %} 13 |
14 | 15 | {% if disqus-shortname %} 16 |
17 | 28 | {% endif %} 29 | 30 | 31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/previews.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% for post in posts %} 5 |
6 |

{{post.title}}

7 |
8 | {% if post.author %} 9 |
{{post.author}}
10 | {% endif %} 11 |
{{post.date|date:longDate}}
12 |
13 |
14 | {{post.content|safe}} 15 | Continue reading → 16 |
17 | {% endfor %} 18 | 19 |
20 | {% if prev-uri %} 21 | « Prev 22 | {% endif %} 23 | {% if next-uri %} 24 | Next » 25 | {% endif %} 26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/tag.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts Tagged "{{name}}"{% endblock %} 3 | {% block content %} 4 |
5 | 8 | 15 |
16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/html/tags.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Tags{% endblock %} 3 | {% block content %} 4 |
5 | 8 | 9 | 14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /resources/templates/themes/blue/js/highlight.pack.js: -------------------------------------------------------------------------------- 1 | /*! highlight.js v9.7.0 | BSD3 License | git.io/hljslicense */ 2 | !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){l+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"
":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},t=e.inherit(r,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},n=e.inherit(a,{i:/\n/}),c={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,n]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},n]});a.c=[s,c,r,e.ASM,e.QSM,e.CNM,e.CBCM],n.c=[o,c,t,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,c,r,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",w="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",u=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+w+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(u).concat(d)}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("clojure",function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",o={b:n,r:0},s={cN:"number",b:a,r:0},i=e.inherit(e.QSM,{i:null}),c=e.C(";","$",{r:0}),d={cN:"literal",b:/\b(true|false|nil)\b/},l={b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+n},p=e.C("\\^\\{","\\}"),u={cN:"symbol",b:"[:]{1,2}"+n},f={b:"\\(",e:"\\)"},h={eW:!0,r:0},y={k:t,l:n,cN:"name",b:n,starts:h},b=[f,i,m,p,c,u,l,s,d,o];return f.c=[e.C("comment",""),y,h],h.c=b,l.c=b,{aliases:["clj"],i:/\S/,c:[f,i,m,p,c,u,l,s,d]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("java",function(e){var t=e.UIR+"(<"+e.UIR+"(\\s*,\\s*"+e.UIR+")*>)?",a="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",s={cN:"number",b:r,r:0};return{aliases:["jsp"],k:a,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},s,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}); -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/css/screen.css: -------------------------------------------------------------------------------- 1 | h1, h2, h3, h4, h5, h6 { 2 | font-family: 'Alegreya'; 3 | } 4 | 5 | body { 6 | color: #333; 7 | background-color: #f2f2f2; 8 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 9 | font-size: 16px; 10 | } 11 | 12 | .container { 13 | max-width: 1000px; 14 | } 15 | 16 | .right { 17 | float: right; 18 | text-align: right; 19 | } 20 | 21 | .navbar { 22 | border-radius: 0; 23 | box-shadow: 0 0 0 0,0 6px 12px rgba(34,34,34,0.1); 24 | } 25 | 26 | .navbar-default { 27 | background-color: #428bca; 28 | border: none; 29 | } 30 | 31 | .navbar-default .navbar-brand { 32 | color: #fff; 33 | font-family: 'Alegreya'; 34 | } 35 | 36 | .navbar-default .navbar-brand:hover { 37 | color: #fff; 38 | } 39 | 40 | .navbar-default .navbar-nav li a { 41 | color: #fff; 42 | } 43 | 44 | .navbar-default .navbar-nav li a:hover { 45 | color: #fff; 46 | background-color: #3d80ba; 47 | } 48 | 49 | .navbar-default .navbar-nav .active a { 50 | color: #fff; 51 | background-color: #3d80ba; 52 | } 53 | 54 | .navbar-default .navbar-toggle:hover{ 55 | background-color: #3d80ba; 56 | } 57 | 58 | .navbar-default .navbar-toggle .icon-bar { 59 | background-color: #fff; 60 | } 61 | 62 | .dropdown-menu { 63 | background-color: #428bca; 64 | } 65 | 66 | .dropdown-header { 67 | color: #fff; 68 | font-size: 15px; 69 | font-weight: 600; 70 | padding-left :10px; 71 | } 72 | .dropdown-menu li a { 73 | color: #fff; 74 | } 75 | 76 | .navbar-default .navbar-nav .open a:hover, 77 | .navbar-default .navbar-nav .open a:focus, 78 | .navbar-default .navbar-nav>li>a:hover, 79 | .navbar-default .navbar-nav>li>a:focus { 80 | background-color: #3d80ba; 81 | color: #fff; 82 | } 83 | 84 | #content { 85 | background-color: #fff; 86 | border-radius: 3px; 87 | box-shadow: 0 0 0 0,0 6px 12px rgba(34,34,34,0.1); 88 | } 89 | 90 | #content img { 91 | max-width: 100%; 92 | height: auto; 93 | } 94 | 95 | footer { 96 | font-size: 14px; 97 | text-align: center; 98 | padding-top: 75px; 99 | padding-bottom: 30px; 100 | } 101 | 102 | #post-tags { 103 | margin-top: 30px; 104 | } 105 | 106 | #prev-next { 107 | padding: 15px 0; 108 | } 109 | 110 | .post-header { 111 | margin-bottom: 20px; 112 | } 113 | .post-header h2 { 114 | font-size: 32px; 115 | } 116 | 117 | #post-meta { 118 | font-size: 14px; 119 | color: rgba(0,0,0,0.4) 120 | } 121 | 122 | #page-header { 123 | border-bottom: 1px solid #dbdbdb; 124 | margin-bottom: 20px; 125 | } 126 | #page-header h2 { 127 | font-size: 32px; 128 | } 129 | 130 | pre { 131 | overflow-x: auto; 132 | } 133 | pre code { 134 | display: block; 135 | padding: 0.5em; 136 | overflow-wrap: normal; 137 | white-space: pre; 138 | } 139 | 140 | code { 141 | color: #428bca; 142 | } 143 | 144 | pre, code, .hljs { 145 | background-color: #f7f9fd; 146 | } 147 | 148 | @media (min-width: 768px) { 149 | .navbar { 150 | min-height: 70px; 151 | } 152 | .dropdown-menu>li>a { 153 | padding: 3px 20px; 154 | } 155 | .navbar-nav>li>a { 156 | padding: 30px 20px; 157 | } 158 | .navbar-default .navbar-brand { 159 | font-size: 36px; 160 | padding: 25px 15px; 161 | } 162 | #content{ 163 | margin-top: 30px; 164 | padding: 50px 75px; 165 | } 166 | } 167 | 168 | @media (max-width: 767px) { 169 | body{ 170 | font-size: 14px; 171 | } 172 | .navbar-default .navbar-brand { 173 | font-size: 30px; 174 | } 175 | #content{ 176 | padding: 15px; 177 | } 178 | #post-meta .right { 179 | float:left; 180 | text-align: left; 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | 30 |
31 |
32 |
33 |

404

34 |

Error ! Page Not Found

35 |
36 |
37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/archives.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Archives{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% for group in groups %} 9 |

{{group.group}}

10 |
    11 | {% for post in group.posts %} 12 |
  • 13 | {{post.date|date:"MMM dd"}} - {{post.title}} 14 |
  • 15 | {% endfor %} 16 |
17 | {% endfor %} 18 | 19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/author.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts by {{author}} {% endblock %} 3 | {% block content %} 4 |
5 |
6 |

Posts by {{author}}

7 |
8 | {% for group in groups %} 9 |

{{group.group}}

10 |
    11 | {% for post in group.posts %} 12 |
  • 13 | {{post.date|date:"MMM dd"}} - {{post.title}} 14 |
  • 15 | {% endfor %} 16 |
17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}}{% block subtitle %}{% endblock %} 6 | 7 | 8 | 10 | 11 | 12 | 13 | {% style "css/screen.css" %} 14 | 15 | 16 | 17 | 18 | 73 | 74 | 75 |
76 | 77 | 78 |
79 |
80 |
81 | {% block content %} 82 | {% endblock %} 83 |
84 |
85 |
86 |
Copyright © {{today|date:yyyy}} {{author}} 87 |

Powered by Cryogen

88 |
89 | 90 | 91 | {% script "js/highlight.pack.js" %} 92 | 93 | {% if post.klipse %} {{post.klipse|safe}} {% endif %} 94 | {% if page.klipse %} {{page.klipse|safe}} {% endif %} 95 | 96 | 97 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/home.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% include "/html/post-content.html" %} 5 | {% if disqus? %} 6 |
7 | View Comments 8 |
9 | {% endif %} 10 | 11 |
12 | {% if post.prev %} 13 | « {{post.prev.title}} 14 | {% endif %} 15 | {% if post.next %} 16 | {{post.next.title}} » 17 | {% endif %} 18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/page.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{page.title}}{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% if page.toc %}{{page.toc|safe}}{% endif %} 9 | {{page.content|safe}} 10 | 11 |
12 | {% if page.prev %} 13 | « {{page.prev.title}} 14 | {% endif %} 15 | {% if all page.prev page.next %} 16 | || 17 | {% endif %} 18 | {% if page.next %} 19 | {{page.next.title}} » 20 | {% endif %} 21 |
22 |
23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/post-content.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
{{post.date|date:longDate}}
4 | {% if post.author %} 5 | By: {{post.author}} 6 | {% endif %} 7 |
8 |

{{post.title}}

9 |
10 |
11 | {% if post.toc %}{{post.toc|safe}}{% endif %} 12 | {{post.content|safe}} 13 |
14 | {% if post.tags|not-empty %} 15 |
16 | Tags: 17 | {% for tag in post.tags %} 18 | {{tag.name}} 19 | {% endfor %} 20 |
21 | {% endif %} 22 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/post.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{post.title}}{% endblock %} 3 | {% block content %} 4 |
5 | {% include "/html/post-content.html" %} 6 |
7 | {% if post.prev %} 8 | « {{post.prev.title}} 9 | {% endif %} 10 | {% if post.next %} 11 | {{post.next.title}} » 12 | {% endif %} 13 |
14 | 15 | {% if disqus-shortname %} 16 |
17 | 28 | {% endif %} 29 | 30 | 31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/previews.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% for post in posts %} 5 |
6 |

{{post.title}}

7 |
8 | {% if post.author %} 9 |
{{post.author}}
10 | {% endif %} 11 |
{{post.date|date:longDate}}
12 |
13 |
14 | {{post.content|safe}} 15 | Continue reading → 16 |
17 | {% endfor %} 18 | 19 |
20 | {% if prev-uri %} 21 | « Prev 22 | {% endif %} 23 | {% if next-uri %} 24 | Next » 25 | {% endif %} 26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/tag.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts Tagged "{{name}}"{% endblock %} 3 | {% block content %} 4 |
5 | 8 |
    9 | {% for post in posts %} 10 |
  • 11 | {{post.title}} 12 |
  • 13 | {% endfor %} 14 |
15 |
16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /resources/templates/themes/blue_centered/html/tags.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Tags{% endblock %} 3 | {% block content %} 4 |
5 | 8 | 9 |
    10 | {% for tag in tags %} 11 |
  • {{tag.name}}
  • 12 | {% endfor %} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/css/buttons.css: -------------------------------------------------------------------------------- 1 | .button { 2 | position: relative; 3 | display: inline-block; 4 | padding: 7px 12px; 5 | margin: 0; 6 | width: auto; 7 | font-family: "Montserrat"; 8 | font-size: 16px; 9 | text-transform: uppercase; 10 | font-weight: 400; 11 | cursor: pointer; 12 | background: none; 13 | border: none; 14 | outline: none; 15 | text-align: left; 16 | letter-spacing: 2px; 17 | } 18 | 19 | .button.fullbutton { 20 | width: 100%; 21 | } 22 | 23 | .button.fullbutton span { 24 | float: right; 25 | } 26 | 27 | .button:after { 28 | content: ''; 29 | position: absolute; 30 | z-index: -1; 31 | } 32 | 33 | /** Colours **/ 34 | 35 | .button { 36 | background: none; 37 | border: 2px solid #A71E2E; 38 | color: #A71E2E !important; 39 | } 40 | 41 | .button:hover { 42 | background: #A71E2E; 43 | color: #FFF !important; 44 | } 45 | 46 | .button:active { 47 | top: 2px; 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/css/menu.css: -------------------------------------------------------------------------------- 1 | /** Menu Styles **/ 2 | 3 | #menucont ul.menu { 4 | margin: 0; 5 | } 6 | 7 | #menucont ul.menu li { 8 | position: relative; 9 | float: left; 10 | width: 100%; 11 | list-style-type: none; 12 | padding: 0; 13 | } 14 | 15 | #menucont ul.menu li a { 16 | float: left; 17 | color: #FFF; 18 | width: 100%; 19 | padding: 10px 20px; 20 | margin: 0; 21 | font-weight: 300; 22 | text-transform: uppercase; 23 | line-height: 22px; 24 | text-decoration: none; 25 | letter-spacing: 2px; 26 | } 27 | 28 | #menucont ul.menu li a:hover { 29 | background: rgba(0, 0, 0, 0.2); 30 | } 31 | 32 | #menucont ul.menu li.active a, 33 | #menucont ul.menu li.active a:hover { 34 | background: rgba(0, 0, 0, 0.2); 35 | font-weight: 600; 36 | } 37 | 38 | #menucont .menutitle { 39 | display: none; 40 | } 41 | 42 | @media screen and (max-width: 480px) { 43 | 44 | #menucont .menu { 45 | display: none; 46 | margin: 0; 47 | } 48 | 49 | #menucont .menu.open { 50 | display: block; 51 | } 52 | 53 | #menucont ul.menu li { 54 | position: relative; 55 | float: none; 56 | } 57 | 58 | #menucont ul.menu li, #menucont ul.menu ul li { 59 | display: block; 60 | } 61 | 62 | #menucont ul.menu li a { 63 | width: 100%; 64 | display: inline-block; 65 | margin: 0; 66 | padding: 5px 0; 67 | text-indent: 0; 68 | line-height: 23px; 69 | color: rgba(255, 255, 255, 0.6); 70 | background: none; 71 | font-weight: 300; 72 | text-transform: uppercase; 73 | } 74 | 75 | #menucont ul.menu li.active a, 76 | #menucont ul.menu li.active a:hover { 77 | font-weight: 600; 78 | color: #FFF; 79 | background: none; 80 | } 81 | 82 | #menucont ul.menu li a:hover { 83 | color: #FFF; 84 | background: none; 85 | } 86 | 87 | #menucont ul.menu > li:last-child a { 88 | margin: 0 0 20px 0; 89 | } 90 | 91 | #menucont .menutitle { 92 | display: block; 93 | width: 100%; 94 | padding: 12px 42px 12px 0; 95 | display: block; 96 | cursor: pointer; 97 | text-align: left; 98 | color: #FFF; 99 | text-transform: uppercase; 100 | } 101 | 102 | #menucont .menutitle p { 103 | margin-bottom: 0; 104 | } 105 | 106 | #menucont .menutitle p strong { 107 | margin: 0 0 0 15px; 108 | font-size: 18px; 109 | font-weight: 300; 110 | letter-spacing: 2px; 111 | } 112 | 113 | #menucont .menutitle span { 114 | margin: 0; 115 | font-size: 20px; 116 | } 117 | 118 | } 119 | 120 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) 2 | Removed code from first reset list since it conflics with highlight.js. 3 | */ 4 | 5 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, 6 | a, abbr, acronym, address, big, cite, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, 7 | table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { 8 | margin: 0; 9 | padding: 0; 10 | border: 0; 11 | font-size: 100%; 12 | font: inherit; 13 | vertical-align: baseline; 14 | } 15 | 16 | /* HTML5 display-role reset for older browsers */ 17 | 18 | article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { 19 | display: block; 20 | } 21 | 22 | body { 23 | line-height: 1; 24 | } 25 | 26 | ol, ul { 27 | list-style: none; 28 | } 29 | 30 | blockquote, q { 31 | quotes: none; 32 | } 33 | 34 | blockquote:before, blockquote:after, q:before, q:after { 35 | content: ''; 36 | content: none; 37 | } 38 | 39 | table { 40 | border-collapse: collapse; 41 | border-spacing: 0; 42 | } 43 | 44 | /* Clear Fix Styles */ 45 | 46 | .clearfix:after { 47 | visibility: hidden; 48 | display: block; 49 | font-size: 0; 50 | content: " "; 51 | clear: both; 52 | height: 0; 53 | } 54 | 55 | .clearfix { 56 | display: inline-block; 57 | } 58 | 59 | /* start commented backslash hack \*/ 60 | * html .clearfix { 61 | height: 1%; 62 | } 63 | 64 | .clearfix { 65 | display: block; 66 | } 67 | 68 | /* close commented backslash hack */ 69 | { 70 | height: 1% 71 | ; 72 | } 73 | 74 | .clearfix { 75 | display: block; 76 | } 77 | 78 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/css/style.css: -------------------------------------------------------------------------------- 1 | /* ================================================== 2 | CSS Imports 3 | ================================================== */ 4 | @import url("reset.css"); 5 | @import url("typography.css"); 6 | @import url("menu.css"); 7 | @import url("buttons.css"); 8 | /* ================================================== 9 | Google Fonts 10 | ================================================== */ 11 | @import url("http://fonts.googleapis.com/css?family=Oxygen:300,400,700"); 12 | @import url("http://fonts.googleapis.com/css?family=Montserrat:400,700"); 13 | 14 | /* ================================================== 15 | Global Styles 16 | ================================================== */ 17 | 18 | * { 19 | -webkit-box-sizing: border-box; 20 | -moz-box-sizing: border-box; 21 | box-sizing: border-box; 22 | } 23 | 24 | pre code{ 25 | display: block; 26 | overflow-x: auto; 27 | background: #2d2d2d; 28 | color: #cccccc; 29 | padding: 0.5em; 30 | } 31 | 32 | html { 33 | height: 100%; 34 | overflow: auto; 35 | 36 | -webkit-font-smoothing: antialiased; 37 | -webkit-text-size-adjust: 100%; 38 | -ms-text-size-adjust: 100%; 39 | } 40 | 41 | body { 42 | font-family: "Oxygen", Arial, Verdana, Helvetica, sans-serif; 43 | font-size: 15px; 44 | color: #555; 45 | font-weight: 400; 46 | line-height: 28px; 47 | background: #FFF; 48 | 49 | text-rendering: optimizeLegibility; 50 | vertical-align: baseline; 51 | } 52 | 53 | ::selection { 54 | background: #A71E2E; 55 | color: #FFF; 56 | } 57 | 58 | ::-moz-selection { 59 | background: #A71E2E; 60 | color: #FFF; 61 | } 62 | 63 | a { 64 | color: #A71E2E; 65 | text-decoration: none; 66 | } 67 | 68 | a:hover { 69 | color: #222; 70 | } 71 | 72 | /* ================================================== 73 | Images 74 | ================================================== */ 75 | 76 | img { 77 | -webkit-backface-visibility: hidden; 78 | -moz-backface-visibility: hidden; 79 | -ms-backface-visibility: hidden; 80 | } 81 | 82 | img.imgfull { 83 | float: left; 84 | width: 100%; 85 | max-width: 1000px; 86 | margin: 0 0 20px 0; 87 | border-top: 5px solid #A71E2E; 88 | } 89 | 90 | /* ================================================== 91 | Layout Styles 92 | ================================================== */ 93 | 94 | .container { 95 | position: relative; 96 | z-index: 2; 97 | width: 100%; 98 | padding: 0 30px; 99 | min-width: 280px; 100 | line-height: 26px; 101 | } 102 | 103 | .container .bodycontainer { 104 | margin: 0 auto; 105 | width: 100%; 106 | max-width: 1000px; 107 | } 108 | 109 | /* ================================================== 110 | Sections 111 | ================================================== */ 112 | 113 | #left { 114 | position: fixed; 115 | top: 0; 116 | left: 0; 117 | bottom: 0; 118 | width: 100%; 119 | max-width: 280px; 120 | background: #A71E2E; 121 | color: #FFF; 122 | z-index: 3; 123 | overflow-y: auto; 124 | 125 | -webkit-overflow-scrolling: touch; 126 | } 127 | 128 | #left p#logo { 129 | margin: 0 0 20px 0; 130 | } 131 | 132 | #left p#logo a { 133 | float: left; 134 | display: block; 135 | padding: 30px 20px; 136 | width: 100%; 137 | color: #FFF; 138 | margin: 0 0 20px 0; 139 | } 140 | 141 | #left p#logo a span.fa { 142 | float: left; 143 | display: block; 144 | padding: 25px; 145 | background: rgba(0, 0, 0, 0.2); 146 | font-size: 48px; 147 | margin: 0 0 10px 0; 148 | 149 | -webkit-border-radius: 80px; 150 | -moz-border-radius: 80px; 151 | border-radius: 80px; 152 | } 153 | 154 | #left p#logo a span.text { 155 | float: left; 156 | width: 100%; 157 | font-size: 30px; 158 | line-height: 30px; 159 | font-weight: 700; 160 | font-family: "Montserrat"; 161 | text-transform: uppercase; 162 | } 163 | 164 | #left #socialmedia ul { 165 | position: absolute; 166 | bottom: 30px; 167 | left: 30px; 168 | margin: 0; 169 | } 170 | 171 | #left #socialmedia ul li { 172 | display: inline-block; 173 | list-style-type: none; 174 | margin: 0 12px 0 0; 175 | padding: 0; 176 | } 177 | 178 | #left #socialmedia ul li a { 179 | font-size: 23px; 180 | color: #FFF; 181 | opacity: 0.4; 182 | } 183 | 184 | #left #socialmedia ul li a:hover { 185 | opacity: 1; 186 | } 187 | 188 | #right { 189 | position: absolute; 190 | top: 0; 191 | left: 0; 192 | width: 100%; 193 | max-width: 1240px; 194 | z-index: 2; 195 | padding: 40px 50px 40px 320px; 196 | } 197 | 198 | #right p { 199 | margin: 0 0 20px 0; 200 | } 201 | 202 | #right p:last-child { 203 | margin: 0; 204 | } 205 | 206 | #footercont { 207 | color: rgba(0, 0, 0, 0.4); 208 | text-transform: uppercase; 209 | font-size: 14px; 210 | } 211 | 212 | #footercont p { 213 | margin: 0; 214 | text-align: left; 215 | letter-spacing: 1.4px; 216 | } 217 | 218 | /* ================================================== 219 | Responsive Media Queries - Tablets 220 | ================================================== */ 221 | 222 | @media screen and (max-width: 768px) { 223 | 224 | #left { 225 | max-width: 200px; 226 | } 227 | 228 | #left #socialmedia ul { 229 | bottom: 20px; 230 | left: 20px; 231 | } 232 | 233 | #left #socialmedia ul li { 234 | margin: 0 8px 0 0; 235 | } 236 | 237 | #left #socialmedia ul li a { 238 | font-size: 21px; 239 | } 240 | 241 | #right { 242 | padding: 20px 20px 20px 230px; 243 | } 244 | 245 | } 246 | 247 | /* ================================================== 248 | Responsive Media Queries - Mobiles 249 | ================================================== */ 250 | 251 | @media screen and (max-width: 480px) { 252 | 253 | #left { 254 | position: relative; 255 | top: 0; 256 | left: 0; 257 | width: 100%; 258 | max-width: 100%; 259 | padding: 20px; 260 | } 261 | 262 | #left p#logo a { 263 | padding: 0; 264 | } 265 | 266 | #left #socialmedia ul { 267 | position: relative; 268 | bottom: auto; 269 | left: auto; 270 | margin: 5px 0 0 0; 271 | } 272 | 273 | #left #socialmedia ul li a { 274 | font-size: 25px; 275 | } 276 | 277 | #right { 278 | position: relative; 279 | top: 0; 280 | left: 0; 281 | width: 100%; 282 | max-width: 100%; 283 | padding: 30px 20px; 284 | } 285 | 286 | } 287 | 288 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/css/typography.css: -------------------------------------------------------------------------------- 1 | .textleft { 2 | text-align: left; 3 | } 4 | 5 | .textcentre { 6 | text-align: center; 7 | } 8 | 9 | .textright { 10 | text-align: right; 11 | } 12 | 13 | p { 14 | margin: 0 0 20px 0; 15 | } 16 | 17 | strong, b { 18 | font-weight: 600; 19 | } 20 | 21 | em, i { 22 | font-style: italic; 23 | } 24 | 25 | h1 { 26 | margin: 0 0 10px 0; 27 | font-weight: 700; 28 | font-family: "Montserrat"; 29 | text-transform: uppercase; 30 | font-size: 46px; 31 | line-height: 42px; 32 | letter-spacing: -1px; 33 | color: #111; 34 | } 35 | 36 | h2 { 37 | margin: 30px 0 15px 0; 38 | font-weight: 350; 39 | font-family: "Montserrat"; 40 | text-transform: uppercase; 41 | font-size: 23px; 42 | line-height: 21px; 43 | letter-spacing: -0.5px; 44 | color: #111; 45 | } 46 | 47 | h3 { 48 | margin: 26px 0 13px 0; 49 | font-weight: 200; 50 | font-family: "Montserrat"; 51 | font-size: 16px; 52 | line-height: 16px; 53 | letter-spacing: -0.4px; 54 | color: #111; 55 | } 56 | 57 | h4, h5, h6 { 58 | margin: 20px 0 10px 0; 59 | font-weight: 100; 60 | font-family: "Montserrat"; 61 | font-size: 12px; 62 | line-height: 12px; 63 | color: #111; 64 | } 65 | 66 | ul { 67 | margin: 0 0 20px 35px; 68 | list-style-type: square; 69 | } 70 | 71 | ul li { 72 | padding: 0 0 0 2px; 73 | } 74 | 75 | ul ul { 76 | margin: 0 0 0 25px; 77 | } 78 | 79 | ol { 80 | margin: 0 0 20px 35px; 81 | list-style-type: decimal; 82 | } 83 | 84 | ol li { 85 | padding: 0 0 0 2px; 86 | } 87 | 88 | ol ol { 89 | margin: 0 0 0 25px; 90 | } 91 | 92 | hr { 93 | clear: both; 94 | float: left; 95 | width: 100%; 96 | padding: 0; 97 | margin: 30px 0 40px 0; 98 | border: none; 99 | border-top: 4px solid #A71E2E; 100 | text-align: center; 101 | } 102 | 103 | blockquote { 104 | background: #EEE; 105 | margin: 0 0 5px 0 !important; 106 | color: #555; 107 | border-left: 5px solid #A71E2E; 108 | padding: 15px; 109 | font-style: italic; 110 | } 111 | 112 | blockquote p { 113 | margin: 0; 114 | } 115 | 116 | blockquote p.author { 117 | text-align: right; 118 | font-size: 14px; 119 | letter-spacing: 2px; 120 | color: #999; 121 | } 122 | 123 | @media screen and (max-width: 768px) { 124 | 125 | .textcentre { 126 | text-align: left; 127 | } 128 | 129 | .textright { 130 | text-align: left; 131 | } 132 | 133 | } 134 | 135 | 136 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | 30 |
31 |
32 |
33 |

404

34 |

Error ! Page Not Found

35 |
36 |
37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/archives.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Archives{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% for group in groups %} 9 |

{{group.group}}

10 |
    11 | {% for post in group.posts %} 12 |
  • 13 | {{post.date|date:"MMM dd"}} - {{post.title}} 14 |
  • 15 | {% endfor %} 16 |
17 | {% endfor %} 18 | 19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/author.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts by {{author}} {% endblock %} 3 | {% block content %} 4 |
5 |
6 |

Posts by {{author}}

7 |
8 | {% for group in groups %} 9 |

{{group.group}}

10 |
    11 | {% for post in group.posts %} 12 |
  • 13 | {{post.date|date:"MMM dd"}} - {{post.title}} 14 |
  • 15 | {% endfor %} 16 |
17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{title}}{% block subtitle %}{% endblock %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% style "css/buttons.css" %} 21 | {% style "css/menu.css" %} 22 | {% style "css/reset.css" %} 23 | {% style "css/style.css" %} 24 | {% style "css/typography.css" %} 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | 39 | 40 | 58 | 59 |
60 |
    61 |
  • 62 |
  • 63 |
  • 64 |
  • 65 |
  • 66 |
67 |
68 | 69 |
70 | 71 | 80 | 81 | {% script "js/highlight.pack.js" %} 82 | 83 | {% script "js/scripts.js" %} 84 | {% if post.klipse %} {{post.klipse|safe}} {% endif %} 85 | {% if page.klipse %} {{page.klipse|safe}} {% endif %} 86 | 87 | 88 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/home.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% include "/html/post-content.html" %} 5 | {% if disqus? %} 6 |
7 | View Comments 8 |
9 | {% endif %} 10 | 11 |
12 | {% if post.prev %} 13 | « {{post.prev.title}} 14 | {% endif %} 15 | {% if post.next %} 16 | {{post.next.title}} » 17 | {% endif %} 18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/page.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{page.title}}{% endblock %} 3 | {% block content %} 4 |
5 | 8 | {% if page.toc %}{{page.toc|safe}}{% endif %} 9 | {{page.content|safe}} 10 | 11 |
12 | {% if page.prev %} 13 | « {{page.prev.title}} 14 | {% endif %} 15 | {% if page.next %} 16 | {{page.next.title}} » 17 | {% endif %} 18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/post-content.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{post.date|date:longDate}} 4 | {% if post.author %} 5 | By: {{post.author}} 6 | {% endif %} 7 |
8 |

{{post.title}}

9 |
10 |
11 | {% if post.toc %}{{post.toc|safe}}{% endif %} 12 | {{post.content|safe}} 13 |
14 | {% if post.tags|not-empty %} 15 |
16 |
17 | Tags: 18 | {% for tag in post.tags %} 19 | {{tag.name}} 20 | {% endfor %} 21 |
22 | {% endif %} 23 |
24 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/post.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: {{post.title}}{% endblock %} 3 | {% block content %} 4 |
5 | {% include "/html/post-content.html" %} 6 |
7 | {% if post.prev %} 8 | « {{post.prev.title}} 9 | {% endif %} 10 | {% if post.next %} 11 | {{post.next.title}} » 12 | {% endif %} 13 |
14 | 15 | {% if disqus-shortname %} 16 |
17 | 28 | {% endif %} 29 | 30 | 31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/previews.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {% block content %} 3 |
4 | {% for post in posts %} 5 |
6 |

{{post.title}}

7 |
8 | {% if post.author %} 9 |
{{post.author}}
10 | {% endif %} 11 | {{post.date|date:longDate}} 12 |
13 |
14 | {{post.content|safe}} 15 |
16 | Continue reading → 17 |
18 | {% endfor %} 19 | 20 |
21 | {% if prev-uri %} 22 | « Prev 23 | {% endif %} 24 | {% if next-uri %} 25 | Next » 26 | {% endif %} 27 |
28 |
29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/tag.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Posts Tagged "{{name}}"{% endblock %} 3 | {% block content %} 4 |
5 | 8 |
    9 | {% for post in posts %} 10 |
  • 11 | {{post.title}} 12 |
  • 13 | {% endfor %} 14 |
15 |
16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/html/tags.html: -------------------------------------------------------------------------------- 1 | {% extends "/html/base.html" %} 2 | {%block subtitle %}: Tags{% endblock %} 3 | {% block content %} 4 |
5 | 8 | 9 |
    10 | {% for tag in tags %} 11 |
  • {{tag.name}}
  • 12 | {% endfor %} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/js/highlight.pack.js: -------------------------------------------------------------------------------- 1 | /*! highlight.js v9.7.0 | BSD3 License | git.io/hljslicense */ 2 | !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){l+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"
":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},t=e.inherit(r,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},n=e.inherit(a,{i:/\n/}),c={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,n]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},n]});a.c=[s,c,r,e.ASM,e.QSM,e.CNM,e.CBCM],n.c=[o,c,t,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,c,r,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",w="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",u=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+w+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(u).concat(d)}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("clojure",function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",o={b:n,r:0},s={cN:"number",b:a,r:0},i=e.inherit(e.QSM,{i:null}),c=e.C(";","$",{r:0}),d={cN:"literal",b:/\b(true|false|nil)\b/},l={b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+n},p=e.C("\\^\\{","\\}"),u={cN:"symbol",b:"[:]{1,2}"+n},f={b:"\\(",e:"\\)"},h={eW:!0,r:0},y={k:t,l:n,cN:"name",b:n,starts:h},b=[f,i,m,p,c,u,l,s,d,o];return f.c=[e.C("comment",""),y,h],h.c=b,l.c=b,{aliases:["clj"],i:/\S/,c:[f,i,m,p,c,u,l,s,d]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("java",function(e){var t=e.UIR+"(<"+e.UIR+"(\\s*,\\s*"+e.UIR+")*>)?",a="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",s={cN:"number",b:r,r:0};return{aliases:["jsp"],k:a,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},s,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}); -------------------------------------------------------------------------------- /resources/templates/themes/nucleus/js/scripts.js: -------------------------------------------------------------------------------- 1 | /** External Links **/ 2 | 3 | function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i (read-config) :ignored-files)] 15 | (start-watcher! "resources/templates" ignored-files compile-assets-timed))) 16 | 17 | (defn wrap-subdirectories 18 | [handler] 19 | (fn [request] 20 | (let [req-uri (.substring (url-decode (:uri request)) 1) 21 | res-path (path req-uri (when (:clean-urls? (read-config)) "index.html"))] 22 | (or (resource-response res-path {:root "public"}) 23 | (handler request))))) 24 | 25 | (defroutes routes 26 | (GET "/" [] (redirect (let [config (read-config)] 27 | (path (:blog-prefix config) "/" 28 | (when-not (:clean-urls? config) "index.html"))))) 29 | (route/resources "/") 30 | (route/not-found "Page not found")) 31 | 32 | (def handler (wrap-subdirectories routes)) 33 | --------------------------------------------------------------------------------