Parcourir la source

Remove images in the root page and improve style.

- Fix pages with tables where information lacked spaces.
MasterEnoc il y a 5 ans
Parent
commit
34aeb5f9a2
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      lib/docs/filters/pandas/clean_html.rb

+ 11 - 0
lib/docs/filters/pandas/clean_html.rb

@@ -3,10 +3,21 @@ module Docs
     class CleanHtmlFilter < Filter
       def call
 
+        if root_page?
+          css('img').remove
+        end
+
         css('#navbar-main').remove
 
         css('form').remove
 
+        # add ':' to '.classifier' clases
+        css('.classifier').each do |node|
+          text = node.content
+          node.content = ':' + text
+          node.content = node.content.gsub(/::/, ' : ')
+        end
+
         # sidebar
         css('ul.nav.bd-sidenav').remove