Unified · Split
| @@ -59,6 +59,7 @@ · 58 unmodified lines | |||
| 59 | 'pages/erlang', | 59 | 'pages/erlang', |
| 60 | 'pages/express', | 60 | 'pages/express', |
| 61 | 'pages/fastapi', | 61 | 'pages/fastapi', |
| 62 | 'pages/fluture', | ||
| 62 | 'pages/git', | 63 | 'pages/git', |
| 63 | 'pages/github', | 64 | 'pages/github', |
| 64 | 'pages/gnuplot', | 65 | 'pages/gnuplot', |
| @@ -0,0 +1,7 @@ | |||
| 1 | ._fluture { | ||
| 2 | @extend %simple; | ||
| 3 | |||
| 4 | pre > code { | ||
| 5 | font-size: inherit; | ||
| 6 | } | ||
| 7 | } | ||
| @@ -0,0 +1,22 @@ | |||
| 1 | module Docs | ||
| 2 | class Fluture | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | # Replace header image with text | ||
| 6 | at_css('h1').content = 'Fluture' | ||
| 7 | |||
| 8 | # Remove the build line | ||
| 9 | css('h1 ~ p:first-of-type').remove | ||
| 10 | |||
| 11 | # Remove the fantasy land image link | ||
| 12 | css('p a').remove | ||
| 13 | |||
| 14 | # Make headers bigger by transforming them into a bigger variant | ||
| 15 | css('h3').each { |node| node.name = 'h2' } | ||
| 16 | css('h4').each { |node| node.name = 'h3' } | ||
| 17 | |||
| 18 | doc | ||
| 19 | end | ||
| 20 | end | ||
| 21 | end | ||
| 22 | end | ||
| @@ -0,0 +1,24 @@ | |||
| 1 | module Docs | ||
| 2 | class Fluture | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | # The entire reference is one big page, so get_name and get_type are not necessary | ||
| 5 | def additional_entries | ||
| 6 | entries = [] | ||
| 7 | type = "" | ||
| 8 | |||
| 9 | css("h3, h4").each do |node| | ||
| 10 | case node.name | ||
| 11 | when "h3" | ||
| 12 | type = node.text | ||
| 13 | when "h4" | ||
| 14 | name = node.text | ||
| 15 | id = node.text.downcase | ||
| 16 | entries << [name, id, type] | ||
| 17 | end | ||
| 18 | end | ||
| 19 | |||
| 20 | entries | ||
| 21 | end | ||
| 22 | end | ||
| 23 | end | ||
| 24 | end | ||
| @@ -0,0 +1,29 @@ | |||
| 1 | module Docs | ||
| 2 | |||
| 3 | class Fluture < Github | ||
| 4 | self.name = "Fluture" | ||
| 5 | self.slug = "fluture" | ||
| 6 | self.type = "fluture" | ||
| 7 | self.release = "14.0.0" | ||
| 8 | self.base_url = "https://github.com/fluture-js/Fluture/blob/#{self.release}/README.md" | ||
| 9 | self.links = { | ||
| 10 | home: "https://github.com/fluture-js/Fluture", | ||
| 11 | code: "https://github.com/fluture-js/Fluture", | ||
| 12 | } | ||
| 13 | |||
| 14 | html_filters.push "fluture/entries", "fluture/clean_html" | ||
| 15 | |||
| 16 | options[:skip] = %w[middleware.gif] | ||
| 17 | options[:container] = '.markdown-body' | ||
| 18 | options[:title] = "Fluture" | ||
| 19 | options[:trailing_slash] = false | ||
| 20 | options[:attribution] = <<-HTML | ||
| 21 | © 2020 Aldwin Vlasblom<br> | ||
| 22 | Licensed under the MIT License. | ||
| 23 | HTML | ||
| 24 | |||
| 25 | def get_latest_version(opts) | ||
| 26 | get_npm_version("fluture", opts) | ||
| 27 | end | ||
| 28 | end | ||
| 29 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://github.com/fluture-js/Fluture/ | ||