From c7a35fd6f59268c4b240856c9a22e48fe97658cf Mon Sep 17 00:00:00 2001 From: "j.taneichi" Date: Sat, 30 May 2015 11:15:32 +0900 Subject: [PATCH] add --- .gitignore | 1 + CNAME | 1 + LICENSE | 24 + README.md | 67 + config.rb | 26 + css/animation.css | 0 css/buttons.css | 425 ++ css/fixie-demo.css | 41 + css/highlight/LICENSE | 24 + css/highlight/README.md | 120 + css/highlight/README.ru.md | 125 + css/highlight/classref.txt | 544 ++ css/highlight/default.min.css | 1 + css/highlight/highlight.pack.js | 1 + css/highlight/styles/arta.css | 153 + css/highlight/styles/ascetic.css | 49 + css/highlight/styles/brown_paper.css | 104 + css/highlight/styles/brown_papersq.png | Bin 0 -> 18198 bytes css/highlight/styles/dark.css | 103 + css/highlight/styles/default.css | 133 + css/highlight/styles/far.css | 110 + css/highlight/styles/github.css | 133 + css/highlight/styles/googlecode.css | 146 + css/highlight/styles/idea.css | 122 + css/highlight/styles/ir_black.css | 99 + css/highlight/styles/magula.css | 120 + css/highlight/styles/monokai.css | 116 + css/highlight/styles/pojoaque.css | 106 + css/highlight/styles/pojoaque.jpg | Bin 0 -> 1186 bytes css/highlight/styles/school_book.css | 111 + css/highlight/styles/school_book.png | Bin 0 -> 486 bytes css/highlight/styles/solarized_dark.css | 90 + css/highlight/styles/solarized_light.css | 90 + css/highlight/styles/sunburst.css | 149 + css/highlight/styles/vs.css | 85 + css/highlight/styles/xcode.css | 153 + css/highlight/styles/zenburn.css | 115 + css/home.css | 213 + css/layout.css | 104 + css/styles.css | 23 + css/styles.less | 110 + css/test.less | 3 + css/theme.css | 263 + index.html | 25 + js/boilerplate.js | 9 + js/config.js | 27 + js/events.js | 8 + js/libs/backbone/backbone-min.js | 37 + js/libs/backbone/backbone-optamd3-min.js | 37 + js/libs/cssbeautify/cssbeautify.js | 198 + js/libs/fixie/fixie.js | 1 + js/libs/highlight/highlight.js | 1 + js/libs/highlight/highlight.pack.js | 1 + js/libs/highlighter/shBrushCss.js | 90 + js/libs/highlighter/shCore.js | 2371 +++++++ js/libs/jquery/jquery-min.js | 2 + js/libs/jscssp/jscssp.js | 5431 +++++++++++++++ js/libs/less/less-1.7.3.js | 7942 ++++++++++++++++++++++ js/libs/less/less-1.7.3.min.js | 16 + js/libs/marked/marked.js | 1076 +++ js/libs/pagedown/converter.js | 1335 ++++ js/libs/pagedown/pagedown | 1332 ++++ js/libs/pagedown/sanitizer.js | 108 + js/libs/parseuri/parseuri.js | 32 + js/libs/require/order.js | 1 + js/libs/require/require.js | 31 + js/libs/require/text.js | 11 + js/libs/showdown/showdown.js | 1344 ++++ js/libs/underscore/underscore-min.js | 31 + js/main.js | 40 + js/router.js | 39 + js/views/app.js | 24 + js/views/style/menu.js | 158 + js/views/style/page.js | 284 + js/vm.js | 33 + templates/layout.html | 4 + templates/style/menu.html | 84 + templates/style/page.html | 16 + 78 files changed, 26582 insertions(+) create mode 100644 .gitignore create mode 100644 CNAME create mode 100644 LICENSE create mode 100644 README.md create mode 100644 config.rb create mode 100644 css/animation.css create mode 100644 css/buttons.css create mode 100644 css/fixie-demo.css create mode 100644 css/highlight/LICENSE create mode 100644 css/highlight/README.md create mode 100644 css/highlight/README.ru.md create mode 100644 css/highlight/classref.txt create mode 100644 css/highlight/default.min.css create mode 100644 css/highlight/highlight.pack.js create mode 100644 css/highlight/styles/arta.css create mode 100644 css/highlight/styles/ascetic.css create mode 100644 css/highlight/styles/brown_paper.css create mode 100644 css/highlight/styles/brown_papersq.png create mode 100644 css/highlight/styles/dark.css create mode 100644 css/highlight/styles/default.css create mode 100644 css/highlight/styles/far.css create mode 100644 css/highlight/styles/github.css create mode 100644 css/highlight/styles/googlecode.css create mode 100644 css/highlight/styles/idea.css create mode 100644 css/highlight/styles/ir_black.css create mode 100644 css/highlight/styles/magula.css create mode 100644 css/highlight/styles/monokai.css create mode 100644 css/highlight/styles/pojoaque.css create mode 100644 css/highlight/styles/pojoaque.jpg create mode 100644 css/highlight/styles/school_book.css create mode 100644 css/highlight/styles/school_book.png create mode 100644 css/highlight/styles/solarized_dark.css create mode 100644 css/highlight/styles/solarized_light.css create mode 100644 css/highlight/styles/sunburst.css create mode 100644 css/highlight/styles/vs.css create mode 100644 css/highlight/styles/xcode.css create mode 100644 css/highlight/styles/zenburn.css create mode 100644 css/home.css create mode 100644 css/layout.css create mode 100644 css/styles.css create mode 100644 css/styles.less create mode 100644 css/test.less create mode 100644 css/theme.css create mode 100644 index.html create mode 100644 js/boilerplate.js create mode 100644 js/config.js create mode 100644 js/events.js create mode 100644 js/libs/backbone/backbone-min.js create mode 100644 js/libs/backbone/backbone-optamd3-min.js create mode 100644 js/libs/cssbeautify/cssbeautify.js create mode 100644 js/libs/fixie/fixie.js create mode 100644 js/libs/highlight/highlight.js create mode 100644 js/libs/highlight/highlight.pack.js create mode 100644 js/libs/highlighter/shBrushCss.js create mode 100644 js/libs/highlighter/shCore.js create mode 100644 js/libs/jquery/jquery-min.js create mode 100644 js/libs/jscssp/jscssp.js create mode 100644 js/libs/less/less-1.7.3.js create mode 100644 js/libs/less/less-1.7.3.min.js create mode 100644 js/libs/marked/marked.js create mode 100644 js/libs/pagedown/converter.js create mode 100644 js/libs/pagedown/pagedown create mode 100644 js/libs/pagedown/sanitizer.js create mode 100644 js/libs/parseuri/parseuri.js create mode 100644 js/libs/require/order.js create mode 100644 js/libs/require/require.js create mode 100644 js/libs/require/text.js create mode 100644 js/libs/showdown/showdown.js create mode 100644 js/libs/underscore/underscore-min.js create mode 100644 js/main.js create mode 100644 js/router.js create mode 100644 js/views/app.js create mode 100644 js/views/style/menu.js create mode 100644 js/views/style/page.js create mode 100644 js/vm.js create mode 100644 templates/layout.html create mode 100644 templates/style/menu.html create mode 100644 templates/style/page.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..397b4a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.log diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..f32f7f6 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +kaleistyleguide.com diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d7f9e2 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# Kalei - Style guide + +This project aims at making sure your style sheets are fully documented whilst being synchronized with your webpages styles. To do this it actually uses your live stylesheets in so that at anytime you can review how your styleguide looks. + + +## Main goals and benefits + +* Fully documented CSS - No need to explain the benefits +* No dependencies, simply download the repository and run in your browser +* Automatic generation of demo UI components +* Easy access for anyone, designer, developer, manager and users +* Rapid development of projects by allowing developers to find the correct CSS and HTML for any given UI component +* Open sourced so that all great ideas can be included + + + + + +## Getting started + +1. Download the repository (`git clone git://github.com/kaleistyleguide/kaleistyleguide.git`) +2. Serve it on a HTTP server and it should work! +3. Edit `js/config.js` to point at your own `styles.css` + + +## Author + +[Thomas Davis](http://thomasdavis.github.com) + +## Contributors + +Luke Brooker +[Richard Barret](http://richardbarrett.github.io) +[Sam Pospischil](http://pospi.spadgos.com) + + + +## Inspiration + +Kalei is heavily influenced by the following projects and blog posts. + +[Pea.rs](http://pea.rs/) + +[KSS](http://warpspire.com/posts/kss/) + +[StyleDocco](http://jacobrask.github.com/styledocco/) + +[RJ Metrics](http://blog.rjmetrics.com/2012/02/20/our-living-style-guide-writing-maintainable-htmlcss/) + +[Anchoring Your Design Language in a Live Style Guide](http://uxmag.com/articles/anchoring-your-design-language-in-a-live-style-guide) + + +## Technologies + +* [marked](https://github.com/chjj/marked) +* [jscssp](http://www.glazman.org/JSCSSP/) +* [LESS](http://lesscss.org/) +* cssbeautify +* [fixie](http://fixiejs.com/) +* [highlight](http://softwaremaniacs.org/soft/highlight/en/) +* [backbone](http://backbonejs.org/) +* [underscore](http://underscorejs.org/) +* [jquery](http://jquery.com) + +## License + +Public domain: http://unlicense.org/ diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..746575d --- /dev/null +++ b/config.rb @@ -0,0 +1,26 @@ +require 'compass/import-once/activate' +# Require any additional compass plugins here. + +# Set this to the root of your project when deployed: +http_path = "/assets/web" +css_dir = "css" +sass_dir = "sass" +fonts_dir = "font" +images_dir = "img" +javascripts_dir = "js" + +# You can select your preferred output style here (can be overridden via the command line): +# output_style = :expanded or :nested or :compact or :compressed + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +# line_comments = false + + +# If you prefer the indented syntax, you might want to regenerate this +# project again passing --syntax sass, or you can uncomment this: +# preferred_syntax = :sass +# and then run: +# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass diff --git a/css/animation.css b/css/animation.css new file mode 100644 index 0000000..e69de29 diff --git a/css/buttons.css b/css/buttons.css new file mode 100644 index 0000000..d499ea0 --- /dev/null +++ b/css/buttons.css @@ -0,0 +1,425 @@ +/* +## Github buttons +### Licensed under Unlicense + http://github.com/necolas/css3-github-buttons + +This is an example bundled with Kalei(not used in Kalei) + + */ + + +/* +## Base Mt Button +``` +hello + +``` +*/ + + +.mt-button{ + background-color: red; + color: white; + border: darkred; +} + +/* +## Base Button +``` +Publish post +Save as draft +``` +## Grouped buttons + +Groups of buttons can be created by wrapping them in an element given a class of button-group. A less important group of buttons can be marked out by adding a further class, minor-group. + +``` + +``` +## Mixed group +Displaying a mixture of grouped and standalone buttons, as might be seen in a toolbar, can be done by adding another wrapping element with the class button-container. +``` +
+ Compose new + + + +
+ Move to + Labels +
+
+``` + + */ + +.button { + position: relative; + overflow: visible; + display: inline-block; + padding: 0.5em 1em; + border: 1px solid #d4d4d4; + margin: 0; + text-decoration: none; + text-align: center; + text-shadow: 1px 1px 0 #fff; + font:11px/normal sans-serif; + color: #333; + white-space: nowrap; + cursor: pointer; + outline: none; + background-color: #ececec; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec)); + background-image: -moz-linear-gradient(#f4f4f4, #ececec); + background-image: -ms-linear-gradient(#f4f4f4, #ececec); + background-image: -o-linear-gradient(#f4f4f4, #ececec); + background-image: linear-gradient(#f4f4f4, #ececec); + -moz-background-clip: padding; /* for Firefox 3.6 */ + background-clip: padding-box; + border-radius: 0.2em; + /* IE hacks */ + zoom: 1; + *display: inline; +} + +.button:hover, +.button:focus, +.button:active, +.button.active { + border-color: #3072b3; + border-bottom-color: #2a65a0; + text-decoration: none; + text-shadow: -1px -1px 0 rgba(0,0,0,0.3); + color: #fff; + background-color: #3c8dde; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3)); + background-image: -moz-linear-gradient(#599bdc, #3072b3); + background-image: -o-linear-gradient(#599bdc, #3072b3); + background-image: linear-gradient(#599bdc, #3072b3); +} + +.button:active, +.button.active { + border-color: #2a65a0; + border-bottom-color: #3884cd; + background-color: #3072b3; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3072b3), to(#599bdc)); + background-image: -moz-linear-gradient(#3072b3, #599bdc); + background-image: -ms-linear-gradient(#3072b3, #599bdc); + background-image: -o-linear-gradient(#3072b3, #599bdc); + background-image: linear-gradient(#3072b3, #599bdc); +} + +.button::-moz-focus-inner { + padding: 0; + border: 0; +} + + + + +.button.icon:before { + content: ""; + position: relative; + top: 1px; + float:left; + width: 12px; + height: 12px; + margin: 0 0.75em 0 -0.25em; + background: url(gh-icons.png) 0 99px no-repeat; +} + +.button.arrowup.icon:before { background-position: 0 0; } +.button.arrowup.icon:hover:before, +.button.arrowup.icon:focus:before, +.button.arrowup.icon:active:before { background-position: -12px 0; } + +.button.arrowdown.icon:before { background-position: 0 -12px; } +.button.arrowdown.icon:hover:before, +.button.arrowdown.icon:focus:before, +.button.arrowdown.icon:active:before { background-position: -12px -12px; } + +.button.arrowleft.icon:before { background-position: 0 -24px; } +.button.arrowleft.icon:hover:before, +.button.arrowleft.icon:focus:before, +.button.arrowleft.icon:active:before { background-position: -12px -24px; } + +.button.arrowright.icon:before { float:right; margin: 0 -0.25em 0 0.5em; background-position: 0 -36px; } +.button.arrowright.icon:hover:before, +.button.arrowright.icon:focus:before, +.button.arrowright.icon:active:before { background-position: -12px -36px; } + +.button.approve.icon:before { background-position: 0 -48px; } +.button.approve.icon:hover:before, +.button.approve.icon:focus:before, +.button.approve.icon:active:before { background-position: -12px -48px; } + +.button.add.icon:before { background-position: 0 -288px; } +.button.add.icon:hover:before, +.button.add.icon:focus:before, +.button.add.icon:active:before { background-position: -12px -288px; } + +.button.remove.icon:before { background-position: 0 -60px; } +.button.remove.icon:hover:before, +.button.remove.icon:focus:before, +.button.remove.icon:active:before { background-position: -12px -60px; } + +.button.log.icon:before { background-position: 0 -72px; } +.button.log.icon:hover:before, +.button.log.icon:focus:before, +.button.log.icon:active:before { background-position: -12px -72px; } + +.button.calendar.icon:before { background-position: 0 -84px; } +.button.calendar.icon:hover:before, +.button.calendar.icon:focus:before, +.button.calendar.icon:active:before { background-position: -12px -84px; } + +.button.chat.icon:before { background-position: 0 -96px; } +.button.chat.icon:hover:before, +.button.chat.icon:focus:before, +.button.chat.icon:active:before { background-position: -12px -96px; } + +.button.clock.icon:before { background-position: 0 -108px; } +.button.clock.icon:hover:before, +.button.clock.icon:focus:before, +.button.clock.icon:active:before { background-position: -12px -108px; } + +.button.settings.icon:before { background-position: 0 -120px; } +.button.settings.icon:hover:before, +.button.settings.icon:focus:before, +.button.settings.icon:active:before { background-position: -12px -120px; } + +.button.comment.icon:before { background-position: 0 -132px; } +.button.comment.icon:hover:before, +.button.comment.icon:focus:before, +.button.comment.icon:active:before { background-position: -12px -132px; } + +.button.fork.icon:before { background-position: 0 -144px; } +.button.fork.icon:hover:before, +.button.fork.icon:focus:before, +.button.fork.icon:active:before { background-position: -12px -144px; } + +.button.like.icon:before { background-position: 0 -156px; } +.button.like.icon:hover:before, +.button.like.icon:focus:before, +.button.like.icon:active:before { background-position: -12px -156px; } + +.button.favorite.icon:before { background-position: 0 -348px; } +.button.favorite.icon:hover:before, +.button.favorite.icon:focus:before, +.button.favorite.icon:active:before { background-position: -12px -348px; } + +.button.home.icon:before { background-position: 0 -168px; } +.button.home.icon:hover:before, +.button.home.icon:focus:before, +.button.home.icon:active:before { background-position: -12px -168px; } + +.button.key.icon:before { background-position: 0 -180px; } +.button.key.icon:hover:before, +.button.key.icon:focus:before, +.button.key.icon:active:before { background-position: -12px -180px; } + +.button.lock.icon:before { background-position: 0 -192px; } +.button.lock.icon:hover:before, +.button.lock.icon:focus:before, +.button.lock.icon:active:before { background-position: -12px -192px; } + +.button.unlock.icon:before { background-position: 0 -204px; } +.button.unlock.icon:hover:before, +.button.unlock.icon:focus:before, +.button.unlock.icon:active:before { background-position: -12px -204px; } + +.button.loop.icon:before { background-position: 0 -216px; } +.button.loop.icon:hover:before, +.button.loop.icon:focus:before, +.button.loop.icon:active:before { background-position: -12px -216px; } + +.button.search.icon:before { background-position: 0 -228px; } +.button.search.icon:hover:before, +.button.search.icon:focus:before, +.button.search.icon:active:before { background-position: -12px -228px; } + +.button.mail.icon:before { background-position: 0 -240px; } +.button.mail.icon:hover:before, +.button.mail.icon:focus:before, +.button.mail.icon:active:before { background-position: -12px -240px; } + +.button.move.icon:before { background-position: 0 -252px; } +.button.move.icon:hover:before, +.button.move.icon:focus:before, +.button.move.icon:active:before { background-position: -12px -252px; } + +.button.edit.icon:before { background-position: 0 -264px; } +.button.edit.icon:hover:before, +.button.edit.icon:focus:before, +.button.edit.icon:active:before { background-position: -12px -264px; } + +.button.pin.icon:before { background-position: 0 -276px; } +.button.pin.icon:hover:before, +.button.pin.icon:focus:before, +.button.pin.icon:active:before { background-position: -12px -276px; } + +.button.reload.icon:before { background-position: 0 -300px; } +.button.reload.icon:hover:before, +.button.reload.icon:focus:before, +.button.reload.icon:active:before { background-position: -12px -300px; } + +.button.rss.icon:before { background-position: 0 -312px; } +.button.rss.icon:hover:before, +.button.rss.icon:focus:before, +.button.rss.icon:active:before { background-position: -12px -312px; } + +.button.tag.icon:before { background-position: 0 -324px; } +.button.tag.icon:hover:before, +.button.tag.icon:focus:before, +.button.tag.icon:active:before { background-position: -12px -324px; } + +.button.trash.icon:before { background-position: 0 -336px; } +.button.trash.icon:hover:before, +.button.trash.icon:focus:before, +.button.trash.icon:active:before { background-position: -12px -336px; } + +.button.user.icon:before { background-position: 0 -360px; } +.button.user.icon:hover:before, +.button.user.icon:focus:before, +.button.user.icon:active:before { background-position: -12px -360px; } + + + +.button.primary { + font-weight: bold; +} + + +.button.danger { + color: #900; +} + +.button.danger:hover, +.button.danger:focus, +.button.danger:active { + border-color: #b53f3a; + border-bottom-color: #a0302a; + color: #fff; + background-color: #dc5f59; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dc5f59), to(#b33630)); + background-image: -moz-linear-gradient(#dc5f59, #b33630); + background-image: -ms-linear-gradient(#dc5f59, #b33630); + background-image: -o-linear-gradient(#dc5f59, #b33630); + background-image: linear-gradient(#dc5f59, #b33630); +} + +.button.danger:active, +.button.danger.active { + border-color: #a0302a; + border-bottom-color: #bf4843; + background-color: #b33630; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b33630), to(#dc5f59)); + background-image: -moz-linear-gradient(#b33630, #dc5f59); + background-image: -ms-linear-gradient(#b33630, #dc5f59); + background-image: -o-linear-gradient(#b33630, #dc5f59); + background-image: linear-gradient(#b33630, #dc5f59); +} + + +.button.pill { + border-radius: 50em; +} + + +.button.disable { + opacity: 0.5; +} + + +.button.big { + font-size: 14px; +} + +.button.big.icon:before { + top: 0; +} + + + +.button-group { + display: inline-block; + list-style: none; + padding: 0; + margin: 0; + zoom: 1; + *display: inline; +} + +.button + .button, +.button + .button-group, +.button-group + .button, +.button-group + .button-group { + margin-left: 15px; +} + +.button-group li { + float: left; + padding: 0; + margin: 0; +} + +.button-group .button { + float: left; + margin-left: -1px; +} + +.button-group > .button:not(:first-child):not(:last-child), +.button-group li:not(:first-child):not(:last-child) .button { + border-radius: 0; +} + +.button-group > .button:first-child, +.button-group li:first-child .button { + margin-left: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.button-group > .button:last-child, +.button-group li:last-child > .button { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + + +.button-group.minor-group .button { + border: 1px solid #d4d4d4; + text-shadow: none; + background-image: none; + background-color: #fff; +} + +.button-group.minor-group .button:hover, +.button-group.minor-group .button:focus { + background-color: #599bdc; +} + +.button-group.minor-group .button:active, +.button-group.minor-group .button.active { + background-color: #3072b3; +} + +.button-group.minor-group .button.icon:before { + opacity: 0.8; +} + + +.button-container .button, +.button-container .button-group { + vertical-align: top; +} diff --git a/css/fixie-demo.css b/css/fixie-demo.css new file mode 100644 index 0000000..a0a1f1c --- /dev/null +++ b/css/fixie-demo.css @@ -0,0 +1,41 @@ +/* +# Fixie Example Usage + +[fixie.js](http://fixiejs.com/) is bundled with Kalei. + +"Just set class to fixie wherever you need dummy content. It works for headers, paragraphs, lists, images, and just about anything else." + +## Example Heading and Paragraph + +``` +

+

+``` +*/ +h3.fixie-demo { + color: #444; +} +p.fixie-demo { + color: #555 ; +} + +/* +## Example Fixie Images + +``` +
+ + + + +
+``` +*/ +.fixie-demo img { + float: left; + margin-left: 10px; + width:60px; + height:60px; + padding: 2px; + border: 1px solid #ccc; +} \ No newline at end of file diff --git a/css/highlight/LICENSE b/css/highlight/LICENSE new file mode 100644 index 0000000..422deb7 --- /dev/null +++ b/css/highlight/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2006, Ivan Sagalaev +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of highlight.js nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/css/highlight/README.md b/css/highlight/README.md new file mode 100644 index 0000000..33ca6fd --- /dev/null +++ b/css/highlight/README.md @@ -0,0 +1,120 @@ +# Highlight.js + +Highlight.js highlights syntax in code examples on blogs, forums and, +in fact, on any web page. It's very easy to use because it works +automatically: finds blocks of code, detects a language, highlights it. + +Autodetection can be fine tuned when it fails by itself (see "Heuristics"). + + +## Basic usage + +Link the library and a stylesheet from your page and hook highlighting to +the page load event: + +```html + + + +``` + +This will highlight all code on the page marked up as `
 .. 
`. +If you use different markup or need to apply highlighting dynamically, read +"Custom initialization" below. + +- You can download your own customized version of "highlight.pack.js" or + use the hosted one as described on the download page: + + +- Style themes are available in the download package or as hosted files. + To create a custom style for your site see the class reference in the file + [classref.txt][cr] from the downloaded package. + +[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt + + +## Tab replacement + +You can replace TAB ('\x09') characters used for indentation in your code +with some fixed number of spaces or with a `` to give them special +styling: + +```html + +``` + +## Custom initialization + +If you use different markup for code blocks you can initialize them manually +with `highlightBlock(code, tabReplace, useBR)` function. It takes a DOM element +containing the code to highlight and optionally a string with which to replace +TAB characters. + +Initialization using, for example, jQuery might look like this: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); +}); +``` + +You can use `highlightBlock` to highlight blocks dynamically inserted into +the page. Just make sure you don't do it twice for already highlighted +blocks. + +If your code container relies on `
` tags instead of line breaks (i.e. if +it's not `
`) pass `true` into the third parameter of `highlightBlock`
+to make highlight.js use `
` in the output: + +```javascript +$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)}); +``` + + +## Heuristics + +Autodetection of a code's language is done using a simple heuristic: +the program tries to highlight a fragment with all available languages and +counts all syntactic structures that it finds along the way. The language +with greatest count wins. + +This means that in short fragments the probability of an error is high +(and it really happens sometimes). In this cases you can set the fragment's +language explicitly by assigning a class to the `` element: + +```html +
...
+``` + +You can use class names recommended in HTML5: "language-html", +"language-php". Classes also can be assigned to the `
` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+
...
+``` + + +## Export + +File export.html contains a little program that allows you to paste in a code +snippet and then copy and paste the resulting HTML code generated by the +highlighter. This is useful in situations when you can't use the script itself +on a site. + + +## Meta + +- Version: 7.0 +- URL: http://softwaremaniacs.org/soft/highlight/en/ +- Author: Ivan Sagalaev () + +For the license terms see LICENSE files. +For the list of contributors see AUTHORS.en.txt file. diff --git a/css/highlight/README.ru.md b/css/highlight/README.ru.md new file mode 100644 index 0000000..5f9ba06 --- /dev/null +++ b/css/highlight/README.ru.md @@ -0,0 +1,125 @@ +# Highlight.js + +Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах, +форумах и вообще на любых веб-страницах. Пользоваться им очень просто, +потому что работает он автоматически: сам находит блоки кода, сам +определяет язык, сам подсвечивает. + +Автоопределением языка можно управлять, когда оно не справляется само (см. +дальше "Эвристика"). + + +## Простое использование + +Подключите библиотеку и стиль на страницу и повесть вызов подсветки на +загрузку страницы: + +```html + + + +``` + +Весь код на странице, обрамлённый в теги `
 .. 
` +будет автоматически подсвечен. Если вы используете другие теги или хотите +подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже. + +- Вы можете скачать собственную версию "highlight.pack.js" или сослаться + на захостенный файл, как описано на странице загрузки: + + +- Стилевые темы можно найти в загруженном архиве или также использовать + захостенные. Чтобы сделать собственный стиль для своего сайта, вам + будет полезен справочник классов в файле [classref.txt][cr], который тоже + есть в архиве. + +[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt + + +## Замена TABов + +Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на +фиксированное количество пробелов или на отдельный ``, чтобы задать ему +какой-нибудь специальный стиль: + +```html + +``` + + +## Инициализация вручную + +Если вы используете другие теги для блоков кода, вы можете инициализировать их +явно с помощью функции `highlightBlock(code, tabReplace, useBR)`. Она принимает +DOM-элемент с текстом расцвечиваемого кода и опционально - строчку для замены +символов TAB. + +Например с использованием jQuery код инициализации может выглядеть так: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); +}); +``` + +`highlightBlock` можно также использовать, чтобы подсветить блоки кода, +добавленные на страницу динамически. Только убедитесь, что вы не делаете этого +повторно для уже раскрашенных блоков. + +Если ваш блок кода использует `
` вместо переводов строки (т.е. если это не +`
`), передайте `true` третьим параметром в `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу ``:
+
+```html
+
...
+``` + +Можно использовать рекомендованные в HTML5 названия классов: +"language-html", "language-php". Также можно назначать классы на элемент +`
`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+
...
+``` + + +## Экспорт + +В файле export.html находится небольшая программка, которая показывает и дает +скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода. +Это может понадобится например на сайте, на котором нельзя подключить сам скрипт +highlight.js. + + +## Координаты + +- Версия: 7.0 +- URL: http://softwaremaniacs.org/soft/highlight/ +- Автор: Иван Сагалаев () + +Лицензионное соглашение читайте в файле LICENSE. +Список соавторов читайте в файле AUTHORS.ru.txt diff --git a/css/highlight/classref.txt b/css/highlight/classref.txt new file mode 100644 index 0000000..38f919a --- /dev/null +++ b/css/highlight/classref.txt @@ -0,0 +1,544 @@ +This is a full list of available classes corresponding to languages' +syntactic structures. The parentheses after language name contain identifiers +used as class names in `` element. + +Python ("python"): + + keyword keyword + built_in built-in objects (None, False, True and Ellipsis) + number number + string string (of any type) + comment comment + decorator @-decorator for functions + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + params everything inside parentheses in a function's or class' header + +Python profiler results ("profile"): + + number number + string string + builtin builtin function entry + filename filename in an entry + summary profiling summary + header header of table of results + keyword column header + function function name in an entry (including parentheses) + title actual name of a function in an entry (excluding parentheses) + +Ruby ("ruby"): + + keyword keyword + string string + subst in-string substitution (#{...}) + comment comment + yardoctag YARD tag + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + parent name of a parent class + symbol symbol + instancevar instance variable + +Perl ("perl"): + + keyword keyword + comment comment + number number + string string + regexp regular expression + sub subroutine header (from "sub" till "{") + variable variable starting with "$", "%", "@" + operator operator + pod plain old doc + +PHP ("php"): + + keyword keyword + number number + string string (of any type) + comment comment + phpdoc phpdoc params in comments + variable variable starting with "$" + preprocessor preprocessor marks: "" + +Scala ("scala"): + + keyword keyword + number number + string string + comment comment + annotaion annotation + javadoc javadoc comment + javadoctag @-tag in javadoc + class class header + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "with" inside class header + +Go language ("go"): + comment comment + string string constant + number number + keyword language keywords + constant true false nil iota + typename built-in plain types (int, string etc.) + built_in built-in functions + +XML ("xml"): + + tag any tag from "<" till ">" + comment comment + pi processing instruction () + cdata CDATA section + attribute attribute + value attribute's value + +HTML ("html"): + + keyword HTML tag + tag any tag from "<" till ">" + comment comment + doctype declaration + attribute tag's attribute with or without value + value attribute's value + +CSS ("css"): + + tag HTML tag in selectors + id #some_name in selectors + class .some_name in selectors + at_rule @-rule till first "{" or ";" + attr_selector attribute selector (square brackets in a[href^=http://]) + pseudo pseudo classes and elemens (:after, ::after etc.) + comment comment + rules everything from "{" till "}" + property property name inside a rule + value property value inside a rule, from ":" till ";" or + till the end of rule block + number number within a value + string string within a value + hexcolor hex color (#FFFFFF) within a value + function CSS function within a value + params everything between "(" and ")" within a function + important "!important" symbol + +Markdown ("markdown"): + + header header + bullet list bullet + emphasis emphasis + strong strong emphasis + blockquote blockquote + code code + horizontal_rule horizontal rule + link_label link label + link_url link url + +Django ("django"): + + keyword HTML tag in HTML, default tags and default filters in templates + tag any tag from "<" till ">" + comment comment + doctype declaration + attribute tag's attribute with or withou value + value attribute's value + template_tag template tag {% .. %} + variable template variable {{ .. }} + template_comment template comment, both {# .. #} and {% comment %} + filter filter from "|" till the next filter or the end of tag + argument filter argument + +JSON ("json"): + + number number + literal "true", "false" and "null" + string string value + attribute name of an object property + value value of an object property + +JavaScript ("javascript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + string string + regexp regular expression + function header of a function + title name of a function inside a header + params parentheses and everything inside them in a function's header + +CoffeeScript ("coffeescript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + string string + regexp regular expression + function header of a function + title name of a function variable inside a header + params parentheses and everything inside them in a function's header + +ActionScript ("actionscript"): + + comment comment + string string + number number + keyword keywords + literal literal + reserved reserved keyword + title name of declaration (package, class or function) + preprocessor preprocessor directive (import, include) + type type of returned value (for functions) + package package (named or not) + class class/interface + function function + param params of function + rest_arg rest argument of function + +VBScript ("vbscript"): + + keyword keyword + number number + string string + comment comment + built_in built-in function + +HTTP ("http"): + + request first line of a request + status first line of a response + attribute header name + string header value or query string in a request line + number status code + +Lua ("lua"): + + keyword keyword + number number + string string + comment comment + built_in built-in operator + function header of a function + title name of a function inside a header + params everything inside parentheses in a function's header + long_brackets multiline string in [=[ .. ]=] + +Delphi ("delphi"): + + keyword keyword + comment comment (of any type) + number number + string string + function header of a function, procedure, constructor and destructor + title name of a function, procedure, constructor or destructor + inside a header + params everything inside parentheses in a function's header + class class' body from "= class" till "end;" + +Java ("java"): + + keyword keyword + number number + string string + comment commment + annotaion annotation + javadoc javadoc comment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + +C++ ("cpp"): + + keyword keyword + number number + string string and character + comment comment + preprocessor preprocessor directive + stl_container instantiation of STL containers ("vector<...>") + +Objective C ("objectivec"): + keyword keyword + built_in Cocoa/Cocoa Touch constants and classes + number number + string string + comment comment + preprocessor preprocessor directive + class interface/implementation, protocol and forward class declaration + variable properties and struct accesors + +Vala ("vala"): + + keyword keyword + number number + string string + comment comment + class class definitions + title in class definition + constant ALL_UPPER_CASE + +C# ("cs"): + + keyword keyword + number number + string string + comment commment + xmlDocTag xmldoc tag ("///", "", "<..>") + +D language ("d"): + + comment comment + string string constant + number number + keyword language keywords (including @attributes) + constant true false null + built_in built-in plain types (int, string etc.) + +RenderMan RSL ("rsl"): + + keyword keyword + number number + string string (including @"..") + comment comment + preprocessor preprocessor directive + shader sahder keywords + shading shading keywords + built_in built-in function + +RenderMan RIB ("rib"): + + keyword keyword + number number + string string + comment comment + commands command + +Maya Embedded Language ("mel"): + + keyword keyword + number number + string string + comment comment + variable variable + +SQL ("sql"): + + keyword keyword (mostly SQL'92 and SQL'99) + number number + string string (of any type: "..", '..', `..`) + comment comment + aggregate aggregate function + +Smalltalk ("smalltalk"): + + keyword keyword + number number + string string + comment commment + symbol symbol + array array + class name of a class + char char + localvars block of local variables + +Lisp ("lisp"): + + keyword keyword + number number + string string + comment commment + variable variable + literal b, t and nil + list non-quoted list + title first symbol in a non-quoted list + body remainder of the non-quoted list + quoted quoted list, both "(quote .. )" and "'(..)" + +Ini ("ini"): + + title title of a section + value value of a setting of any type + string string + number number + keyword boolean value keyword + +Apache ("apache"): + + keyword keyword + number number + comment commment + literal On and Off + sqbracket variables in rewrites "%{..}" + cbracket options in rewrites "[..]" + tag begin and end of a configuration section + +Nginx ("nginx"): + + title directive title + string string + number number + comment comment + built_in built-in constant + variable $-variable + regexp regexp + +Diff ("diff"): + + header file header + chunk chunk header within a file + addition added lines + deletion deleted lines + change changed lines + +DOS ("dos"): + + keyword keyword + flow batch control keyword + stream DOS special files ("con", "prn", ...) + winutils some commands (see dos.js specifically) + envvar environment variables + +Bash ("bash"): + + keyword keyword + string string + number number + comment comment + literal special literal: "true" и "false" + variable variable + shebang script interpreter header + +CMake ("cmake") + + keyword keyword + number number + string string + comment commment + envvar $-variable + +Axapta ("axapta"): + + keyword keyword + number number + string string + comment commment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + preprocessor preprocessor directive + +1C ("1c"): + + keyword keyword + number number + date date + string string + comment commment + function header of function or procudure + title function name inside a header + params everything in parentheses inside a function header + preprocessor preprocessor directive + +AVR assembler ("avrasm"): + + keyword keyword + built_in pre-defined register + number number + string string + comment commment + label label + preprocessor preprocessor directive + localvars substitution in .macro + +VHDL ("vhdl") + + keyword keyword + number number + string string + comment commment + literal signal logical value + typename typename + attribute signal attribute + +Parser3 ("parser3"): + + keyword keyword + number number + comment commment + variable variable starting with "$" + preprocessor preprocessor directive + title user-defined name starting with "@" + +TeX ("tex"): + + comment comment + number number + command command + parameter parameter + formula formula + special special symbol + +Haskell ("haskell"): + + keyword keyword + number number + string string + comment comment + class type classes and other data types + title function name + type type class name + typedef definition of types (type, newtype, data) + +Erlang ("erlang"): + + comment comment + string string + number number + keyword keyword + record_name record access (#record_name) + title name of declaration function + variable variable (starts with capital letter or with _) + pp.keywords module's attribute (-attribute) + function_name atom or atom:atom in case of function call + +Rust ("rust"): + + comment comment + string string + number number + keyword keyword + title name of declaration + preprocessor preprocessor directive + +Matlab ("matlab"): + + comment comment + string string + number number + keyword keyword + title function name + function function + param params of function + +R ("r"): + + comment comment + string string constant + number number + keyword language keywords (function, if) plus "structural" + functions (attach, require, setClass) + literal special literal: TRUE, FALSE, NULL, NA, etc. + +OpenGL Shading Language ("glsl"): + + comment comment + number number + preprocessor preprocessor directive + keyword keyword + built_in GLSL built-in functions and variables + literal true false diff --git a/css/highlight/default.min.css b/css/highlight/default.min.css new file mode 100644 index 0000000..b4bd70a --- /dev/null +++ b/css/highlight/default.min.css @@ -0,0 +1 @@ +pre code{display:block;padding:.5em;background:#f0f0f0}pre code,pre .ruby .subst,pre .tag .title,pre .lisp .title,pre .nginx .title{color:black}pre .string,pre .title,pre .constant,pre .parent,pre .tag .value,pre .rules .value,pre .rules .value .number,pre .preprocessor,pre .ruby .symbol,pre .ruby .symbol .string,pre .ruby .symbol .keyword,pre .ruby .symbol .keymethods,pre .instancevar,pre .aggregate,pre .template_tag,pre .django .variable,pre .smalltalk .class,pre .addition,pre .flow,pre .stream,pre .bash .variable,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .tex .special,pre .erlang_repl .function_or_atom,pre .markdown .header{color:#800}pre .comment,pre .annotation,pre .template_comment,pre .diff .header,pre .chunk,pre .markdown .blockquote{color:#888}pre .number,pre .date,pre .regexp,pre .literal,pre .smalltalk .symbol,pre .smalltalk .char,pre .go .constant,pre .change,pre .markdown .bullet,pre .markdown .link_url{color:#080}pre .label,pre .javadoc,pre .ruby .string,pre .decorator,pre .filter .argument,pre .localvars,pre .array,pre .attr_selector,pre .important,pre .pseudo,pre .pi,pre .doctype,pre .deletion,pre .envvar,pre .shebang,pre .apache .sqbracket,pre .nginx .built_in,pre .tex .formula,pre .erlang_repl .reserved,pre .input_number,pre .markdown .link_label,pre .vhdl .attribute{color:#88F}pre .keyword,pre .id,pre .phpdoc,pre .title,pre .built_in,pre .aggregate,pre .css .tag,pre .javadoctag,pre .phpdoc,pre .yardoctag,pre .smalltalk .class,pre .winutils,pre .bash .variable,pre .apache .tag,pre .go .typename,pre .tex .command,pre .markdown .strong,pre .request,pre .status{font-weight:bold}pre .markdown .emphasis{font-style:italic}pre .nginx .built_in{font-weight:normal}pre .coffeescript .javascript,pre .xml .css,pre .xml .javascript,pre .xml .vbscript,pre .tex .formula{opacity:.5} \ No newline at end of file diff --git a/css/highlight/highlight.pack.js b/css/highlight/highlight.pack.js new file mode 100644 index 0000000..f2f6b02 --- /dev/null +++ b/css/highlight/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("")}while(p!=v.node);s.splice(r,1);while(r'+N[0]+""}else{r+=N[0]}P=Q.lR.lastIndex;N=Q.lR.exec(M)}return r+M.substr(P)}function B(M,N){var r;if(N.sL==""){r=g(M)}else{r=d(N.sL,M)}if(N.r>0){y+=r.keyword_count;C+=r.r}return''+r.value+""}function K(r,M){if(M.sL&&e[M.sL]||M.sL==""){return B(r,M)}else{return G(r,M)}}function J(N,r){var M=N.cN?'':"";if(N.rB){z+=M;N.buffer=""}else{if(N.eB){z+=m(r)+M;N.buffer=""}else{z+=M;N.buffer=r}}p.push(N);C+=N.r}function H(O,N,R){var S=p[p.length-1];if(R){z+=K(S.buffer+O,S);return false}var Q=s(N,S);if(Q){z+=K(S.buffer+O,S);J(Q,N);return Q.rB}var M=w(p.length-1,N);if(M){var P=S.cN?"":"";if(S.rE){z+=K(S.buffer+O,S)+P}else{if(S.eE){z+=K(S.buffer+O,S)+P+m(N)}else{z+=K(S.buffer+O+N,S)+P}}while(M>1){P=p[p.length-2].cN?"":"";z+=P;M--;p.length--}var r=p[p.length-1];p.length--;p[p.length-1].buffer="";if(r.starts){J(r.starts,"")}return S.rE}if(x(N,S)){throw"Illegal"}}var F=e[D];var p=[F.dM];var C=0;var y=0;var z="";try{var t,v=0;F.dM.buffer="";do{t=q(E,v);var u=H(t[0],t[1],t[2]);v+=t[0].length;if(!u){v+=t[1].length}}while(!t[2]);return{r:C,keyword_count:y,value:z,language:D}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:m(E)}}else{throw I}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"
")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v=="no-highlight"){return}if(v){y=d(v,x)}else{y=g(x);v=y.language}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="
"+y.value+"
";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.javascript=function(a){return{dM:{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",c:[{b:"\\\\/"}]}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[a.NM,a.ASM,a.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}}(hljs); \ No newline at end of file diff --git a/css/highlight/styles/arta.css b/css/highlight/styles/arta.css new file mode 100644 index 0000000..04961b2 --- /dev/null +++ b/css/highlight/styles/arta.css @@ -0,0 +1,153 @@ +/* +Date: 17.V.2011 +Author: pumbur +*/ + +pre code +{ + display: block; padding: 0.5em; + background: #222; +} + +pre .profile .header *, +pre .ini .title, +pre .nginx .title +{ + color: #fff; +} + +pre .comment, +pre .javadoc, +pre .preprocessor, +pre .preprocessor .title, +pre .shebang, +pre .profile .summary, +pre .diff, +pre .pi, +pre .doctype, +pre .tag, +pre .template_comment, +pre .css .rules, +pre .tex .special +{ + color: #444; +} + +pre .string, +pre .symbol, +pre .diff .change, +pre .regexp, +pre .xml .attribute, +pre .smalltalk .char, +pre .xml .value, +pre .ini .value +{ + color: #ffcc33; +} + +pre .number, +pre .addition +{ + color: #00cc66; +} + +pre .built_in, +pre .literal, +pre .vhdl .typename, +pre .go .constant, +pre .go .typename, +pre .ini .keyword, +pre .lua .title, +pre .perl .variable, +pre .php .variable, +pre .mel .variable, +pre .django .variable, +pre .css .funtion, +pre .smalltalk .method, +pre .hexcolor, +pre .important, +pre .flow, +pre .inheritance, +pre .parser3 .variable +{ + color: #32AAEE; +} + +pre .keyword, +pre .tag .title, +pre .css .tag, +pre .css .class, +pre .css .id, +pre .css .pseudo, +pre .css .attr_selector, +pre .lisp .title, +pre .winutils, +pre .tex .command, +pre .request, +pre .status +{ + color: #6644aa; +} + +pre .title, +pre .ruby .constant, +pre .vala .constant, +pre .parent, +pre .deletion, +pre .template_tag, +pre .css .keyword, +pre .objectivec .class .id, +pre .smalltalk .class, +pre .lisp .keyword, +pre .apache .tag, +pre .nginx .variable, +pre .envvar, +pre .bash .variable, +pre .go .built_in, +pre .vbscript .built_in, +pre .lua .built_in, +pre .rsl .built_in, +pre .tail, +pre .avrasm .label, +pre .tex .formula, +pre .tex .formula * +{ + color: #bb1166; +} + +pre .yardoctag, +pre .phpdoc, +pre .profile .header, +pre .ini .title, +pre .apache .tag, +pre .parser3 .title +{ + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .xml .javascript, +pre .xml .css, +pre .xml .cdata +{ + opacity: 0.6; +} + +pre code, +pre .javascript, +pre .css, +pre .xml, +pre .subst, +pre .diff .chunk, +pre .css .value, +pre .css .attribute, +pre .lisp .string, +pre .lisp .number, +pre .tail .params, +pre .container, +pre .haskell *, +pre .erlang *, +pre .erlang_repl * +{ + color: #aaa; +} diff --git a/css/highlight/styles/ascetic.css b/css/highlight/styles/ascetic.css new file mode 100644 index 0000000..891530a --- /dev/null +++ b/css/highlight/styles/ascetic.css @@ -0,0 +1,49 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: white; color: black; +} + +pre .string, +pre .tag .value, +pre .filter .argument, +pre .addition, +pre .change, +pre .apache .tag, +pre .apache .cbracket, +pre .nginx .built_in, +pre .tex .formula { + color: #888; +} + +pre .comment, +pre .template_comment, +pre .shebang, +pre .doctype, +pre .pi, +pre .javadoc, +pre .deletion, +pre .apache .sqbracket { + color: #CCC; +} + +pre .keyword, +pre .tag .title, +pre .ini .title, +pre .lisp .title, +pre .http .title, +pre .nginx .title, +pre .css .tag, +pre .winutils, +pre .flow, +pre .apache .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; +} diff --git a/css/highlight/styles/brown_paper.css b/css/highlight/styles/brown_paper.css new file mode 100644 index 0000000..553cbbc --- /dev/null +++ b/css/highlight/styles/brown_paper.css @@ -0,0 +1,104 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura + +*/ + +pre code { + display: block; padding: 0.5em; + background:#b7a68e url(./brown_papersq.png); +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .nginx .title, +pre .tex .special, +pre .request, +pre .status { + color:#005599; + font-weight:bold; +} + +pre code, +pre .ruby .subst, +pre .tag .keyword { + color: #363C69; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .ruby .instancevar, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .number { + color: #2C009F; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula { + color: #802022; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .command { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.8; +} diff --git a/css/highlight/styles/brown_papersq.png b/css/highlight/styles/brown_papersq.png new file mode 100644 index 0000000000000000000000000000000000000000..3813903dbf9fa7b1fb5bd11d9534c06667d9056f GIT binary patch literal 18198 zcmZsCRajhYlWil7yGw9LaCaw2kl^kP!M%at?m>cka0u>ctf6s&e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..e2bff00 --- /dev/null +++ b/css/highlight/styles/dark.css @@ -0,0 +1,103 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #444; +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .nginx .title, +pre .tex .special { + color: white; +} + +pre code, +pre .ruby .subst { + color: #DDD; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .ini .title, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .ruby .instancevar, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .input_number { + color: #D88; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #777; +} + +pre .keyword, +pre .literal, +pre .title, +pre .css .id, +pre .phpdoc, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} diff --git a/css/highlight/styles/default.css b/css/highlight/styles/default.css new file mode 100644 index 0000000..8717dd4 --- /dev/null +++ b/css/highlight/styles/default.css @@ -0,0 +1,133 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #F0F0F0; +} + +pre code, +pre .ruby .subst, +pre .tag .title, +pre .lisp .title, +pre .nginx .title { + color: black; +} + +pre .string, +pre .title, +pre .constant, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .instancevar, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .tex .special, +pre .erlang_repl .function_or_atom, +pre .markdown .header { + color: #800; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .markdown .blockquote { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .go .constant, +pre .change, +pre .markdown .bullet, +pre .markdown .link_url { + color: #080; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .important, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .erlang_repl .reserved, +pre .input_number, +pre .markdown .link_label, +pre .vhdl .attribute { + color: #88F +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .css .tag, +pre .javadoctag, +pre .phpdoc, +pre .yardoctag, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .go .typename, +pre .tex .command, +pre .markdown .strong, +pre .request, +pre .status { + font-weight: bold; +} + +pre .markdown .emphasis { + font-style: italic; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} diff --git a/css/highlight/styles/far.css b/css/highlight/styles/far.css new file mode 100644 index 0000000..ab2708d --- /dev/null +++ b/css/highlight/styles/far.css @@ -0,0 +1,110 @@ +/* + +FAR Style (c) MajestiC + +*/ + +pre code { + display: block; padding: 0.5em; + background: #000080; +} + +pre code, +.ruby .subst { + color: #0FF; +} + +pre .string, +pre .ruby .string, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .css .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command { + color: #FF0; +} + +pre .keyword, +pre .css .id, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .xml .tag .title, +pre .winutils, +pre .flow, +pre .change, +pre .envvar, +pre .bash .variable, +pre .tex .special { + color: #FFF; +} + +pre .comment, +pre .phpdoc, +pre .javadoc, +pre .java .annotation, +pre .template_comment, +pre .deletion, +pre .apache .sqbracket, +pre .tex .formula { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char { + color: #0F0; +} + +pre .python .decorator, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .xml .pi, +pre .diff .header, +pre .chunk, +pre .shebang, +pre .nginx .built_in, +pre .input_number { + color: #008080; +} + +pre .keyword, +pre .css .id, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .winutils, +pre .flow, +pre .apache .tag, +pre .nginx .built_in, +pre .tex .command, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} diff --git a/css/highlight/styles/github.css b/css/highlight/styles/github.css new file mode 100644 index 0000000..266a3d5 --- /dev/null +++ b/css/highlight/styles/github.css @@ -0,0 +1,133 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #998; + font-style: italic +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title, +pre .nginx .title, +pre .subst, +pre .request, +pre .status { + color: #000; + font-weight: bold +} + +pre .number, +pre .hexcolor { + color: #40a070 +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #d14 +} + +pre .title, +pre .id { + color: #900; + font-weight: bold +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .type, +pre .vhdl .literal, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #009926 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} diff --git a/css/highlight/styles/googlecode.css b/css/highlight/styles/googlecode.css new file mode 100644 index 0000000..e4b7685 --- /dev/null +++ b/css/highlight/styles/googlecode.css @@ -0,0 +1,146 @@ +/* + ## Code Highlighting + + **No sample** + +Google Code style (c) Aahan Krish + +*/ + +pre code { + display: block; padding: 0.5em; + background: white; color: black; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .comment * { + color: #800; +} + +pre .keyword, +pre .method, +pre .list .title, +pre .nginx .title, +pre .tag .title, +pre .setting .value, +pre .winutils, +pre .tex .command, +pre .http .title, +pre .request, +pre .status { + color: #008; +} + +pre .envvar, +pre .tex .special { + color: #660; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .regexp { + color: #080; +} + +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .ini .title, +pre .shebang, +pre .input_number, +pre .hexcolor, +pre .rules .value, +pre .css .value .number, +pre .literal, +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .number, +pre .css .function { + color: #066; +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .typename, +pre .tag .attribute, +pre .doctype, +pre .class .id, +pre .built_in, +pre .setting, +pre .params, +pre .variable { + color: #606; +} + +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .subst { + color: #000; +} + +pre .css .class, pre .css .id { + color: #9B703F; +} + +pre .value .important { + color: #ff7700; + font-weight: bold; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor * { + color: #444; +} + +pre .tex .formula { + background-color: #EEE; + font-style: italic; +} + +pre .diff .header, +pre .chunk { + color: #808080; + font-weight: bold; +} + +pre .diff .change { + background-color: #BCCFF9; +} + +pre .addition { + background-color: #BAEEBA; +} + +pre .deletion { + background-color: #FFC8BD; +} + +pre .comment .yardoctag { + font-weight: bold; +} diff --git a/css/highlight/styles/idea.css b/css/highlight/styles/idea.css new file mode 100644 index 0000000..5285c9a --- /dev/null +++ b/css/highlight/styles/idea.css @@ -0,0 +1,122 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #fff; +} + +pre .subst, +pre .title { + font-weight: normal; + color: #000; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .diff .header { + color: #808080; + font-style: italic; +} + +pre .annotation, +pre .decorator, +pre .preprocessor, +pre .doctype, +pre .pi, +pre .chunk, +pre .shebang, +pre .apache .cbracket, +pre .input_number, +pre .http .title { + color: #808000; +} + +pre .tag, +pre .pi { + background: #efefef; +} + +pre .tag .title, +pre .id, +pre .attr_selector, +pre .pseudo, +pre .literal, +pre .keyword, +pre .hexcolor, +pre .css .function, +pre .ini .title, +pre .css .class, +pre .list .title, +pre .nginx .title, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; + color: #000080; +} + +pre .attribute, +pre .rules .keyword, +pre .number, +pre .date, +pre .regexp, +pre .tex .special { + font-weight: bold; + color: #0000ff; +} + +pre .number, +pre .regexp { + font-weight: normal; +} + +pre .string, +pre .value, +pre .filter .argument, +pre .css .function .params, +pre .apache .tag { + color: #008000; + font-weight: bold; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .char, +pre .tex .formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +pre .phpdoc, +pre .yardoctag, +pre .javadoctag { + text-decoration: underline; +} + +pre .variable, +pre .envvar, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #660e7a; +} + +pre .addition { + background: #baeeba; +} + +pre .deletion { + background: #ffc8bd; +} + +pre .diff .change { + background: #bccff9; +} diff --git a/css/highlight/styles/ir_black.css b/css/highlight/styles/ir_black.css new file mode 100644 index 0000000..3b1ac14 --- /dev/null +++ b/css/highlight/styles/ir_black.css @@ -0,0 +1,99 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko +*/ + +pre code { + display: block; padding: 0.5em; + background: #000; color: #f8f8f8; +} + +pre .shebang, +pre .comment, +pre .template_comment, +pre .javadoc { + color: #7c7c7c; +} + +pre .keyword, +pre .tag, +pre .tex .command, +pre .request, +pre .status { + color: #96CBFE; +} + +pre .sub .keyword, +pre .method, +pre .list .title, +pre .nginx .title { + color: #FFFFB6; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date { + color: #A8FF60; +} + +pre .subst { + color: #DAEFA3; +} + +pre .regexp { + color: #E9C062; +} + +pre .title, +pre .sub .identifier, +pre .pi, +pre .decorator, +pre .tex .special, +pre .haskell .type, +pre .constant, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .nginx .built_in { + color: #FFFFB6; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .number, +pre .variable, +pre .vbscript, +pre .literal { + color: #C6C5FE; +} + +pre .css .tag { + color: #96CBFE; +} + +pre .css .rules .property, +pre .css .id { + color: #FFFFB6; +} + +pre .css .class { + color: #FFF; +} + +pre .hexcolor { + color: #C6C5FE; +} + +pre .number { + color:#FF73FD; +} + +pre .tex .formula { + opacity: 0.7; +} diff --git a/css/highlight/styles/magula.css b/css/highlight/styles/magula.css new file mode 100644 index 0000000..72c2582 --- /dev/null +++ b/css/highlight/styles/magula.css @@ -0,0 +1,120 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +pre code { + display: block; padding: 0.5em; + background-color: #f4f4f4; +} + +pre code, +pre .ruby .subst, +pre .lisp .title { + color: black; +} + +pre .string, +pre .title, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .instancevar, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .cbracket { + color: #050; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk { + color: #777; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .change, +pre .tex .special { + color: #800; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .input_number { + color: #00e; +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .xml .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; + color: navy; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} + +/* --- */ +pre .apache .tag { + font-weight: bold; + color: blue; +} + diff --git a/css/highlight/styles/monokai.css b/css/highlight/styles/monokai.css new file mode 100644 index 0000000..baeb85b --- /dev/null +++ b/css/highlight/styles/monokai.css @@ -0,0 +1,116 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +pre code { + display: block; padding: 0.5em; + background: #272822; +} + +pre .params .identifier .keymethods { + color: #FD971F; +} + +pre .tag, +pre .tag .title, +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .nginx .title, +pre .tex .special { + color: #F92672; +} + +pre code { + color: #DDD; +} + +pre code .constant { + color: #66D9EF; +} + +pre .class .title { + color: white; +} + +pre .attribute, +pre .symbol, +pre .value, +pre .regexp { + color: #BF79DB; +} + +pre .tag .value, +pre .string, +pre .ruby .subst, +pre .title, +pre .haskell .type, +pre .preprocessor, +pre .ruby .instancevar, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .input_number { + color: #A6E22E; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #75715E; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} diff --git a/css/highlight/styles/pojoaque.css b/css/highlight/styles/pojoaque.css new file mode 100644 index 0000000..2938056 --- /dev/null +++ b/css/highlight/styles/pojoaque.css @@ -0,0 +1,106 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +pre code { + display: block; padding: 0.5em; + color: #DCCF8F; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .lisp .string, +pre .javadoc { + color: #586e75; + font-style: italic; +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .method, +pre .addition, +pre .css .tag, +pre .lisp .title, +pre .nginx .title { + color: #B64926; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #468966; +} + +pre .title, +pre .localvars, +pre .function .title, +pre .chunk, +pre .decorator, +pre .builtin, +pre .built_in, +pre .lisp .title, +pre .identifier, +pre .title .keymethods, +pre .id { + color: #FFB03B; +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .css .attribute { + color: #b89859; +} + +pre .css .number,pre .css .hexcolor{ + color: #DCCF8F; +} + +pre .css .class { + color: #d3a60c; +} + +pre .preprocessor, +pre .pi, +pre .shebang, +pre .symbol, +pre .diff .change, +pre .special, +pre .keymethods, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #073642; +} diff --git a/css/highlight/styles/pojoaque.jpg b/css/highlight/styles/pojoaque.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9c07d4ab40b6d77e90ff69f0012bcd33b21d31c3 GIT binary patch literal 1186 zcmZXSe^8Tk9LK-kXFs3)f@f?)Cddzw3v4wdZyXQ;4x3=;Ja*N#%n9ik!UGmt9H3k0 zJST|5jOc(ID$FQt3C?jQZBws#kXolO1lg9Pba9BB=Q+UEBX!nY@6Uhl&+ofe$Q$y5 z@ci`~)&qzDP(lOiQ5p?p z(`j^e7!yUAVHk%K#^GQXn?s0=VLYCI$HRoe=xCuZ>A6A3@sxEP#XqNFpIb=0)KQ#Nss_tD17;m4@$JKL;LR|K|QF3f%!L5+s(9Ft8SQ zG|~pGpEGFW5Z|OA)-O@mNHy-g@7m8JTf?kl@vUKBGmw)Y*9sDRNr3PN!IKefWaydTe1D zjzpyzPnD3}hBNaS4aFX7=0&~I*Hu7#4au@qVBglH#-m;QFOx_`=j z{EqRY#Eh*yoWP^pa4H>8GH{rO?!_+xwL0(k4yL^D%^nBkJ*UI;Lx;ped8d|f*S_s@ z3~ilcRC(&NT#9Gn#UD;o^EYSMXDMf%XcUi3>;WXXD-QX3P9wMyP7eA&RS{)h5{??W3^Rq=goFJ>?lA~J- zdYe>!xvYLW*fPT0RK7wsJRg^?x#W1*GP9_f`6t>QD_X>0d!owyN>nO2?U5}|3?hX_UZYT@^>S!9eB~bZ9U`q;`U)@L670o1g z`Hd}h<_WRvUc|n*%v4Hbb-4tJD40iyF^q%g*&!6>hkYDvi-{Uc4yTM zzcthN4Z{ka!+F_KzYV#yWi;c^X^q6g`pD8cp?$Kl?hCz0s^a|mH%P!CF%*<6k^~i` zT5Mi-t5-frUcHkk^Qh}+N)Kz1&Bi95`oNc|quI>tUi~BY>xcF9(%tv2i{G6kE9*q~ qCoAGl20`)w0rdgp9H%Q=M5|p`hOhFz6$I%Y&ncY8>c?7PXyh+SL&XXJ literal 0 HcmV?d00001 diff --git a/css/highlight/styles/school_book.css b/css/highlight/styles/school_book.css new file mode 100644 index 0000000..afd4334 --- /dev/null +++ b/css/highlight/styles/school_book.css @@ -0,0 +1,111 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura + +*/ + +pre code { + display: block; padding: 15px 0.5em 0.5em 30px; + font-size: 11px !important; + line-height:16px !important; +} + +pre{ + background:#f6f6ae url(./school_book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .nginx .title, +pre .tex .special { + color:#005599; + font-weight:bold; +} + +pre code, +pre .ruby .subst, +pre .tag .keyword { + color: #3E5915; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .ruby .instancevar, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .nginx .built_in, +pre .tex .command { + color: #2C009F; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket { + color: #E60415; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .xml .tag .title, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} diff --git a/css/highlight/styles/school_book.png b/css/highlight/styles/school_book.png new file mode 100644 index 0000000000000000000000000000000000000000..956e9790a0e2c079b3d568348ff3accd1d9cac30 GIT binary patch literal 486 zcmeAS@N?(olHy`uVBq!ia0y~yV7?7x3vjRjNjAS6Ga$v1?&#~tz_9*=IcwKTAYZb? zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkD0|R4)r;B4q#jQ7Ycl#YS5MfK$ z?b^fh#qmaEhFDxvyThwfhdfkOPApt1lr{NA;Vr%uzxJuVIyzm(ed_8_-0$LLU})H&o5Re&aDemE>EG#(|F^t9_pa-H z_Mf?rMVrs}-M?S|?ZdY@c6s41zy8~}@a{v&#Ea7V)wJ$+#K|u$5UvWCdFLwGac}6w{_s*=8A6L7Rfc|9gboFyt I=akR{0OLZ+qyPW_ literal 0 HcmV?d00001 diff --git a/css/highlight/styles/solarized_dark.css b/css/highlight/styles/solarized_dark.css new file mode 100644 index 0000000..aebb8da --- /dev/null +++ b/css/highlight/styles/solarized_dark.css @@ -0,0 +1,90 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +pre code { + display: block; padding: 0.5em; + background: #002b36; color: #839496; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .pi, +pre .lisp .string, +pre .javadoc { + color: #586e75; + font-style: italic; +} + +pre .keyword, +pre .winutils, +pre .method, +pre .addition, +pre .css .tag, +pre .request, +pre .status, +pre .nginx .title { + color: #859900; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #2aa198; +} + +pre .title, +pre .localvars, +pre .chunk, +pre .decorator, +pre .builtin, +pre .built_in, +pre .identifier, +pre .title .keymethods, +pre .vhdl .literal, +pre .id { + color: #268bd2; +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .preprocessor, +pre .preprocessor .keyword, +pre .shebang, +pre .symbol, +pre .diff .change, +pre .special, +pre .keymethods, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #073642; +} diff --git a/css/highlight/styles/solarized_light.css b/css/highlight/styles/solarized_light.css new file mode 100644 index 0000000..456c911 --- /dev/null +++ b/css/highlight/styles/solarized_light.css @@ -0,0 +1,90 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +pre code { + display: block; padding: 0.5em; + background: #fdf6e3; color: #657b83; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .pi, +pre .lisp .string, +pre .javadoc { + color: #93a1a1; + font-style: italic; +} + +pre .keyword, +pre .winutils, +pre .method, +pre .addition, +pre .css .tag, +pre .request, +pre .status, +pre .nginx .title { + color: #859900; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #2aa198; +} + +pre .title, +pre .localvars, +pre .chunk, +pre .decorator, +pre .builtin, +pre .built_in, +pre .identifier, +pre .title .keymethods, +pre .vhdl .literal, +pre .id { + color: #268bd2; +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .preprocessor, +pre .preprocessor .keyword, +pre .shebang, +pre .symbol, +pre .diff .change, +pre .special, +pre .keymethods, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #eee8d5; +} diff --git a/css/highlight/styles/sunburst.css b/css/highlight/styles/sunburst.css new file mode 100644 index 0000000..b9f90fe --- /dev/null +++ b/css/highlight/styles/sunburst.css @@ -0,0 +1,149 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + background: #000; color: #f8f8f8; +} + +pre .comment, +pre .template_comment, +pre .javadoc { + color: #aeaeae; + font-style: italic; +} + +pre .keyword, +pre .ruby .function .keyword, +pre .request, +pre .status, +pre .nginx .title { + color: #E28964; +} + +pre .function .keyword, +pre .sub .keyword, +pre .method, +pre .list .title { + color: #99CF50; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .tex .command { + color: #65B042; +} + +pre .subst { + color: #DAEFA3; +} + +pre .regexp { + color: #E9C062; +} + +pre .title, +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .shebang, +pre .input_number { + color: #89BDFF; +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc { + text-decoration: underline; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .number { + color: #3387CC; +} + +pre .params, +pre .variable { + color: #3E87E3; +} + +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .tex .special { + color: #CDA869; +} + +pre .css .class { + color: #9B703F; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .rules .value { + color: #CF6A4C; +} + +pre .css .id { + color: #8B98AB; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor { + color: #8996A8; +} + +pre .hexcolor, +pre .css .value .number { + color: #DD7B3B; +} + +pre .css .function { + color: #DAD085; +} + +pre .diff .header, +pre .chunk, +pre .tex .formula { + background-color: #0E2231; + color: #F8F8F8; + font-style: italic; +} + +pre .diff .change { + background-color: #4A410D; + color: #F8F8F8; +} + +pre .addition { + background-color: #253B22; + color: #F8F8F8; +} + +pre .deletion { + background-color: #420E09; + color: #F8F8F8; +} diff --git a/css/highlight/styles/vs.css b/css/highlight/styles/vs.css new file mode 100644 index 0000000..c20bf0e --- /dev/null +++ b/css/highlight/styles/vs.css @@ -0,0 +1,85 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond + +*/ +pre code { + display: block; padding: 0.5em; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .apache .cbracket { + color: rgb(0, 128, 0); +} + +pre .keyword, +pre .id, +pre .built_in, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .tex .command, +pre .request, +pre .status, +pre .nginx .title { + color: rgb(0, 0, 255); +} + +pre .string, +pre .title, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .instancevar, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .addition, +pre .flow, +pre .stream, +pre .apache .tag, +pre .date, +pre .tex .formula { + color: rgb(163, 21, 21); +} + +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .preprocessor, +pre .userType, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .special, +pre .input_number { + color: rgb(43, 145, 175); +} + +pre .phpdoc, +pre .javadoc, +pre .xmlDocTag { + color: rgb(128, 128, 128); +} + +pre .vhdl .typename { font-weight: bold; } +pre .vhdl .string { color: #666666; } +pre .vhdl .literal { color: rgb(163, 21, 21); } +pre .vhdl .attribute { color: #00B0E8; } diff --git a/css/highlight/styles/xcode.css b/css/highlight/styles/xcode.css new file mode 100644 index 0000000..dba0f1a --- /dev/null +++ b/css/highlight/styles/xcode.css @@ -0,0 +1,153 @@ +/* + +XCode style (c) Angel Garcia + +*/ + +pre code { + display: block; padding: 0.5em; + background: #fff; color: black; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .comment * { + color: rgb(0,106,0); +} + +pre .keyword, +pre .literal, +pre .nginx .title { + color: rgb(170,13,145); +} +pre .method, +pre .list .title, +pre .tag .title, +pre .setting .value, +pre .winutils, +pre .tex .command, +pre .http .title, +pre .request, +pre .status { + color: #008; +} + +pre .envvar, +pre .tex .special { + color: #660; +} + +pre .string { + color: rgb(196,26,22); +} +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .regexp { + color: #080; +} + +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .ini .title, +pre .shebang, +pre .input_number, +pre .hexcolor, +pre .rules .value, +pre .css .value .number, +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .number, +pre .css .function { + color: rgb(28,0,207); +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .typename, +pre .tag .attribute, +pre .doctype, +pre .class .id, +pre .built_in, +pre .setting, +pre .params { + color: rgb(92,38,153); +} + +pre .variable { + color: rgb(63,110,116); +} +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .subst { + color: #000; +} + +pre .css .class, pre .css .id { + color: #9B703F; +} + +pre .value .important { + color: #ff7700; + font-weight: bold; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor * { + color: rgb(100,56,32); +} + +pre .tex .formula { + background-color: #EEE; + font-style: italic; +} + +pre .diff .header, +pre .chunk { + color: #808080; + font-weight: bold; +} + +pre .diff .change { + background-color: #BCCFF9; +} + +pre .addition { + background-color: #BAEEBA; +} + +pre .deletion { + background-color: #FFC8BD; +} + +pre .comment .yardoctag { + font-weight: bold; +} + +pre .method .id { + color: #000; +} diff --git a/css/highlight/styles/zenburn.css b/css/highlight/styles/zenburn.css new file mode 100644 index 0000000..aa6208c --- /dev/null +++ b/css/highlight/styles/zenburn.css @@ -0,0 +1,115 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov +based on dark.css by Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #3F3F3F; + color: #DCDCDC; +} + +pre .keyword, +pre .tag, +pre .css .class, +pre .css .id, +pre .lisp .title, +pre .nginx .title, +pre .request, +pre .status { + color: #E3CEAB; +} + +pre .django .template_tag, +pre .django .variable, +pre .django .filter .argument { + color: #DCDCDC; +} + +pre .number, +pre .date { + color: #8CD0D3; +} + +pre .dos .envvar, +pre .dos .stream, +pre .variable, +pre .apache .sqbracket { + color: #EFDCBC; +} + +pre .dos .flow, +pre .diff .change, +pre .python .exception, +pre .python .built_in, +pre .literal, +pre .tex .special { + color: #EFEFAF; +} + +pre .diff .chunk, +pre .ruby .subst { + color: #8F8F8F; +} + +pre .dos .keyword, +pre .python .decorator, +pre .title, +pre .haskell .type, +pre .diff .header, +pre .ruby .class .parent, +pre .apache .tag, +pre .nginx .built_in, +pre .tex .command, +pre .input_number { + color: #efef8f; +} + +pre .dos .winutils, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .ruby .string, +pre .ruby .instancevar { + color: #DCA3A3; +} + +pre .diff .deletion, +pre .string, +pre .tag .value, +pre .preprocessor, +pre .built_in, +pre .sql .aggregate, +pre .javadoc, +pre .smalltalk .class, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .css .rules .value, +pre .attr_selector, +pre .pseudo, +pre .apache .cbracket, +pre .tex .formula { + color: #CC9393; +} + +pre .shebang, +pre .diff .addition, +pre .comment, +pre .java .annotation, +pre .template_comment, +pre .pi, +pre .doctype { + color: #7F9F7F; +} + +pre .coffeescript .javascript, +pre .xml .css, +pre .xml .javascript, +pre .xml .vbscript, +pre .tex .formula { + opacity: 0.5; +} + diff --git a/css/home.css b/css/home.css new file mode 100644 index 0000000..8133079 --- /dev/null +++ b/css/home.css @@ -0,0 +1,213 @@ +/* +## Home page styles + + +Main tagline + +``` +
+GREAT APPS START WITH GREAT APIs +
+``` +Tagline description + +``` +
+Turbo-charge your APIs with our secure & collaborative API document builder and distribution platform +
+``` + +## Social network bar + +``` +
+
+ +
+ +
+ +``` + +*/ + +.prompts-copy{ + font-family: 'Nexa'; + color: #eee; + font-size: 18px; + padding: 0 10px; +} +.slides-container { + width: 1040px; + margin: auto; + padding-top: 24px; + height: 315px; + overflow: hidden; +} +.slide { + position: relative; +} +#swiffycontainer, #swiffycontainer2 , #swiffycontainer3{ + position: absolute; + right: -500px; +} +.slide .heading-container { + position: absolute; + margin-left: 40px; + top: -150px; +} +.slide .heading-container .heading { + margin-bottom: 15px; + letter-spacing: 2px; +} +.slide .tag { + position: absolute; + bottom: 600px; + width: 515px; + margin-left: 40px; +} + + +.social-networks-container { + text-align: center; + padding: 15px 0; +} +.social-networks { + display: inline-block; + padding: 0; +} +.social-networks span { + color: #EEE; + font-family: 'Nexa'; + font-size: 18px; + display: inline-block; + height: 48px; + float: left; + line-height: 52px; + margin-right: 30px; +} +.social-networks .social-icon { + margin-right: 30px; +} +.slide .heading { + font-family: 'Nexa Bold'; + font-size: 30px; + background: #ea2452; + display: inline-block; + color: #fff; + padding: 10px; + line-height: 25px; +} +.slide .tag { + color: #333332; + font-family: 'Nexa'; + font-size: 24px; + display: inline-block; +} +.our-apis-desc { + width: 710px; + float: left; + color: #fff; + font-family: 'Nexa'; + font-size: 24px; + margin-top: 30px; + margin-bottom: 50px; + display: inline-block; + +} +.our-apis-desc a { + color: #FED563; +} +.our-apis-desc a:hover { + color:#171717; +} +.tagline { + display: block; + text-align: center; +} + +.home-slider { + margin: auto; + width: 60px; +} +.signup-bar-container { + text-align: center; + padding:20px 0; +} +.signup-bar { + display: inline-block; +} +.signup-bar .one-hundred-percent { + color: #fff; + margin-left: 10px; + margin-right: 10px; + top: 5px; + position: relative; +} +.home-heading { + padding-top: 60px; + padding-bottom: 60px; + margin: 0; + text-align: center; + color: #FFF; + font-size: 30px; +} + +.home-heading, .red-panel{ + color: #fff; + letter-spacing: 2px; +} +.feature-box { + float: left; + width: 290px; + margin-right: 77px; + color: #fed563; + font-size: 20px; + text-align: left; +} +.feature-box.last { + margin-right: 0; +} +p.feature-description { +line-height: 24px; +color: white; +font-size: 18px; +font-family: 'Nexa'; +margin: auto; +padding-bottom: 80px; +} + +.blue-panel-feature-headings{ + margin: 30px 0 15px 0; + text-align: center; +} +.one-hundred-percent{ + background: url('../img/backgrounds/100-percent-free.png'); + width:165px; + height:23px; + display:inline-block; +} + +.feature-1 { + background: url('../img/hp-feature-1.png'); + width: 222px; + height: 222px; +} +.feature-2 { + background: url('../img/hp-feature-2.png'); + width: 222px; + height: 222px; +} +.feature-3 { + background: url('../img/hp-feature-3.png'); + width: 222px; + height: 222px; +} diff --git a/css/layout.css b/css/layout.css new file mode 100644 index 0000000..d104c72 --- /dev/null +++ b/css/layout.css @@ -0,0 +1,104 @@ +/* + # Material デザインに関する基本原則 + + - 空間を持ち、素材を活かす + - 影を使って質感を表現する + - マテリアルは様々な面や、高さがあるが、あくまで薄く + - 影は高さによって違和感のない自然なぼやけかた、濃さに調整する + - マテリアルに表示される要素は、あくまでマテリアルに映写されていると考える。厚みを持ってはいけない + - 要素はマテリアル内を自由に動くことができるが、それをはみ出してはいけない + - イベントが発火するのはあくまで前面にあるマテリアルのみとする + - 同じ高さのマテリアルが重なり合ってはいけない + - マテリアルの深度が変わる時、他の要素をつっきってはいけない + - 二つのペーパーが横並びないし縦並びの時は、互いの高さを変えることによって独立させわかりやすくす + - マテリアルは形状を変化することができる + - マテリアルは同じ次元のもと形を変化せさることができる + - マテリアルが折りたたまれたり、めくれたりしてはならない + - マテリアルは合わさりひとつの要素になることができる + - マテリアルはひとつのシートから複数のシートに分離したとしてももとに戻ることができる + - マテリアルは環境に応じて自発的に作成、削除される。 + - マテリアルは三次元平面において自由に移動することができる。 + - 基本的にマテリアルに対してのユーザーアクションによって高さ(z)方向へのモーションは発生する + - マテリアルの深度は親要素、子要素の深度に影響される + - マテリアルには適切な深度がある。ツールバーなら4dp、フローティングボタンは6dp、カードは2dp + - カードの上にフローティングボタンが載っている場合、差し引きで深度は2となりフローティングボタンの射影が明瞭になる + - また、ボタンが押されると6dp分深度があさくなり射影が不明瞭になる + - 見ている環境に合わせて深度も変える + - クリックされた時など、マテリアルは、6dpi深度をあげる + - ボタンの影に注意はみ出している場合は一番下の要素の影に合わせる + - 子要素はひとつの親要素をもち、相対的に変化する + - 子要素と親要素は必要最低限の深度で分離されており、その間に他の要素を入れることはできない + - アニメーションは自然加速し、自然原則するよう調整する + - 要素の消滅時に不自然に注目を集めてはならない、あくまで気付かないほど自然に消失させる + - 小さく軽いマテリアルは早く移動、重く大きいマテリアルはゆっくりと移動する + - タッチイベントなどはクリックされた位置から波紋が広がるようなアニメーションにする + - リスト要素の場合は波紋 + - ボタンならば浮かび上がりと波紋 + - マテリアルつらなりならばひとつずつ滑らかに読み込まれる + - これらはpolymerを利用して実装する + - 画像ホバーなどもあくまで波紋状に[実装](http://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-surface-reaction) + - マテリアルはクリックされたポジションから作成されるようにする + - 同じ深度のマテリアルが連なっているとき、タッチされたらその要素を浮き上がらせる + - 画面の繊維はあくまで滑らかに自然に、消失出現ではない[例](http://www.google.com/design/spec/animation/meaningful-transitions.html#meaningful-transitions-visual-continuity) + - アニメーションには一貫性を持たせる + - シームレスに画像、アイコンをいれかえる + - 色は大胆にわかりやすく + - [色見本](http://www.google.com/design/spec/style/color.html#color-color-palette) + - パレットから三色彩度を選び統一する[例](http://www.google.com/design/spec/style/color.html#color-ui-color-application) + - テキストの濃さは背景色によって[決まる](http://www.google.com/design/spec/style/color.html#color-ui-color-application) + - アクセントカラーはここぞのときに決める + - [カラーテーマ2](http://www.google.com/design/spec/style/color.html#color-themes) + - 画像は飾りではない。オーバーレイなどで強調 + - 画像にはストーリー性をもたせる、日常的なもの、親身になれる表現をする + - 画像内にもアクセントをつけて、何に注目すればいいのかを瞬時に理解させる + - 何に焦点させるかを間違えてはいけない + - 適切な画像を使用する。おすすめ変換サイト[waifu2x](http://waifu2x.udp.jp/) + - 画像を並べるとき、様々なサイズのものをならべる、小さくしたときは均一サイズ + - ダークスクリムは、理想的には内容に応じて、20%-40%の不透明度の間であるべき、光スクリムは、理想的には内容に応じて、40%-60%の不透明度の範囲であるべきである + - 拡大イメージは暗くしない + - Both Roboto and Noto have hinted and unhinted versions. Google recommends: + * Use the unhinted versions on Android and on Mac OS X, which doesn’t implement hints. + * Use hinted fonts on Chrome OS, Windows, and Linux. + - font-sizeは12,14,16,20,34,45,56,112を[もちいる](http://www.google.com/design/spec/style/typography.html#typography-typeface) + - 画像サイズなどに関しては[これ](http://www.google.com/design/spec/layout/units-measurements.html#) + - スペース 8px + - ツールバー 64px + - 空白8px + - サブタイトルリストアイテム、スライダー48px + - タイトル80px + - 高さと横幅のaspect比 16:9 3:2 4:3 1:1 3:4 2:3 + - アイコン 48px 空白 24px アバターは40px + - above The element is 48dp wide and the avatar is 40dp wide. + - Below: The element is 48dp wide and the icon is 24dp wide. + - [ヘッダー参考](http://www.google.com/design/spec/layout/structure.html#structure-app-bar) + + ボタン + 高さ:36dp + 最小幅:64dp + タフターゲット高:48dp + 水平マージン:4DP + 水平パディング:8DP + ボタン高さ36px + + - 龍騎したボタンは汎用的なものには使わない + + フラットライト/ライト​​のテーマ + 最小幅:88dp + 身長:36dp + ホバー:20%#999999 + プレス:40%の#999999 + disableテキスト:26%の#000000 + + フラットダーク/ダークテーマ + 最小幅:88dp + 身長:36dp + ホバー:15%#CCCCCC + プレス:25%#CCCCCC + disableテキスト:30%#FFFFFF + + - [ボタンデザイン](http://www.google.com/design/spec/components/buttons.html#buttons-flat-raised-buttons) + - カードは2PX丸みをもっている + - カードは均一な要素に対しは不要 + - 画像を表示するギャラリーはあくまで軽く + +*/ \ No newline at end of file diff --git a/css/styles.css b/css/styles.css new file mode 100644 index 0000000..2629aeb --- /dev/null +++ b/css/styles.css @@ -0,0 +1,23 @@ + +/* +# 俺strap + +## Design Oneハッカソン大会のためのスタイルテーマ +bootstrapのように利用して簡単にサイトを構築するためのチートシート兼CSSライブラリ + +## Getting started + +1. write the css Cord:  link rel="stylesheet" href="http://orestrap.azurewebsites.net/css/styles.css"> on your websites. +2. finish! + +## 参考サイト +[Googleマテリアル・デザインから学ぶ4つの重要ポイント + 参考UIデザイン、無料素材まとめ](http://photoshopvip.net/archives/71776) +*/ + +/* ### Layout ### */ +@import url("layout.css"); +@import url("buttons.css"); +@import url("fixie-demo.css"); + +/* ### Components ### */ +@import url("highlight/styles/googlecode.css"); diff --git a/css/styles.less b/css/styles.less new file mode 100644 index 0000000..aedd2ea --- /dev/null +++ b/css/styles.less @@ -0,0 +1,110 @@ +/* +# Kalei - Style guide +## Generates bootstrap-like documentation for your own CSS! + +This project aims at making sure your style sheets are fully documented whilst being synchronized with your webpages styles. To do this it actually uses your live stylesheets in so that at anytime you can review how your styleguide looks. + +This website is a live example generated from Kalei's style.css + + + + + +## Getting started + +1. Download the repository (`git clone git://github.com/kaleistyleguide/kaleistyleguide.git`) +2. Serve it on a HTTP server and it should work! +3. Edit `js/config.js` to point at your own `styles.css` + +### Rails Gem + +Install quickly and easily with the [rails gem](https://github.com/andrewhavens/kalei-ruby-gem) + +## Example + +Easily show off examples of your components and the HTML to generate them + +``` +
+ Compose new + + + +
+ Move to + Labels +
+
+``` + +## Main goals and benefits + +* Fully documented CSS - No need to explain the benefits +* No dependencies, simply download the repository and run in your browser +* Automatic generation of demo UI components +* Easy access for anyone, designer, developer, manager and users +* Rapid development of projects by allowing developers to find the correct CSS and HTML for any given UI component +* Open sourced so that all great ideas can be included + + + +## Author + +[Thomas Davis](http://thomasdavis.github.com) + +Luke Brooker + +Richard Barret + + + + +## Inspiration and alternatives + +Kalei is heavily influenced by the following projects and blog posts. + +[Pea.rs](http://pea.rs/) + +[KSS](http://warpspire.com/posts/kss/) + +[StyleDocco](http://jacobrask.github.com/styledocco/) + +[RJ Metrics](http://info.rjmetrics.com/blog/bid/52753/Our-Living-Style-Guide-Writing-maintainable-HTML-CSS) + +[Anchoring Your Design Language in a Live Style Guide](http://uxmag.com/articles/anchoring-your-design-language-in-a-live-style-guide) + +[Nadarei KSS](http://nadarei.co/nkss-rails/) - rails + +## Technologies + +* [marked](https://github.com/chjj/marked) +* [jscssp](http://www.glazman.org/JSCSSP/) +* cssbeautify +* [fixie](http://fixiejs.com/) +* [highlight](http://softwaremaniacs.org/soft/highlight/en/) +* [backbone](http://backbonejs.org/) +* [underscore](http://underscorejs.org/) +* [jquery](http://jquery.com) + +## License + +Public domain: http://unlicense.org/ + +## Stylesheets + +*/ + + +/* ### Third Party ### */ + +@import url("test.less"); + + +#main { + min-height: 100px; +} + diff --git a/css/test.less b/css/test.less new file mode 100644 index 0000000..ce55e6c --- /dev/null +++ b/css/test.less @@ -0,0 +1,3 @@ +#divaldskjf { + height: 100px; +} diff --git a/css/theme.css b/css/theme.css new file mode 100644 index 0000000..c1b8156 --- /dev/null +++ b/css/theme.css @@ -0,0 +1,263 @@ +html, body, .kalei { + height: 100% !important; + background: #f6f4f4; +} + +body { + background-color: #fff !important; + margin: 0 !important; + padding: 0 !important; +} + +.kalei-style-menu-container { + position: fixed; + width: 300px; + height: 100%; + border-right: 1px solid #ccc; + background-color: #fff; +} + +.kalei-styleguide-menu { + height: 100%; + overflow-y: auto; + overflow-x: hidden; +} + +.kalei-style-page { + margin-left: 300px; + padding: 20px; + background-color: #f6f4f4; +} +.kalei-comments > h1, +.kalei-comments > h2, +.kalei-comments > h3, +.kalei-comments > h4, +.kalei-comments > h5, +.kalei-comments > h5, +.kalei-comments > h6, +.kalei-comments > ul, +.kalei-comments > ol, +.kalei-comments > p a, +.kalei-comments > p a:visited, +.kalei-comments > a:visited, +.kalei-comments > a, +.kalei-styleguide-menu-heading > h1, +.kalei-styleguide-menu > li > h3, +.kalei-sheet-submenu li, +.kalei-styleguide-menu-stylesheets, +.kalei-comments > p { + margin: 0; + padding: 10px; + color: #444; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +.kalei-comments> p a, +.kalei-comments> p a:visited { + padding: 0; +} + +.kalei-comments > iframe { + margin-top: 10px; + margin-left: 10px; +} + +.kalei-comments > ul, +.kalei-comments > ol { + margin-left: 20px; +} + +.kalei-comments > ul, +.kalei-comments > ol, +.kalei-comments > p { + font-size: 12px; +} + +.kalei-style-page > .kalei-documentation { + position: relative; +} + +.kalei-comments-container { + position: relative; + width: 100%; +} + +.kalei-css-container { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -o-box-sizing: border-box; + box-sizing: border-box; +} + +.kalei-comments > pre > code, +.kalei-css-container > pre > code { + padding: 10px; + font-size: 11px; + white-space: pre-wrap; +} + +.kalei-css-container, +.kalei-comments > pre > code { + opacity: 0.3; +} + +.kalei-comments > pre > code:hover, +.kalei-css-container:hover { + opacity: 1; +} + +.kalei-css-container.kalei-no-css { + display: none; +} + +.kalei-comments > pre { + position: relative; + margin: 0; + padding: 20px; + border: 1px solid #ebebeb; + border-top: none; + border-radius: 0 0 3px 3px; +} + +.kalei-comments > pre > code:before { + content: "Code"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + color: #ebebeb; + font-size: 12px; + font-weight: bold; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + border-radius: 0 0 4px 0; + background-color: #444; + opacity: 0.3; +} + +.kalei-comments > pre > code:hover:before { + opacity: 1; +} + +.kalei-comments { + padding: 20px; + margin: 0 0 20px 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -o-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fff; +} + +body .codedemo { + position: relative; + padding: 40px; + font-size: 100%; + border-radius: 3px 3px 0 0; + border: 1px solid #ebebeb; + background: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAAXNSR0IArs4c6QAAAAZQTFRF+vr6////+o8bnQAAABBJREFUCB1jYPjPgBXhEAYAfr8P8bm+jEoAAAAASUVORK5CYII=); +} + +*:not(.codedemo) .kalei-styleguide-menu-heading h1 { + margin: 20px 0; + padding-left: 20px; + color: #444; + font-size: 22px; +} + +*:not(.codedemo) .kalei-styleguide-menu-heading, +.styleguide-menu-heading:visited { + text-decoration: none; +} + +*:not(.codedemo) .kalei-styleguide-menu-heading:hover { + color: #222; +} + +*:not(.codedemo) .kalei-styleguide-menu { + list-style: none; + margin: 0; + padding: 0; +} + +body .codedemo:after { + content: "Example"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + color: #ebebeb; + font-size: 12px; + font-weight: bold; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + border-radius: 3px 0 3px 0; + background-color: #444; +} + + +.kalei-styleguide-menu-stylesheets { + margin-top: 20px; + padding: 10px 20px; + color: #fff; + font-weight: bold; + font-size: 16px; + background-color: #75eb33; + text-shadow: 0 0 1px #777; +} + +.kalei-styleguide-menu > li > h3 { + margin-top: 20px; + padding-left: 20px; + color: #444; + font-weight: bold; + font-size: 16px; + +} + +.kalei-styleguide-menu-link { + display: block; + position: relative; + height: 100%; + padding: 10px 0 10px 30px; + color: #555; + font-weight: bold; + font-family: Arial; + font-size: 14px; + text-decoration: none; +} + + +.kalei-styleguide-menu-link:hover, +.kalei-styleguide-menu-link.active { + color: #ebebeb; + background-color: #444; +} + +.kalei-styleguide-menu-link:hover:after, +.kalei-styleguide-menu-link.active:after { + display: block; + content: ""; + position: absolute; + top: 50%; + left: 10px; + margin-top: -6px; + border-width: 6px 0 6px 6px; + border-style: solid; + border-color: transparent #f7f7f7; +} + +.kalei-sheet-submenu li.active { + background: #ebebeb; +} + +.kalei-sheet-submenu ul { + margin: 0; + padding: 0; +} +.kalei-sheet-submenu li { + padding: 10px 10px 10px 40px; + cursor: pointer; + font-size: 14px; +} + diff --git a/index.html b/index.html new file mode 100644 index 0000000..449d160 --- /dev/null +++ b/index.html @@ -0,0 +1,25 @@ + + + + + + + + + + + 俺strap + + + + + + + + + + + +
+ + diff --git a/js/boilerplate.js b/js/boilerplate.js new file mode 100644 index 0000000..d2b1e7c --- /dev/null +++ b/js/boilerplate.js @@ -0,0 +1,9 @@ +// Use this as a quick template for future modules +define([ + 'jquery', + 'underscore', + 'backbone' +], function($, _, Backbone){ + + return {}; +}); diff --git a/js/config.js b/js/config.js new file mode 100644 index 0000000..c53d443 --- /dev/null +++ b/js/config.js @@ -0,0 +1,27 @@ +define({ + // This css path is used as a default by the Kalei project it self. + css_path: window.location.protocol + '//' + window.location.hostname + (window.location.port === '' ? '' : ':'+ window.location.port) + window.location.pathname + 'css/styles.css', + + // You can configure any path by just deleting the one above and uncommenting the one below to point at your css directory + // css_path: 'http://localhost/kaleistyleguide/css/styles.css', + + // You can manually list the css files to process by giving a css_paths array + //css_paths: ['../css/styles.css', '../css/buttons.css'], + + // By default, Kalei parses raw CSS files using the jscssp library. + // If you'd rather use a different processor or preprocessor, you can choose from the below: + css_processor: + 'jscssp', + // 'less', + + // You can optionally set configuration for marked.js + marked_options: { + tables: true + }, + + // Enter URLs of any external stylesheets you wish to include with this demo. + // These will not be parsed as part of the documentation and are simply loaded into the page header. + external_stylesheets: [] + + //disqus_shortname: 'kaleistyleguide' +}); diff --git a/js/events.js b/js/events.js new file mode 100644 index 0000000..454a263 --- /dev/null +++ b/js/events.js @@ -0,0 +1,8 @@ +define([ + 'jquery', + 'underscore', + 'backbone' +], function($, _, Backbone){ + var vent = _.extend({}, Backbone.Events); + return vent; +}); \ No newline at end of file diff --git a/js/libs/backbone/backbone-min.js b/js/libs/backbone/backbone-min.js new file mode 100644 index 0000000..7aa32c9 --- /dev/null +++ b/js/libs/backbone/backbone-min.js @@ -0,0 +1,37 @@ +// Backbone.js 0.9.1 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org +(function(h,e){typeof exports!=="undefined"?e(h,exports,require("underscore")):typeof define==="function"&&define.amd?define(["underscore","jquery","exports"],function(g,i,m){h.Backbone=e(h,m,g,i)}):h.Backbone=e(h,{},h._,h.jQuery||h.Zepto||h.ender)})(this,function(h,e,g,i){var m=h.Backbone,r=Array.prototype.slice,s=Array.prototype.splice;e.VERSION="0.9.1";e.setDomLibrary=function(a){i=a};e.noConflict=function(){h.Backbone=m;return e};e.emulateHTTP=false;e.emulateJSON=false;e.Events={on:function(a, +b,c){for(var d,a=a.split(/\s+/),f=this._callbacks||(this._callbacks={});d=a.shift();){d=f[d]||(f[d]={});var e=d.tail||(d.tail=d.next={});e.callback=b;e.context=c;d.tail=e.next={}}return this},off:function(a,b,c){var d,f,e;if(a){if(f=this._callbacks)for(a=a.split(/\s+/);d=a.shift();)if(e=f[d],delete f[d],b&&e)for(;(e=e.next)&&e.next;)if(!(e.callback===b&&(!c||e.context===c)))this.on(d,e.callback,e.context)}else delete this._callbacks;return this},trigger:function(a){var b,c,d,f;if(!(d=this._callbacks))return this; +f=d.all;for((a=a.split(/\s+/)).push(null);b=a.shift();)f&&a.push({next:f.next,tail:f.tail,event:b}),(c=d[b])&&a.push({next:c.next,tail:c.tail});for(f=r.call(arguments,1);c=a.pop();){b=c.tail;for(d=c.event?[c.event].concat(f):f;(c=c.next)!==b;)c.callback.apply(c.context||this,d)}return this}};e.Events.bind=e.Events.on;e.Events.unbind=e.Events.off;e.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=j(this,"defaults"))a=g.extend({},c,a);if(b&&b.collection)this.collection=b.collection; +this.attributes={};this._escapedAttributes={};this.cid=g.uniqueId("c");if(!this.set(a,{silent:true}))throw Error("Can't create an invalid model");delete this._changed;this._previousAttributes=g.clone(this.attributes);this.initialize.apply(this,arguments)};g.extend(e.Model.prototype,e.Events,{idAttribute:"id",initialize:function(){},toJSON:function(){return g.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a]; +return this._escapedAttributes[a]=g.escape(b==null?"":""+b)},has:function(a){return this.attributes[a]!=null},set:function(a,b,c){var d,f;g.isObject(a)||a==null?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;if(d instanceof e.Model)d=d.attributes;if(c.unset)for(f in d)d[f]=void 0;if(!this._validate(d,c))return false;if(this.idAttribute in d)this.id=d[this.idAttribute];var b=this.attributes,k=this._escapedAttributes,h=this._previousAttributes||{},i=this._setting;this._changed||(this._changed= +{});this._setting=true;for(f in d){a=d[f];g.isEqual(b[f],a)||delete k[f];c.unset?delete b[f]:b[f]=a;if(this._changing&&!g.isEqual(this._changed[f],a))this.trigger("change:"+f,this,a,c),this._moreChanges=true;delete this._changed[f];if(!g.isEqual(h[f],a)||g.has(b,f)!=g.has(h,f))this._changed[f]=a}if(!i)!c.silent&&this.hasChanged()&&this.change(c),this._setting=false;return this},unset:function(a,b){(b||(b={})).unset=true;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=true;return this.set(g.clone(this.attributes), +a)},fetch:function(a){var a=a?g.clone(a):{},b=this,c=a.success;a.success=function(d,f,e){if(!b.set(b.parse(d,e),a))return false;c&&c(b,d)};a.error=e.wrapError(a.error,b,a);return(this.sync||e.sync).call(this,"read",this,a)},save:function(a,b,c){var d,f;g.isObject(a)||a==null?(d=a,c=b):(d={},d[a]=b);c=c?g.clone(c):{};c.wait&&(f=g.clone(this.attributes));a=g.extend({},c,{silent:true});if(d&&!this.set(d,c.wait?a:c))return false;var k=this,h=c.success;c.success=function(a,b,f){b=k.parse(a,f);c.wait&& +(b=g.extend(d||{},b));if(!k.set(b,c))return false;h?h(k,a):k.trigger("sync",k,a,c)};c.error=e.wrapError(c.error,k,c);b=this.isNew()?"create":"update";b=(this.sync||e.sync).call(this,b,this,c);c.wait&&this.set(f,a);return b},destroy:function(a){var a=a?g.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d();a.success=function(f){a.wait&&d();c?c(b,f):b.trigger("sync",b,f,a)};a.error=e.wrapError(a.error,b,a);var f=(this.sync||e.sync).call(this, +"delete",this,a);a.wait||d();return f},url:function(){var a=j(this.collection,"url")||j(this,"urlRoot")||o();return this.isNew()?a:a+(a.charAt(a.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},change:function(a){if(this._changing||!this.hasChanged())return this;this._moreChanges=this._changing=true;for(var b in this._changed)this.trigger("change:"+b,this,this._changed[b], +a);for(;this._moreChanges;)this._moreChanges=false,this.trigger("change",this,a);this._previousAttributes=g.clone(this.attributes);delete this._changed;this._changing=false;return this},hasChanged:function(a){return!arguments.length?!g.isEmpty(this._changed):this._changed&&g.has(this._changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?g.clone(this._changed):false;var b,c=false,d=this._previousAttributes,f;for(f in a)if(!g.isEqual(d[f],b=a[f]))(c||(c={}))[f]=b;return c},previous:function(a){return!arguments.length|| +!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return g.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return true;var a=g.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return true;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return false}});e.Collection=function(a,b){b||(b={});if(b.comparator)this.comparator=b.comparator;this._reset(); +this.initialize.apply(this,arguments);a&&this.reset(a,{silent:true,parse:b.parse})};g.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){var c,d,f,e,h,i={},j={};b||(b={});a=g.isArray(a)?a.slice():[a];for(c=0,d=a.length;c').hide().appendTo("body")[0].contentWindow,this.navigate(a);if(this._hasPushState)i(window).bind("popstate",this.checkUrl);else if(this._wantsHashChange&&"onhashchange"in window&&!b)i(window).bind("hashchange",this.checkUrl);else if(this._wantsHashChange)this._checkUrlInterval= +setInterval(this.checkUrl,this.interval);this.fragment=a;l=true;a=window.location;b=a.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,true),window.location.replace(this.options.root+"#"+this.fragment),true;else if(this._wantsPushState&&this._hasPushState&&b&&a.hash)this.fragment=a.hash.replace(n,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment);if(!this.options.silent)return this.loadUrl()}, +stop:function(){i(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);l=false},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.iframe.location.hash));if(a==this.fragment||a==decodeURIComponent(this.fragment))return false;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var b= +this.fragment=this.getFragment(a);return g.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),true})},navigate:function(a,b){if(!l)return false;if(!b||b===true)b={trigger:b};var c=(a||"").replace(n,"");if(!(this.fragment==c||this.fragment==decodeURIComponent(c)))this._hasPushState?(c.indexOf(this.options.root)!=0&&(c=this.options.root+c),this.fragment=c,window.history[b.replace?"replaceState":"pushState"]({},document.title,c)):this._wantsHashChange?(this.fragment=c,this._updateHash(window.location, +c,b.replace),this.iframe&&c!=this.getFragment(this.iframe.location.hash)&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,c,b.replace))):window.location.assign(this.options.root+a),b.trigger&&this.loadUrl(a)},_updateHash:function(a,b,c){c?a.replace(a.toString().replace(/(javascript:|#).*$/,"")+"#"+b):a.hash=b}});e.View=function(a){this.cid=g.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()}; +var x=/^(\S+)\s*(.*)$/,p="model,collection,el,id,attributes,className,tagName".split(",");g.extend(e.View.prototype,e.Events,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(a,b,c){a=document.createElement(a);b&&i(a).attr(b);c&&i(a).html(c);return a},setElement:function(a,b){this.$el=i(a);this.el=this.$el[0];b!==false&&this.delegateEvents();return this},delegateEvents:function(a){if(a|| +(a=j(this,"events"))){this.undelegateEvents();for(var b in a){var c=a[b];g.isFunction(c)||(c=this[a[b]]);if(!c)throw Error('Event "'+a[b]+'" does not exist');var d=b.match(x),e=d[1],d=d[2],c=g.bind(c,this);e+=".delegateEvents"+this.cid;d===""?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=g.extend({},this.options,a));for(var b=0,c=p.length;b').hide().appendTo("body")[0].contentWindow,this.navigate(a);if(this._hasPushState)i(window).bind("popstate",this.checkUrl);else if(this._wantsHashChange&&"onhashchange"in window&&!b)i(window).bind("hashchange",this.checkUrl);else if(this._wantsHashChange)this._checkUrlInterval= +setInterval(this.checkUrl,this.interval);this.fragment=a;l=true;a=window.location;b=a.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,true),window.location.replace(this.options.root+"#"+this.fragment),true;else if(this._wantsPushState&&this._hasPushState&&b&&a.hash)this.fragment=a.hash.replace(n,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment);if(!this.options.silent)return this.loadUrl()}, +stop:function(){i(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);l=false},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.iframe.location.hash));if(a==this.fragment||a==decodeURIComponent(this.fragment))return false;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var b= +this.fragment=this.getFragment(a);return g.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),true})},navigate:function(a,b){if(!l)return false;if(!b||b===true)b={trigger:b};var c=(a||"").replace(n,"");if(!(this.fragment==c||this.fragment==decodeURIComponent(c)))this._hasPushState?(c.indexOf(this.options.root)!=0&&(c=this.options.root+c),this.fragment=c,window.history[b.replace?"replaceState":"pushState"]({},document.title,c)):this._wantsHashChange?(this.fragment=c,this._updateHash(window.location, +c,b.replace),this.iframe&&c!=this.getFragment(this.iframe.location.hash)&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,c,b.replace))):window.location.assign(this.options.root+a),b.trigger&&this.loadUrl(a)},_updateHash:function(a,b,c){c?a.replace(a.toString().replace(/(javascript:|#).*$/,"")+"#"+b):a.hash=b}});e.View=function(a){this.cid=g.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()}; +var x=/^(\S+)\s*(.*)$/,p="model,collection,el,id,attributes,className,tagName".split(",");g.extend(e.View.prototype,e.Events,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(a,b,c){a=document.createElement(a);b&&i(a).attr(b);c&&i(a).html(c);return a},setElement:function(a,b){this.$el=i(a);this.el=this.$el[0];b!==false&&this.delegateEvents();return this},delegateEvents:function(a){if(a|| +(a=j(this,"events"))){this.undelegateEvents();for(var b in a){var c=a[b];g.isFunction(c)||(c=this[a[b]]);if(!c)throw Error('Event "'+a[b]+'" does not exist');var d=b.match(x),e=d[1],d=d[2],c=g.bind(c,this);e+=".delegateEvents"+this.cid;d===""?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=g.extend({},this.options,a));for(var b=0,c=p.length;b + http://jsbeautifier.org/ + + + You are free to use this in any way you want, in case you find this useful or working for you. + + Usage: + css_beautify(source_text); + css_beautify(source_text, options); + + The options are: + indent_size (default 4) — indentation size, + indent_char (default space) — character to indent with, + + e.g + + css_beautify(css_source_text, { + 'indent_size': 1, + 'indent_char': '\t' + }); +*/ + +// http://www.w3.org/TR/CSS21/syndata.html#tokenization +// http://www.w3.org/TR/css3-syntax/ +function css_beautify(source_text, options) { + options = options || {}; + var indentSize = options.indent_size || 4; + var indentCharacter = options.indent_char || ' '; + + // compatibility + if (typeof indentSize == "string") + indentSize = parseInt(indentSize); + + + // tokenizer + var whiteRe = /^\s+$/; + var wordRe = /[\w$\-_]/; + + var pos = -1, ch; + function next() { + return ch = source_text.charAt(++pos) + } + function peek() { + return source_text.charAt(pos+1) + } + function eatString(comma) { + var start = pos; + while(next()){ + if (ch=="\\"){ + next(); + next(); + } else if (ch == comma) { + break; + } else if (ch == "\n") { + break; + } + } + return source_text.substring(start, pos + 1); + } + + function eatWhitespace() { + var start = pos; + while (whiteRe.test(peek())) + pos++; + return pos != start; + } + + function skipWhitespace() { + var start = pos; + do{ + }while (whiteRe.test(next())) + return pos != start + 1; + } + + function eatComment() { + var start = pos; + next(); + while (next()) { + if (ch == "*" && peek() == "/") { + pos ++; + break; + } + } + + return source_text.substring(start, pos + 1); + } + + + function lookBack(str, index) { + return output.slice(-str.length + (index||0), index).join("").toLowerCase() == str; + } + + // printer + var indentString = source_text.match(/^[\r\n]*[\t ]*/)[0]; + var singleIndent = Array(indentSize + 1).join(indentCharacter); + var indentLevel = 0; + function indent() { + indentLevel++; + indentString += singleIndent; + } + function outdent() { + indentLevel--; + indentString = indentString.slice(0, -indentSize); + } + + var print = {}; + print["{"] = function(ch) { + print.singleSpace(); + output.push(ch); + print.newLine(); + } + print["}"] = function(ch) { + print.newLine(); + output.push(ch); + print.newLine(); + } + + print.newLine = function(keepWhitespace) { + if (!keepWhitespace) + while (whiteRe.test(output[output.length - 1])) + output.pop(); + + if (output.length) + output.push('\n'); + if (indentString) + output.push(indentString); + } + print.singleSpace = function() { + if (output.length && !whiteRe.test(output[output.length - 1])) + output.push(' '); + } + var output = []; + if (indentString) + output.push(indentString); + /*_____________________--------------------_____________________*/ + + while(true) { + var isAfterSpace = skipWhitespace(); + + if (!ch) + break; + + if (ch == '{') { + indent(); + print["{"](ch); + } else if (ch == '}') { + outdent(); + print["}"](ch); + } else if (ch == '"' || ch == '\'') { + output.push(eatString(ch)) + } else if (ch == ';') { + output.push(ch, '\n', indentString); + } else if (ch == '/' && peek() == '*') { // comment + print.newLine(); + output.push(eatComment(), "\n", indentString); + } else if (ch == '(') { // may be a url + output.push(ch); + eatWhitespace(); + if (lookBack("url", -1) && next()) { + if (ch != ')' && ch != '"' && ch != '\'') + output.push(eatString(')')); + else + pos--; + } + } else if (ch == ')') { + output.push(ch); + } else if (ch == ',') { + eatWhitespace(); + output.push(ch); + print.singleSpace(); + } else if (ch == ']') { + output.push(ch); + } else if (ch == '[' || ch == '=') { // no whitespace before or after + eatWhitespace(); + output.push(ch); + } else { + if (isAfterSpace) + print.singleSpace(); + + output.push(ch); + } + } + + + var sweetCode = output.join('').replace(/[\n ]+$/, ''); + return sweetCode; +} + + +if (typeof exports !== "undefined") + exports.css_beautify = css_beautify; diff --git a/js/libs/fixie/fixie.js b/js/libs/fixie/fixie.js new file mode 100644 index 0000000..f6963ed --- /dev/null +++ b/js/libs/fixie/fixie.js @@ -0,0 +1 @@ +var fixie=function(){function o(a){if(!document.querySelectorAll){return false}try{d(document.querySelectorAll(a));return true}catch(b){return false}}function n(){var a,b=Math.random()*4+4,c=[];for(a=0;a"+c.join("
  • ")+"
  • "}function m(){var a=h(3,7);var b="";for(var c=0;c"+l()+"

    "}return b}function l(){return i(3,7,k)}function k(){return i(4,9,g)+"."}function j(){return i(3,5,g)}function i(a,b,c){var d=h(a,b);var e=[];for(var g=0;g"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("")}while(p!=v.node);s.splice(r,1);while(r'+N[0]+""}else{r+=N[0]}P=Q.lR.lastIndex;N=Q.lR.exec(M)}return r+M.substr(P)}function B(M,N){var r;if(N.sL==""){r=g(M)}else{r=d(N.sL,M)}if(N.r>0){y+=r.keyword_count;C+=r.r}return''+r.value+""}function K(r,M){if(M.sL&&e[M.sL]||M.sL==""){return B(r,M)}else{return G(r,M)}}function J(N,r){var M=N.cN?'':"";if(N.rB){z+=M;N.buffer=""}else{if(N.eB){z+=m(r)+M;N.buffer=""}else{z+=M;N.buffer=r}}p.push(N);C+=N.r}function H(O,N,R){var S=p[p.length-1];if(R){z+=K(S.buffer+O,S);return false}var Q=s(N,S);if(Q){z+=K(S.buffer+O,S);J(Q,N);return Q.rB}var M=w(p.length-1,N);if(M){var P=S.cN?"":"";if(S.rE){z+=K(S.buffer+O,S)+P}else{if(S.eE){z+=K(S.buffer+O,S)+P+m(N)}else{z+=K(S.buffer+O+N,S)+P}}while(M>1){P=p[p.length-2].cN?"":"";z+=P;M--;p.length--}var r=p[p.length-1];p.length--;p[p.length-1].buffer="";if(r.starts){J(r.starts,"")}return S.rE}if(x(N,S)){throw"Illegal"}}var F=e[D];var p=[F.dM];var C=0;var y=0;var z="";try{var t,v=0;F.dM.buffer="";do{t=q(E,v);var u=H(t[0],t[1],t[2]);v+=t[0].length;if(!u){v+=t[1].length}}while(!t[2]);return{r:C,keyword_count:y,value:z,language:D}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:m(E)}}else{throw I}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"
    ")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v=="no-highlight"){return}if(v){y=d(v,x)}else{y=g(x);v=y.language}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="
    "+y.value+"
    ";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.javascript=function(a){return{dM:{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",c:[{b:"\\\\/"}]}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[a.NM,a.ASM,a.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}}(hljs); return hljs; }); \ No newline at end of file diff --git a/js/libs/highlight/highlight.pack.js b/js/libs/highlight/highlight.pack.js new file mode 100644 index 0000000..f2f6b02 --- /dev/null +++ b/js/libs/highlight/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("")}while(p!=v.node);s.splice(r,1);while(r'+N[0]+""}else{r+=N[0]}P=Q.lR.lastIndex;N=Q.lR.exec(M)}return r+M.substr(P)}function B(M,N){var r;if(N.sL==""){r=g(M)}else{r=d(N.sL,M)}if(N.r>0){y+=r.keyword_count;C+=r.r}return''+r.value+""}function K(r,M){if(M.sL&&e[M.sL]||M.sL==""){return B(r,M)}else{return G(r,M)}}function J(N,r){var M=N.cN?'':"";if(N.rB){z+=M;N.buffer=""}else{if(N.eB){z+=m(r)+M;N.buffer=""}else{z+=M;N.buffer=r}}p.push(N);C+=N.r}function H(O,N,R){var S=p[p.length-1];if(R){z+=K(S.buffer+O,S);return false}var Q=s(N,S);if(Q){z+=K(S.buffer+O,S);J(Q,N);return Q.rB}var M=w(p.length-1,N);if(M){var P=S.cN?"":"";if(S.rE){z+=K(S.buffer+O,S)+P}else{if(S.eE){z+=K(S.buffer+O,S)+P+m(N)}else{z+=K(S.buffer+O+N,S)+P}}while(M>1){P=p[p.length-2].cN?"":"";z+=P;M--;p.length--}var r=p[p.length-1];p.length--;p[p.length-1].buffer="";if(r.starts){J(r.starts,"")}return S.rE}if(x(N,S)){throw"Illegal"}}var F=e[D];var p=[F.dM];var C=0;var y=0;var z="";try{var t,v=0;F.dM.buffer="";do{t=q(E,v);var u=H(t[0],t[1],t[2]);v+=t[0].length;if(!u){v+=t[1].length}}while(!t[2]);return{r:C,keyword_count:y,value:z,language:D}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:m(E)}}else{throw I}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"
    ")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v=="no-highlight"){return}if(v){y=d(v,x)}else{y=g(x);v=y.language}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="
    "+y.value+"
    ";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.javascript=function(a){return{dM:{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",c:[{b:"\\\\/"}]}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[a.NM,a.ASM,a.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}}(hljs); \ No newline at end of file diff --git a/js/libs/highlighter/shBrushCss.js b/js/libs/highlighter/shBrushCss.js new file mode 100644 index 0000000..edbc529 --- /dev/null +++ b/js/libs/highlighter/shBrushCss.js @@ -0,0 +1,90 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +;(function() +{ + // CommonJS + + function Brush() + { + function getKeywordsCSS(str) + { + return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; + }; + + function getValuesCSS(str) + { + return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; + }; + + var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + + 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + + 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + + 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + + 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + + 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + + 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + + 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + + 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + + 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + + 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + + 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + + 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + + 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index'; + + var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+ + 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+ + 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+ + 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+ + 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+ + 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+ + 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+ + 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+ + 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+ + 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+ + 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+ + 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+ + 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+ + 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; + + var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors + { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes + { regex: /!important/g, css: 'color3' }, // !important + { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values + { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts + ]; + + this.forHtmlScript({ + left: /(<|<)\s*style.*?(>|>)/gi, + right: /(<|<)\/\s*style\s*(>|>)/gi + }); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['css']; + + SyntaxHighlighter.brushes.CSS = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); diff --git a/js/libs/highlighter/shCore.js b/js/libs/highlighter/shCore.js new file mode 100644 index 0000000..fec1766 --- /dev/null +++ b/js/libs/highlighter/shCore.js @@ -0,0 +1,2371 @@ +// +// Begin anonymous function. This is used to contain local scope variables without polutting global scope. +// +// XRegExp 1.5.1 +// (c) 2007-2012 Steven Levithan +// MIT License +// +// Provides an augmented, extensible, cross-browser implementation of regular expressions, +// including support for additional syntax, flags, and methods + +var XRegExp; + +if (XRegExp) { + // Avoid running twice, since that would break references to native globals + throw Error("can't load XRegExp twice in the same frame"); +} + +// Run within an anonymous function to protect variables and avoid new globals +(function (undefined) { + + //--------------------------------- + // Constructor + //--------------------------------- + + // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native + // regular expression in that additional syntax and flags are supported and cross-browser + // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and + // converts to type XRegExp + XRegExp = function (pattern, flags) { + var output = [], + currScope = XRegExp.OUTSIDE_CLASS, + pos = 0, + context, tokenResult, match, chr, regex; + + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) + throw TypeError("can't supply flags when constructing one RegExp from another"); + return clone(pattern); + } + // Tokens become part of the regex construction process, so protect against infinite + // recursion when an XRegExp is constructed within a token handler or trigger + if (isInsideConstructor) + throw Error("can't call the XRegExp constructor within token definition functions"); + + flags = flags || ""; + context = { // `this` object for custom tokens + hasNamedCapture: false, + captureNames: [], + hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, + setFlag: function (flag) {flags += flag;} + }; + + while (pos < pattern.length) { + // Check for custom tokens at the current position + tokenResult = runTokens(pattern, pos, currScope, context); + + if (tokenResult) { + output.push(tokenResult.output); + pos += (tokenResult.match[0].length || 1); + } else { + // Check for native multicharacter metasequences (excluding character classes) at + // the current position + if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { + output.push(match[0]); + pos += match[0].length; + } else { + chr = pattern.charAt(pos); + if (chr === "[") + currScope = XRegExp.INSIDE_CLASS; + else if (chr === "]") + currScope = XRegExp.OUTSIDE_CLASS; + // Advance position one character + output.push(chr); + pos++; + } + } + } + + regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); + regex._xregexp = { + source: pattern, + captureNames: context.hasNamedCapture ? context.captureNames : null + }; + return regex; + }; + + + //--------------------------------- + // Public properties + //--------------------------------- + + XRegExp.version = "1.5.1"; + + // Token scope bitflags + XRegExp.INSIDE_CLASS = 1; + XRegExp.OUTSIDE_CLASS = 2; + + + //--------------------------------- + // Private variables + //--------------------------------- + + var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, + flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags + quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, + isInsideConstructor = false, + tokens = [], + // Copy native globals for reference ("native" is an ES3 reserved keyword) + nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split + }, + compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups + compliantLastIndexIncrement = function () { + var x = /^/g; + nativ.test.call(x, ""); + return !x.lastIndex; + }(), + hasNativeY = RegExp.prototype.sticky !== undefined, + nativeTokens = {}; + + // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, + // excluding character classes) + nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; + nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; + + + //--------------------------------- + // Public methods + //--------------------------------- + + // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by + // the XRegExp library and can be used to create XRegExp plugins. This function is intended for + // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can + // be disabled by `XRegExp.freezeTokens` + XRegExp.addToken = function (regex, handler, scope, trigger) { + tokens.push({ + pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), + handler: handler, + scope: scope || XRegExp.OUTSIDE_CLASS, + trigger: trigger || null + }); + }; + + // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag + // combination has previously been cached, the cached copy is returned; otherwise the newly + // created regex is cached + XRegExp.cache = function (pattern, flags) { + var key = pattern + "/" + (flags || ""); + return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); + }; + + // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh + // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` + // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve + // special properties required for named capture + XRegExp.copyAsGlobal = function (regex) { + return clone(regex, "g"); + }; + + // Accepts a string; returns the string with regex metacharacters escaped. The returned string + // can safely be used at any point within a regex to match the provided literal string. Escaped + // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace + XRegExp.escape = function (str) { + return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }; + + // Accepts a string to search, regex to search with, position to start the search within the + // string (default: 0), and an optional Boolean indicating whether matches must start at-or- + // after the position or at the specified position only. This function ignores the `lastIndex` + // of the provided regex in its own handling, but updates the property for compatibility + XRegExp.execAt = function (str, regex, pos, anchored) { + var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), + match; + r2.lastIndex = pos = pos || 0; + match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (anchored && match && match.index !== pos) + match = null; + if (regex.global) + regex.lastIndex = match ? r2.lastIndex : 0; + return match; + }; + + // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing + // syntax and flag changes. Should be run after XRegExp and any plugins are loaded + XRegExp.freezeTokens = function () { + XRegExp.addToken = function () { + throw Error("can't run addToken after freezeTokens"); + }; + }; + + // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. + // Note that this is also `true` for regex literals and regexes created by the `XRegExp` + // constructor. This works correctly for variables created in another frame, when `instanceof` + // and `constructor` checks would fail to work as intended + XRegExp.isRegExp = function (o) { + return Object.prototype.toString.call(o) === "[object RegExp]"; + }; + + // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to + // iterate over regex matches compared to the traditional approaches of subverting + // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop + XRegExp.iterate = function (str, regex, callback, context) { + var r2 = clone(regex, "g"), + i = -1, match; + while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (regex.global) + regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` + callback.call(context, match, ++i, str, regex); + if (r2.lastIndex === match.index) + r2.lastIndex++; + } + if (regex.global) + regex.lastIndex = 0; + }; + + // Accepts a string and an array of regexes; returns the result of using each successive regex + // to search within the matches of the previous regex. The array of regexes can also contain + // objects with `regex` and `backref` properties, in which case the named or numbered back- + // references specified are passed forward to the next regex or returned. E.g.: + // var xregexpImgFileNames = XRegExp.matchChain(html, [ + // {regex: /]+)>/i, backref: 1}, // tag attributes + // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values + // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths + // /[^\/]+$/ // filenames (strip directory paths) + // ]); + XRegExp.matchChain = function (str, chain) { + return function recurseChain (values, level) { + var item = chain[level].regex ? chain[level] : {regex: chain[level]}, + regex = clone(item.regex, "g"), + matches = [], i; + for (i = 0; i < values.length; i++) { + XRegExp.iterate(values[i], regex, function (match) { + matches.push(item.backref ? (match[item.backref] || "") : match[0]); + }); + } + return ((level === chain.length - 1) || !matches.length) ? + matches : recurseChain(matches, level + 1); + }([str], 0); + }; + + + //--------------------------------- + // New RegExp prototype methods + //--------------------------------- + + // Accepts a context object and arguments array; returns the result of calling `exec` with the + // first value in the arguments array. the context is ignored but is accepted for congruity + // with `Function.prototype.apply` + RegExp.prototype.apply = function (context, args) { + return this.exec(args[0]); + }; + + // Accepts a context object and string; returns the result of calling `exec` with the provided + // string. the context is ignored but is accepted for congruity with `Function.prototype.call` + RegExp.prototype.call = function (context, str) { + return this.exec(str); + }; + + + //--------------------------------- + // Overriden native methods + //--------------------------------- + + // Adds named capture support (with backreferences returned as `result.name`), and fixes two + // cross-browser issues per ES3: + // - Captured values for nonparticipating capturing groups should be returned as `undefined`, + // rather than the empty string. + // - `lastIndex` should not be incremented after zero-length matches. + RegExp.prototype.exec = function (str) { + var match, name, r2, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.apply(this, arguments); + if (match) { + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { + r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); + // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + nativ.replace.call((str + "").slice(match.index), r2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) + match[i] = undefined; + } + }); + } + // Attach named capture properties + if (this._xregexp && this._xregexp.captureNames) { + for (var i = 1; i < match.length; i++) { + name = this._xregexp.captureNames[i - 1]; + if (name) + match[name] = match[i]; + } + } + // Fix browsers that increment `lastIndex` after zero-length matches + if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + } + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return match; + }; + + // Fix browser bugs in native method + RegExp.prototype.test = function (str) { + // Use the native `exec` to skip some processing overhead, even though the altered + // `exec` would take care of the `lastIndex` fixes + var match, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.call(this, str); + // Fix browsers that increment `lastIndex` after zero-length matches + if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return !!match; + }; + + // Adds named capture support and fixes browser bugs in native method + String.prototype.match = function (regex) { + if (!XRegExp.isRegExp(regex)) + regex = RegExp(regex); // Native `RegExp` + if (regex.global) { + var result = nativ.match.apply(this, arguments); + regex.lastIndex = 0; // Fix IE bug + return result; + } + return regex.exec(this); // Run the altered `exec` + }; + + // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, + // and provides named backreferences to replacement functions as `arguments[0].name`. Also + // fixes cross-browser differences in replacement text syntax when performing a replacement + // using a nonregex search value, and the value of replacement regexes' `lastIndex` property + // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary + // third (`flags`) parameter + String.prototype.replace = function (search, replacement) { + var isRegex = XRegExp.isRegExp(search), + captureNames, result, str, origLastIndex; + + // There are too many combinations of search/replacement types/values and browser bugs that + // preclude passing to native `replace`, so don't try + //if (...) + // return nativ.replace.apply(this, arguments); + + if (isRegex) { + if (search._xregexp) + captureNames = search._xregexp.captureNames; // Array or `null` + if (!search.global) + origLastIndex = search.lastIndex; + } else { + search = search + ""; // Type conversion + } + + if (Object.prototype.toString.call(replacement) === "[object Function]") { + result = nativ.replace.call(this + "", search, function () { + if (captureNames) { + // Change the `arguments[0]` string primitive to a String object which can store properties + arguments[0] = new String(arguments[0]); + // Store named backreferences on `arguments[0]` + for (var i = 0; i < captureNames.length; i++) { + if (captureNames[i]) + arguments[0][captureNames[i]] = arguments[i + 1]; + } + } + // Update `lastIndex` before calling `replacement` (fix browsers) + if (isRegex && search.global) + search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; + return replacement.apply(null, arguments); + }); + } else { + str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) + result = nativ.replace.call(str, search, function () { + var args = arguments; // Keep this function's `arguments` available through closure + return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { + // Numbered backreference (without delimiters) or special variable + if ($1) { + switch ($1) { + case "$": return "$"; + case "&": return args[0]; + case "`": return args[args.length - 1].slice(0, args[args.length - 2]); + case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + // Numbered backreference + default: + // What does "$10" mean? + // - Backreference 10, if 10 or more capturing groups exist + // - Backreference 1 followed by "0", if 1-9 capturing groups exist + // - Otherwise, it's the string "$10" + // Also note: + // - Backreferences cannot be more than two digits (enforced by `replacementToken`) + // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" + // - There is no "$0" token ("$&" is the entire match) + var literalNumbers = ""; + $1 = +$1; // Type conversion; drop leading zero + if (!$1) // `$1` was "0" or "00" + return $0; + while ($1 > args.length - 3) { + literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; + $1 = Math.floor($1 / 10); // Drop the last digit + } + return ($1 ? args[$1] || "" : "$") + literalNumbers; + } + // Named backreference or delimited numbered backreference + } else { + // What does "${n}" mean? + // - Backreference to numbered capture n. Two differences from "$n": + // - n can be more than two digits + // - Backreference 0 is allowed, and is the entire match + // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture + // - Otherwise, it's the string "${n}" + var n = +$2; // Type conversion; drop leading zeros + if (n <= args.length - 3) + return args[n]; + n = captureNames ? indexOf(captureNames, $2) : -1; + return n > -1 ? args[n + 1] : $0; + } + }); + }); + } + + if (isRegex) { + if (search.global) + search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) + else + search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + } + + return result; + }; + + // A consistent cross-browser, ES3 compliant `split` + String.prototype.split = function (s /* separator */, limit) { + // If separator `s` is not a regex, use the native `split` + if (!XRegExp.isRegExp(s)) + return nativ.split.apply(this, arguments); + + var str = this + "", // Type conversion + output = [], + lastLastIndex = 0, + match, lastLength; + + // Behavior for `limit`: if it's... + // - `undefined`: No limit + // - `NaN` or zero: Return an empty array + // - A positive number: Use `Math.floor(limit)` + // - A negative number: No limit + // - Other: Type-convert, then use the above rules + if (limit === undefined || +limit < 0) { + limit = Infinity; + } else { + limit = Math.floor(+limit); + if (!limit) + return []; + } + + // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero + // and restore it to its original value when we're done using the regex + s = XRegExp.copyAsGlobal(s); + + while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (s.lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + + if (match.length > 1 && match.index < str.length) + Array.prototype.push.apply(output, match.slice(1)); + + lastLength = match[0].length; + lastLastIndex = s.lastIndex; + + if (output.length >= limit) + break; + } + + if (s.lastIndex === match.index) + s.lastIndex++; + } + + if (lastLastIndex === str.length) { + if (!nativ.test.call(s, "") || lastLength) + output.push(""); + } else { + output.push(str.slice(lastLastIndex)); + } + + return output.length > limit ? output.slice(0, limit) : output; + }; + + + //--------------------------------- + // Private helper functions + //--------------------------------- + + // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` + // instance with a fresh `lastIndex` (set to zero), preserving properties required for named + // capture. Also allows adding new flags in the process of copying the regex + function clone (regex, additionalFlags) { + if (!XRegExp.isRegExp(regex)) + throw TypeError("type RegExp expected"); + var x = regex._xregexp; + regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); + if (x) { + regex._xregexp = { + source: x.source, + captureNames: x.captureNames ? x.captureNames.slice(0) : null + }; + } + return regex; + } + + function getNativeFlags (regex) { + return (regex.global ? "g" : "") + + (regex.ignoreCase ? "i" : "") + + (regex.multiline ? "m" : "") + + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 + (regex.sticky ? "y" : ""); + } + + function runTokens (pattern, index, scope, context) { + var i = tokens.length, + result, match, t; + // Protect against constructing XRegExps within token handler and trigger functions + isInsideConstructor = true; + // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws + try { + while (i--) { // Run in reverse order + t = tokens[i]; + if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { + t.pattern.lastIndex = index; + match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. + if (match && match.index === index) { + result = { + output: t.handler.call(context, match, scope), + match: match + }; + break; + } + } + } + } catch (err) { + throw err; + } finally { + isInsideConstructor = false; + } + return result; + } + + function indexOf (array, item, from) { + if (Array.prototype.indexOf) // Use the native array method if available + return array.indexOf(item, from); + for (var i = from || 0; i < array.length; i++) { + if (array[i] === item) + return i; + } + return -1; + } + + + //--------------------------------- + // Built-in tokens + //--------------------------------- + + // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the + // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` + + // Comment pattern: (?# ) + XRegExp.addToken( + /\(\?#[^)]*\)/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + } + ); + + // Capturing group (match the opening parenthesis only). + // Required for support of named capturing groups + XRegExp.addToken( + /\((?!\?)/, + function () { + this.captureNames.push(null); + return "("; + } + ); + + // Named capturing group (match the opening delimiter only): (? + XRegExp.addToken( + /\(\?<([$\w]+)>/, + function (match) { + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return "("; + } + ); + + // Named backreference: \k + XRegExp.addToken( + /\\k<([\w$]+)>/, + function (match) { + var index = indexOf(this.captureNames, match[1]); + // Keep backreferences separate from subsequent literal numbers. Preserve back- + // references to named groups that are undefined at this point as literal strings + return index > -1 ? + "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : + match[0]; + } + ); + + // Empty character class: [] or [^] + XRegExp.addToken( + /\[\^?]/, + function (match) { + // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. + // (?!) should work like \b\B, but is unreliable in Firefox + return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; + } + ); + + // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) + // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. + XRegExp.addToken( + /^\(\?([imsx]+)\)/, + function (match) { + this.setFlag(match[1]); + return ""; + } + ); + + // Whitespace and comments, in free-spacing (aka extended) mode only + XRegExp.addToken( + /(?:\s+|#.*)+/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + }, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("x");} + ); + + // Dot, in dotall (aka singleline) mode only + XRegExp.addToken( + /\./, + function () {return "[\\s\\S]";}, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("s");} + ); + + + //--------------------------------- + // Backward compatibility + //--------------------------------- + + // Uncomment the following block for compatibility with XRegExp 1.0-1.2: + /* + XRegExp.matchWithinChain = XRegExp.matchChain; + RegExp.prototype.addFlags = function (s) {return clone(this, s);}; + RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; + RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; + RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; + */ + +})(); +if (typeof(SyntaxHighlighter) == 'undefined') var SyntaxHighlighter = function() { + + +// Shortcut object which will be assigned to the SyntaxHighlighter variable. +// This is a shorthand for local reference in order to avoid long namespace +// references to SyntaxHighlighter.whatever... +var sh = { + defaults : { + /** Additional CSS class names to be added to highlighter elements. */ + 'class-name' : '', + + /** First line number. */ + 'first-line' : 1, + + /** + * Pads line numbers. Possible values are: + * + * false - don't pad line numbers. + * true - automaticaly pad numbers with minimum required number of leading zeroes. + * [int] - length up to which pad line numbers. + */ + 'pad-line-numbers' : false, + + /** Lines to highlight. */ + 'highlight' : null, + + /** Title to be displayed above the code block. */ + 'title' : null, + + /** Enables or disables smart tabs. */ + 'smart-tabs' : true, + + /** Gets or sets tab size. */ + 'tab-size' : 4, + + /** Enables or disables gutter. */ + 'gutter' : true, + + /** Enables or disables toolbar. */ + 'toolbar' : true, + + /** Enables quick code copy and paste from double click. */ + 'quick-code' : true, + + /** Forces code view to be collapsed. */ + 'collapse' : false, + + /** Enables or disables automatic links. */ + 'auto-links' : true, + + /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */ + 'light' : false, + + 'unindent' : true, + + 'html-script' : false + }, + + config : { + space : ' ', + + /** Enables use of