diff --git a/assets/images/docs-2.png b/assets/images/docs-2.png index a1758a0e..ac9ca5e8 100644 Binary files a/assets/images/docs-2.png and b/assets/images/docs-2.png differ diff --git a/assets/images/docs-2@2x.png b/assets/images/docs-2@2x.png index b2d719c2..d376d2e1 100644 Binary files a/assets/images/docs-2@2x.png and b/assets/images/docs-2@2x.png differ diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 461073ec..e0111413 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,5 +1,8 @@ [ [ + "2018-07-08", + "New documentation: Leaflet" + ], [ "2018-03-26", "DevDocs is joining the freeCodeCamp community. Read the announcement here." ], [ diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 9cfc1a0b..ea59df98 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -375,6 +375,11 @@ credits = [ 'Taylor Otwell', 'MIT', 'https://raw.githubusercontent.com/laravel/framework/master/LICENSE.txt' + ], [ + 'Leaflet', + '2010-2018 Vladimir Agafonkin
© 2010-2011, CloudMade
Maps © OpenStreetMap contributors.', + 'BSD', + 'https://raw.githubusercontent.com/Leaflet/Leaflet/master/LICENSE' ], [ 'Less', '2009-2016 The Core Less Team', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index a4ae5bf1..d74581be 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -170,3 +170,4 @@ ._icon-homebrew:before { background-position: 0 -3rem; @extend %doc-icon-2; } ._icon-jekyll:before { background-position: -1rem -3rem; @extend %doc-icon-2; } ._icon-babel:before { background-position: -2rem -3rem; @extend %doc-icon-2; } +._icon-leaflet:before { background-position: -3rem -3rem; @extend %doc-icon-2; } diff --git a/lib/docs/filters/leaflet/clean_html.rb b/lib/docs/filters/leaflet/clean_html.rb index c8d000f3..802463de 100644 --- a/lib/docs/filters/leaflet/clean_html.rb +++ b/lib/docs/filters/leaflet/clean_html.rb @@ -2,18 +2,35 @@ module Docs class Leaflet class CleanHtmlFilter < Filter def call - css('#toc', '.expander').remove + css('#toc', '.expander', '.footer').remove + + css('h1').each do |node| + node.name = 'h2' + end + + at_css('> h2:first-child').name = 'h1' # remove "This reference reflects Leaflet 1.2.0." - css('h2 ~ p').each do |node| + css('h1 ~ p').each do |node| node.remove break end - # syntax highlighting - css('code.lang-js').each do |node| - node.parent['data-language'] = 'javascript' - node.parent.content = node.content + css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node| + node.before(node.children).remove + end + + css('pre > code').each do |node| + node['class'] ||= '' + lang = if node['class'].include?('lang-html') || node.content =~ /\AVladimir Agafonkin. - Maps © OpenStreetMap contributors.

+ © 2010–2018 Vladimir Agafonkin
+ © 2010–2011, CloudMade
+ Maps © OpenStreetMap contributors. HTML + version '1.3' do + self.release = '1.3.0' + self.base_url = "https://leafletjs.com/reference-#{release}.html" + end + version '1.2' do self.release = '1.2.0' - self.base_url = "http://leafletjs.com/reference-#{release}.html" + self.base_url = "https://leafletjs.com/reference-#{release}.html" end version '1.1' do self.release = '1.1.0' - self.base_url = "http://leafletjs.com/reference-#{release}.html" + self.base_url = "https://leafletjs.com/reference-#{release}.html" end version '1.0' do self.release = '1.0.3' - self.base_url = "http://leafletjs.com/reference-#{release}.html" + self.base_url = "https://leafletjs.com/reference-#{release}.html" end end diff --git a/public/icons/docs-2.pxm b/public/icons/docs-2.pxm index 0cb4c478..aa38c85b 100644 Binary files a/public/icons/docs-2.pxm and b/public/icons/docs-2.pxm differ diff --git a/public/icons/docs-2@2x.pxm b/public/icons/docs-2@2x.pxm index 8adb507c..eae36db9 100644 Binary files a/public/icons/docs-2@2x.pxm and b/public/icons/docs-2@2x.pxm differ diff --git a/public/icons/docs/leaflet/16.png b/public/icons/docs/leaflet/16.png index d2627fe3..f0638e03 100644 Binary files a/public/icons/docs/leaflet/16.png and b/public/icons/docs/leaflet/16.png differ diff --git a/public/icons/docs/leaflet/16@2x.png b/public/icons/docs/leaflet/16@2x.png index 8ebfbc05..24f0150d 100644 Binary files a/public/icons/docs/leaflet/16@2x.png and b/public/icons/docs/leaflet/16@2x.png differ