Unified · Split
| @@ -1,6 +1,9 @@ | |||
| 1 | #= require views/pages/base | 1 | #= require views/pages/base |
| 2 | 2 | ||
| 3 | class app.views.GithubPage extends app.views.BasePage | 3 | class app.views.GithubPage extends app.views.BasePage |
| 4 | LANGUAGE_RGX = /highlight-source-(\w+)/ | ||
| 5 | |||
| 4 | prepare: -> | 6 | prepare: -> |
| 5 | @highlightCode @findAll('pre.highlight-source-lua'), 'lua' | 7 | for el in @findAll('pre.highlight') |
| 8 | @highlightCode(el, el.className.match(LANGUAGE_RGX)[1]) | ||
| 6 | return | 9 | return |
| @@ -26,7 +26,6 @@ app.views.MomentPage = · 25 unmodified lines | |||
| 26 | app.views.MongoosePage = | 26 | app.views.MongoosePage = |
| 27 | app.views.NodePage = | 27 | app.views.NodePage = |
| 28 | app.views.PhaserPage = | 28 | app.views.PhaserPage = |
| 29 | app.views.QPage = | ||
| 30 | app.views.RamdaPage = | 29 | app.views.RamdaPage = |
| 31 | app.views.RethinkdbPage = | 30 | app.views.RethinkdbPage = |
| 32 | app.views.SinonPage = | 31 | app.views.SinonPage = |
| @@ -45,6 +45,7 @@ · 44 unmodified lines | |||
| 45 | 'pages/erlang', | 45 | 'pages/erlang', |
| 46 | 'pages/express', | 46 | 'pages/express', |
| 47 | 'pages/git', | 47 | 'pages/git', |
| 48 | 'pages/github', | ||
| 48 | 'pages/go', | 49 | 'pages/go', |
| 49 | 'pages/haskell', | 50 | 'pages/haskell', |
| 50 | 'pages/jquery', | 51 | 'pages/jquery', |
| @@ -63,7 +64,6 @@ · 12 unmodified lines | |||
| 63 | 'pages/php', | 64 | 'pages/php', |
| 64 | 'pages/phpunit', | 65 | 'pages/phpunit', |
| 65 | 'pages/postgres', | 66 | 'pages/postgres', |
| 66 | 'pages/q', | ||
| 67 | 'pages/ramda', | 67 | 'pages/ramda', |
| 68 | 'pages/rdoc', | 68 | 'pages/rdoc', |
| 69 | 'pages/react', | 69 | 'pages/react', |
| @@ -45,6 +45,7 @@ · 44 unmodified lines | |||
| 45 | 'pages/erlang', | 45 | 'pages/erlang', |
| 46 | 'pages/express', | 46 | 'pages/express', |
| 47 | 'pages/git', | 47 | 'pages/git', |
| 48 | 'pages/github', | ||
| 48 | 'pages/go', | 49 | 'pages/go', |
| 49 | 'pages/haskell', | 50 | 'pages/haskell', |
| 50 | 'pages/jquery', | 51 | 'pages/jquery', |
| @@ -63,7 +64,6 @@ · 12 unmodified lines | |||
| 63 | 'pages/php', | 64 | 'pages/php', |
| 64 | 'pages/phpunit', | 65 | 'pages/phpunit', |
| 65 | 'pages/postgres', | 66 | 'pages/postgres', |
| 66 | 'pages/q', | ||
| 67 | 'pages/ramda', | 67 | 'pages/ramda', |
| 68 | 'pages/rdoc', | 68 | 'pages/rdoc', |
| 69 | 'pages/react', | 69 | 'pages/react', |
| @@ -17,7 +17,6 @@ · 16 unmodified lines | |||
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | ._cordova, | 19 | ._cordova, |
| 20 | ._github, | ||
| 21 | ._grunt, | 20 | ._grunt, |
| 22 | ._less, | 21 | ._less, |
| 23 | ._lodash, | 22 | ._lodash, |
| @@ -0,0 +1,5 @@ | |||
| 1 | ._github { | ||
| 2 | @extend %simple; | ||
| 3 | |||
| 4 | h4 { @extend %block-label; } | ||
| 5 | } | ||
| @@ -1,5 +0,0 @@ | |||
| 1 | ._q { | ||
| 2 | > h2, > h3 { @extend %block-heading; } | ||
| 3 | > h4 { @extend %block-label, %label-blue; } | ||
| 4 | code { @extend %label; } | ||
| 5 | } | ||
| @@ -1,18 +0,0 @@ | |||
| 1 | module Docs | ||
| 2 | class Q | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | css('.anchor').each do |node| | ||
| 6 | node.parent['id'] = node['href'].remove('#') | ||
| 7 | node.remove | ||
| 8 | end | ||
| 9 | |||
| 10 | css('.highlight > pre').each do |node| | ||
| 11 | node.content = node.content.gsub(' ', ' ') | ||
| 12 | end | ||
| 13 | |||
| 14 | doc | ||
| 15 | end | ||
| 16 | end | ||
| 17 | end | ||
| 18 | end | ||
| @@ -1,7 +1,6 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Q < UrlScraper | 2 | class Q < Github |
| 3 | self.name = 'Q' | 3 | self.name = 'Q' |
| 4 | self.type = 'q' | ||
| 5 | self.release = '1.4.1' | 4 | self.release = '1.4.1' |
| 6 | self.base_url = 'https://github.com/kriskowal/q/wiki/' | 5 | self.base_url = 'https://github.com/kriskowal/q/wiki/' |
| 7 | self.root_path = 'API-Reference' | 6 | self.root_path = 'API-Reference' |
| @@ -10,7 +9,7 @@ module Docs · 2 unmodified lines | |||
| 10 | code: 'https://github.com/kriskowal/q' | 9 | code: 'https://github.com/kriskowal/q' |
| 11 | } | 10 | } |
| 12 | 11 | ||
| 13 | html_filters.push 'q/clean_html', 'q/entries', 'title' | 12 | html_filters.push 'q/entries', 'title' |
| 14 | 13 | ||
| 15 | options[:container] = '.markdown-body' | 14 | options[:container] = '.markdown-body' |
| 16 | options[:title] = 'Q' | 15 | options[:title] = 'Q' |