Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | + "2018-07-08", | |
| 4 | + "New documentation: <a href=\"/leaflet/\">Leaflet</a>" | |
| 5 | + ], [ | |
| 3 | 6 | "2018-03-26", |
| 4 | 7 | "DevDocs is joining the freeCodeCamp community. Read the announcement <a href=\"https://medium.freecodecamp.org/devdocs-is-joining-the-freecodecamp-community-ae185a1c14a6\" target=\"_blank\">here</a>." |
| 5 | 8 | ], [ |
| @@ -375,6 +375,11 @@ credits = [ · 374 unmodified lines | ||
| 375 | 375 | 'Taylor Otwell', |
| 376 | 376 | 'MIT', |
| 377 | 377 | 'https://raw.githubusercontent.com/laravel/framework/master/LICENSE.txt' |
| 378 | + ], [ | |
| 379 | + 'Leaflet', | |
| 380 | + '2010-2018 Vladimir Agafonkin<br>© 2010-2011, CloudMade<br>Maps © OpenStreetMap contributors.', | |
| 381 | + 'BSD', | |
| 382 | + 'https://raw.githubusercontent.com/Leaflet/Leaflet/master/LICENSE' | |
| 378 | 383 | ], [ |
| 379 | 384 | 'Less', |
| 380 | 385 | '2009-2016 The Core Less Team', |
| @@ -170,3 +170,4 @@ · 169 unmodified lines | ||
| 170 | 170 | ._icon-homebrew:before { background-position: 0 -3rem; @extend %doc-icon-2; } |
| 171 | 171 | ._icon-jekyll:before { background-position: -1rem -3rem; @extend %doc-icon-2; } |
| 172 | 172 | ._icon-babel:before { background-position: -2rem -3rem; @extend %doc-icon-2; } |
| 173 | +._icon-leaflet:before { background-position: -3rem -3rem; @extend %doc-icon-2; } | |
| @@ -2,18 +2,35 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Leaflet |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − css('#toc', '.expander').remove | |
| 5 | + css('#toc', '.expander', '.footer').remove | |
| 6 | + | |
| 7 | + css('h1').each do |node| | |
| 8 | + node.name = 'h2' | |
| 9 | + end | |
| 10 | + | |
| 11 | + at_css('> h2:first-child').name = 'h1' | |
| 6 | 12 | |
| 7 | 13 | # remove "This reference reflects Leaflet 1.2.0." |
| 8 | − css('h2 ~ p').each do |node| | |
| 14 | + css('h1 ~ p').each do |node| | |
| 9 | 15 | node.remove |
| 10 | 16 | break |
| 11 | 17 | end |
| 12 | 18 | |
| 13 | − # syntax highlighting | |
| 14 | − css('code.lang-js').each do |node| | |
| 15 | − node.parent['data-language'] = 'javascript' | |
| 16 | − node.parent.content = node.content | |
| 19 | + css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node| | |
| 20 | + node.before(node.children).remove | |
| 21 | + end | |
| 22 | + | |
| 23 | + css('pre > code').each do |node| | |
| 24 | + node['class'] ||= '' | |
| 25 | + lang = if node['class'].include?('lang-html') || node.content =~ /\A</ | |
| 26 | + 'html' | |
| 27 | + elsif node['class'].include?('lang-css') | |
| 28 | + 'css' | |
| 29 | + elsif node['class'].include?('lang-js') || node['class'].include?('lang-javascript') | |
| 30 | + 'javascript' | |
| 31 | + end | |
| 32 | + node.parent['data-language'] = lang if lang | |
| 33 | + node.before(node.children).remove | |
| 17 | 34 | end |
| 18 | 35 | |
| 19 | 36 | doc |
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Leaflet < UrlScraper |
| 3 | 3 | self.name = 'Leaflet' |
| 4 | − self.type = 'leaflet' | |
| 4 | + self.type = 'simple' | |
| 5 | 5 | self.slug = 'leaflet' |
| 6 | 6 | self.links = { |
| 7 | − home: 'http://leafletjs.com/', | |
| 7 | + home: 'https://leafletjs.com/', | |
| 8 | 8 | code: 'https://github.com/Leaflet/Leaflet' |
| 9 | 9 | } |
| 10 | 10 | |
| @@ -14,23 +14,29 @@ module Docs · 3 unmodified lines | ||
| 14 | 14 | options[:skip_links] = true |
| 15 | 15 | |
| 16 | 16 | options[:attribution] = <<-HTML |
| 17 | − © 2017 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. | |
| 18 | − Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p> | |
| 17 | + © 2010–2018 Vladimir Agafonkin<br> | |
| 18 | + © 2010–2011, CloudMade<br> | |
| 19 | + Maps © OpenStreetMap contributors. | |
| 19 | 20 | HTML |
| 20 | 21 | |
| 22 | + version '1.3' do | |
| 23 | + self.release = '1.3.0' | |
| 24 | + self.base_url = "https://leafletjs.com/reference-#{release}.html" | |
| 25 | + end | |
| 26 | + | |
| 21 | 27 | version '1.2' do |
| 22 | 28 | self.release = '1.2.0' |
| 23 | − self.base_url = "http://leafletjs.com/reference-#{release}.html" | |
| 29 | + self.base_url = "https://leafletjs.com/reference-#{release}.html" | |
| 24 | 30 | end |
| 25 | 31 | |
| 26 | 32 | version '1.1' do |
| 27 | 33 | self.release = '1.1.0' |
| 28 | − self.base_url = "http://leafletjs.com/reference-#{release}.html" | |
| 34 | + self.base_url = "https://leafletjs.com/reference-#{release}.html" | |
| 29 | 35 | end |
| 30 | 36 | |
| 31 | 37 | version '1.0' do |
| 32 | 38 | self.release = '1.0.3' |
| 33 | − self.base_url = "http://leafletjs.com/reference-#{release}.html" | |
| 39 | + self.base_url = "https://leafletjs.com/reference-#{release}.html" | |
| 34 | 40 | end |
| 35 | 41 | |
| 36 | 42 | end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.