Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,5 +1,8 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ | 2 | [ |
| 3 | "2016-02-28", | ||
| 4 | "New documentation: <a href=\"/codeigniter/\">CodeIgniter</a>" | ||
| 5 | ], [ | ||
| 3 | "2016-02-15", | 6 | "2016-02-15", |
| 4 | "New documentations: <a href=\"/cakephp/\">CakePHP</a>, <a href=\"/chef/\">Chef</a> and <a href=\"/ramda/\">Ramda</a>" | 7 | "New documentations: <a href=\"/cakephp/\">CakePHP</a>, <a href=\"/chef/\">Chef</a> and <a href=\"/ramda/\">Ramda</a>" |
| 5 | ], [ | 8 | ], [ |
| @@ -119,6 +119,11 @@ credits = [ · 118 unmodified lines | |||
| 119 | 'Rich Hickey', | 119 | 'Rich Hickey', |
| 120 | 'EPL', | 120 | 'EPL', |
| 121 | 'https://github.com/clojure/clojure/blob/master/epl-v10.html' | 121 | 'https://github.com/clojure/clojure/blob/master/epl-v10.html' |
| 122 | ], [ | ||
| 123 | 'CodeIgniter', | ||
| 124 | '2014-2016 British Columbia Institute of Technology', | ||
| 125 | 'MIT', | ||
| 126 | 'https://raw.githubusercontent.com/bcit-ci/CodeIgniter/develop/license.txt' | ||
| 122 | ], [ | 127 | ], [ |
| 123 | 'CoffeeScript', | 128 | 'CoffeeScript', |
| 124 | '2009-2015 Jeremy Ashkenas', | 129 | '2009-2015 Jeremy Ashkenas', |
| @@ -1,6 +0,0 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.CodeigniterPage extends app.views.BasePage | ||
| 4 | prepare: -> | ||
| 5 | @highlightCode @findAllByTag('pre'), 'php' | ||
| 6 | return | ||
| @@ -4,4 +4,5 @@ class app.views.SphinxPage extends app.views.BasePage · 3 unmodified lines | |||
| 4 | prepare: -> | 4 | prepare: -> |
| 5 | @highlightCode @findAll('pre.python'), 'python' | 5 | @highlightCode @findAll('pre.python'), 'python' |
| 6 | @highlightCode @findAll('pre.markup'), 'markup' | 6 | @highlightCode @findAll('pre.markup'), 'markup' |
| 7 | @highlightCode @findAll('pre.php'), 'php' | ||
| 7 | return | 8 | return |
| @@ -36,7 +36,6 @@ · 35 unmodified lines | |||
| 36 | 'pages/cakephp', | 36 | 'pages/cakephp', |
| 37 | 'pages/chai', | 37 | 'pages/chai', |
| 38 | 'pages/clojure', | 38 | 'pages/clojure', |
| 39 | 'pages/codeigniter', | ||
| 40 | 'pages/coffeescript', | 39 | 'pages/coffeescript', |
| 41 | 'pages/d3', | 40 | 'pages/d3', |
| 42 | 'pages/dojo', | 41 | 'pages/dojo', |
| @@ -36,7 +36,6 @@ · 35 unmodified lines | |||
| 36 | 'pages/cakephp', | 36 | 'pages/cakephp', |
| 37 | 'pages/chai', | 37 | 'pages/chai', |
| 38 | 'pages/clojure', | 38 | 'pages/clojure', |
| 39 | 'pages/codeigniter', | ||
| 40 | 'pages/coffeescript', | 39 | 'pages/coffeescript', |
| 41 | 'pages/d3', | 40 | 'pages/d3', |
| 42 | 'pages/dojo', | 41 | 'pages/dojo', |
| @@ -126,3 +126,4 @@ · 125 unmodified lines | |||
| 126 | ._icon-erlang:before { background-position: -1rem -10rem; } | 126 | ._icon-erlang:before { background-position: -1rem -10rem; } |
| 127 | ._icon-chef:before { background-position: -2rem -10rem; } | 127 | ._icon-chef:before { background-position: -2rem -10rem; } |
| 128 | ._icon-ramda:before { background-position: -3rem -10rem; @extend %darkIconFix !optional; } | 128 | ._icon-ramda:before { background-position: -3rem -10rem; @extend %darkIconFix !optional; } |
| 129 | ._icon-codeigniter:before { background-position: -4rem -10rem; @extend %darkIconFix !optional; } | ||
| @@ -1,6 +0,0 @@ | |||
| 1 | ._codeigniter { | ||
| 2 | @extend %sphinx; | ||
| 3 | |||
| 4 | .important { @extend %note-orange; } | ||
| 5 | .warning { @extend %note-red; } | ||
| 6 | } | ||
| @@ -4,7 +4,8 @@ · 3 unmodified lines | |||
| 4 | dt + dt { margin-top: -.5em; } | 4 | dt + dt { margin-top: -.5em; } |
| 5 | 5 | ||
| 6 | .note, .admonition, .versionadded, .versionchanged, .deprecated-removed { @extend %note; } | 6 | .note, .admonition, .versionadded, .versionchanged, .deprecated-removed { @extend %note; } |
| 7 | .deprecated-removed { @extend %note-red; } | 7 | .important { @extend %note-orange; } |
| 8 | .warning, .deprecated-removed { @extend %note-red; } | ||
| 8 | .versionmodified { font-weight: bold; } | 9 | .versionmodified { font-weight: bold; } |
| 9 | 10 | ||
| 10 | p > code, li > code { @extend %label; } | 11 | p > code, li > code { @extend %label; } |
| @@ -26,5 +27,5 @@ · 15 unmodified lines | |||
| 26 | } | 27 | } |
| 27 | 28 | ||
| 28 | ._sphinx { | 29 | ._sphinx { |
| 29 | @extend %sphinx | 30 | @extend %sphinx; |
| 30 | } | 31 | } |
| @@ -8,16 +8,22 @@ module Docs · 7 unmodified lines | |||
| 8 | node.content = node.content | 8 | node.content = node.content |
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | css('div[class^="highlight-"]').each do |node| | ||
| 12 | node.content = node.content.strip | ||
| 13 | node.name = 'pre' | ||
| 14 | node['class'] = 'php' if node['class'].include?('highlight-ci') | ||
| 15 | end | ||
| 16 | |||
| 11 | css('table').each do |node| | 17 | css('table').each do |node| |
| 12 | node.remove_attribute 'border' | 18 | node.remove_attribute 'border' |
| 13 | end | 19 | end |
| 14 | 20 | ||
| 15 | css('.section > h2', '.section > h3', '.section > h4', '.section > h5').each do |node| | 21 | css('.section').each do |node| |
| 16 | node['id'] = node.parent['id'] | 22 | node.first_element_child['id'] = node['id'] if node['id'] |
| 17 | node.parent.remove_attribute 'id' | 23 | node.before(node.children).remove |
| 18 | end | 24 | end |
| 19 | 25 | ||
| 20 | doc.children | 26 | doc |
| 21 | end | 27 | end |
| 22 | end | 28 | end |
| 23 | end | 29 | end |
| @@ -1,38 +1,43 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Codeigniter | 2 | class Codeigniter |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def include_default_entry? | ||
| 5 | not slug.ends_with? 'index' | ||
| 6 | end | ||
| 7 | |||
| 8 | def get_name | 4 | def get_name |
| 9 | at_css('h1').content.strip | 5 | at_css('h1').content.strip |
| 10 | end | 6 | end |
| 11 | 7 | ||
| 12 | def get_type | 8 | def get_type |
| 13 | slug.split('/')[0].capitalize | 9 | type = slug.split('/').first.capitalize |
| 10 | |||
| 11 | if type.in? %w(Tutorial Installation Overview General) | ||
| 12 | type.prepend 'User guide: ' | ||
| 13 | elsif type.in? %w(Libraries Helpers) | ||
| 14 | type = name.remove %r{\ (?:Helper|Class|Classes|Library|Driver)\z} | ||
| 15 | end | ||
| 16 | |||
| 17 | type | ||
| 14 | end | 18 | end |
| 15 | 19 | ||
| 16 | def additional_entries | 20 | def additional_entries |
| 17 | entries = [] | 21 | entries = [] |
| 18 | 22 | ||
| 19 | css('.class').each do |c_node| | 23 | css('.class').each do |node| |
| 20 | c_name = c_node.at_css('dt > .descname').content | 24 | class_name = node.at_css('dt > .descname').content |
| 21 | c_id = c_node.at_css('dt')['id'] | 25 | class_id = node.at_css('dt[id]')['id'] |
| 22 | entries << [c_name, c_id, get_type] | 26 | entries << [class_name, class_id] |
| 23 | 27 | ||
| 24 | c_node.css('.method').each do |node| | 28 | node.css('.method').each do |n| |
| 25 | m_name = node.at_css('.descname').content | 29 | name = n.at_css('.descname').content |
| 26 | name = c_name + '::' + m_name + '()' | 30 | name = "#{class_name}::#{name}()" |
| 27 | id = node.at_css('dt')['id'] | 31 | id = node.at_css('dt[id]')['id'] |
| 28 | entries << [name, id, get_type] | 32 | entries << [name, id] |
| 29 | end | 33 | end |
| 30 | end | 34 | end |
| 31 | 35 | ||
| 32 | css('.function').each do |node| | 36 | css('.function').each do |node| |
| 33 | name = node.at_css('.descname').content + '()' | 37 | name = "#{node.at_css('.descname').content}()" |
| 34 | id = node.at_css('dt')['id'] | 38 | id = node.at_css('dt[id]')['id'] |
| 35 | entries << [name, id, get_type] | 39 | type = self.type.start_with?('User guide') ? 'Functions' : self.type |
| 40 | entries << [name, id, type] | ||
| 36 | end | 41 | end |
| 37 | 42 | ||
| 38 | entries | 43 | entries |
| @@ -1,12 +1,11 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Codeigniter < UrlScraper | 2 | class Codeigniter < UrlScraper |
| 3 | self.name = 'CodeIgniter' | 3 | self.name = 'CodeIgniter' |
| 4 | self.type = 'codeigniter' | 4 | self.type = 'sphinx' |
| 5 | self.release = '3.0' | 5 | self.base_url = 'https://www.codeigniter.com/user_guide/' |
| 6 | self.base_url = 'http://www.codeigniter.com/user_guide/' | ||
| 7 | self.root_path = 'index.html' | 6 | self.root_path = 'index.html' |
| 8 | self.links = { | 7 | self.links = { |
| 9 | home: 'http://codeigniter.com/', | 8 | home: 'https://codeigniter.com/', |
| 10 | code: 'https://github.com/bcit-ci/CodeIgniter' | 9 | code: 'https://github.com/bcit-ci/CodeIgniter' |
| 11 | } | 10 | } |
| 12 | 11 | ||
| @@ -14,22 +13,30 @@ module Docs · 1 unmodified line | |||
| 14 | 13 | ||
| 15 | options[:container] = '.document' | 14 | options[:container] = '.document' |
| 16 | 15 | ||
| 17 | options[:only_patterns] = [ | ||
| 18 | /\Ageneral/, | ||
| 19 | /\Alibraries/, | ||
| 20 | /\Adatabase/, | ||
| 21 | /\Ahelpers/ | ||
| 22 | ] | ||
| 23 | |||
| 24 | options[:skip] = %w( | 16 | options[:skip] = %w( |
| 17 | license.html | ||
| 18 | changelog.html | ||
| 19 | DCO.html | ||
| 25 | general/welcome.html | 20 | general/welcome.html |
| 26 | general/requirements.html | 21 | general/requirements.html |
| 27 | general/credits.html | 22 | general/credits.html |
| 23 | libraries/index.html | ||
| 24 | helpers/index.html | ||
| 28 | ) | 25 | ) |
| 29 | 26 | ||
| 27 | options[:skip_patterns] = [ | ||
| 28 | /\Acontributing/, | ||
| 29 | /\Adocumentation/, | ||
| 30 | /\Ainstallation\/upgrade/ | ||
| 31 | ] | ||
| 32 | |||
| 30 | options[:attribution] = <<-HTML | 33 | options[:attribution] = <<-HTML |
| 31 | © British Columbia Institute of Technology<br> | 34 | © 2014–2016 British Columbia Institute of Technology<br> |
| 32 | Licensed under the MIT License. | 35 | Licensed under the MIT License. |
| 33 | HTML | 36 | HTML |
| 37 | |||
| 38 | version '3.0' do | ||
| 39 | self.release = '3.0.4' | ||
| 40 | end | ||
| 34 | end | 41 | end |
| 35 | end | 42 | end |
Binary file not shown.
Binary file not shown.
Binary file not shown.