Browse Source

Fix styling and added licnese to about page

dohsimpson 4 years ago
parent
commit
0339b078a5

+ 5 - 0
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -686,6 +686,11 @@ credits = [
     '2013-present Facebook Inc.',
     'MIT',
     'https://raw.githubusercontent.com/facebook/react/master/LICENSE'
+  ], [
+    'React Bootstrap',
+    '2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff',
+    'MIT',
+    'https://raw.githubusercontent.com/react-bootstrap/react-bootstrap/master/LICENSE'
   ], [
     'ReactiveX',
     'ReactiveX contributors',

+ 6 - 4
lib/docs/filters/react_bootstrap/clean_html.rb

@@ -5,10 +5,12 @@ module Docs
         css('.flex-column.d-flex').remove
         css('header').remove
         css('.bs-example').remove
-        css('.position-relative').each do |node|
-          code = node.at_css('textarea')
-          code.name = 'pre'
-          code['style'] = code['style'] + '; border: solid 1px;'
+
+        css('.position-relative pre').each do |node|
+          # node.content = node.content
+          node.remove_attribute('style')
+          node['data-language'] = 'jsx'
+          node.parent.replace(node)
         end
         doc
       end