Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ "2015-02-15", |
| 3 | − "New <a href=\"/iojs/\">io.js</a>, <a href=\"/lua/\">Lua</a> and <a href=\"/yii1/\">Yii 1.1</a> documentations" | |
| 3 | + "New <a href=\"/iojs/\">io.js</a>, <a href=\"/clojure/\">Clojure</a>, <a href=\"/lua/\">Lua</a> and <a href=\"/yii1/\">Yii 1.1</a> documentations" | |
| 4 | 4 | ], [ |
| 5 | 5 | "2015-02-08", |
| 6 | 6 | "New dark theme\nClick the icon in the bottom left corner to activate.\n<a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\">Feedback</a> welcome :)" |
| @@ -100,6 +100,11 @@ credits = [ · 99 unmodified lines | ||
| 100 | 100 | '2011-2015 Jake Luer', |
| 101 | 101 | 'MIT', |
| 102 | 102 | 'https://github.com/chaijs/chai/blob/master/README.md#license' |
| 103 | + ], [ | |
| 104 | + 'Clojure', | |
| 105 | + 'Rich Hickey', | |
| 106 | + 'EPL', | |
| 107 | + 'https://github.com/clojure/clojure/blob/master/epl-v10.html' | |
| 103 | 108 | ], [ |
| 104 | 109 | 'CoffeeScript', |
| 105 | 110 | '2009-2015 Jeremy Ashkenas', |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | 'pages/bower', |
| 33 | 33 | 'pages/c', |
| 34 | 34 | 'pages/chai', |
| 35 | + 'pages/clojure', | |
| 35 | 36 | 'pages/coffeescript', |
| 36 | 37 | 'pages/cordova', |
| 37 | 38 | 'pages/d3', |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | 'pages/bower', |
| 33 | 33 | 'pages/c', |
| 34 | 34 | 'pages/chai', |
| 35 | + 'pages/clojure', | |
| 35 | 36 | 'pages/coffeescript', |
| 36 | 37 | 'pages/cordova', |
| 37 | 38 | 'pages/d3', |
| @@ -87,3 +87,4 @@ · 86 unmodified lines | ||
| 87 | 87 | %icon-light-white { background-position: -1rem -14rem; } |
| 88 | 88 | ._icon-iojs:before { background-position: -2rem -14rem; } |
| 89 | 89 | ._icon-lua:before { background-position: -3rem -14rem; } |
| 90 | +._icon-clojure:before { background-position: -4rem -14rem; } | |
| @@ -0,0 +1,10 @@ | ||
| 1 | +._clojure { | |
| 2 | + h2:not([id]) { @extend %block-heading; } | |
| 3 | + h2[id], h3 { @extend %block-label, %label-blue; } | |
| 4 | + | |
| 5 | + .type { | |
| 6 | + float: right; | |
| 7 | + font-size: .9em; | |
| 8 | + color: $textColorLight; | |
| 9 | + } | |
| 10 | +} | |
| @@ -0,0 +1,44 @@ | ||
| 1 | +module Docs | |
| 2 | + class Clojure | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + if root_page? | |
| 6 | + doc.inner_html = '<h1>Clojure</h1>' | |
| 7 | + return doc | |
| 8 | + end | |
| 9 | + | |
| 10 | + @doc = at_css('#content-tag') | |
| 11 | + | |
| 12 | + at_css('h1').content = slug.remove('-api') | |
| 13 | + | |
| 14 | + css('> div').each do |node| | |
| 15 | + node.before(node.children).remove | |
| 16 | + end | |
| 17 | + | |
| 18 | + css('div > h2', 'div > h3').each do |node| | |
| 19 | + node.parent.before(node.parent.children).remove | |
| 20 | + end | |
| 21 | + | |
| 22 | + css('#proto-type', '#var-type', '#type-type').each do |node| | |
| 23 | + node.previous_element << node | |
| 24 | + node['class'] = 'type' | |
| 25 | + end | |
| 26 | + | |
| 27 | + css('.proto-added', '.var-added', '.proto-deprecated', '.var-deprecated').each do |node| | |
| 28 | + node.content = node.content | |
| 29 | + node.name = 'p' | |
| 30 | + end | |
| 31 | + | |
| 32 | + css('.proto-added', '.var-added').each do |node| | |
| 33 | + if node.content == node.next_element.try(:content) | |
| 34 | + node.remove | |
| 35 | + end | |
| 36 | + end | |
| 37 | + | |
| 38 | + css('hr', 'br:first-child', 'pre + br', 'h1 + br', 'h2 + br', 'h3 + br', 'p + br', 'br + br').remove | |
| 39 | + | |
| 40 | + doc | |
| 41 | + end | |
| 42 | + end | |
| 43 | + end | |
| 44 | +end | |
| @@ -0,0 +1,22 @@ | ||
| 1 | +module Docs | |
| 2 | + class Clojure | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + slug.remove('-api') | |
| 6 | + end | |
| 7 | + | |
| 8 | + def get_type | |
| 9 | + 'Namespaces' | |
| 10 | + end | |
| 11 | + | |
| 12 | + def additional_entries | |
| 13 | + css(".toc-entry-anchor[href^='##{self.name}']").map do |node| | |
| 14 | + name = node.content | |
| 15 | + id = node['href'].remove('#') | |
| 16 | + type = name == 'clojure.core' ? id.split('/').first : self.name | |
| 17 | + [name, id, type] | |
| 18 | + end | |
| 19 | + end | |
| 20 | + end | |
| 21 | + end | |
| 22 | +end | |
| @@ -0,0 +1,18 @@ | ||
| 1 | +module Docs | |
| 2 | + class Clojure < UrlScraper | |
| 3 | + self.type = 'clojure' | |
| 4 | + self.version = '1.6' | |
| 5 | + self.base_url = 'http://clojure.github.io/clojure/' | |
| 6 | + self.root_path = 'api-index.html' | |
| 7 | + | |
| 8 | + html_filters.push 'clojure/entries', 'clojure/clean_html' | |
| 9 | + | |
| 10 | + options[:container] = '#content_view' | |
| 11 | + options[:only_patterns] = [/\Aclojure\./] | |
| 12 | + | |
| 13 | + options[:attribution] = <<-HTML | |
| 14 | + © Rich Hickey<br> | |
| 15 | + Licensed under the Eclipse Public License 1.0. | |
| 16 | + HTML | |
| 17 | + end | |
| 18 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +http://en.wikipedia.org/wiki/File:Clojure_logo.gif | |