History

Add fluture documentation (14.0.0)

Jan Christoph Ebersbach committed 3 years ago

Commit e8f04b91 parent acbf6848 files · +82 −-2Browse files

Unified · Split

8 files
  1. assets/stylesheets/application.css.scss +1 −0
  2. assets/stylesheets/pages/_fluture.scss +7 −0
  3. lib/docs/filters/fluture/clean_html.rb +22 −0
  4. lib/docs/filters/fluture/entries.rb +24 −0
  5. lib/docs/scrapers/fluture.rb +29 −0
  6. public/icons/docs/fluture/16.png +0 −0
  7. public/icons/docs/fluture/16@2x.png +0 −0
  8. public/icons/docs/fluture/SOURCE +1 −0
assets/stylesheets/application.css.scss+1−0
@@ -59,6 +59,7 @@ · 58 unmodified lines
5959 'pages/erlang',
6060 'pages/express',
6161 'pages/fastapi',
62+ 'pages/fluture',
6263 'pages/git',
6364 'pages/github',
6465 'pages/gnuplot',
assets/stylesheets/pages/_fluture.scss+7−0
@@ -0,0 +1,7 @@
1+._fluture {
2+ @extend %simple;
3+
4+ pre > code {
5+ font-size: inherit;
6+ }
7+}
lib/docs/filters/fluture/clean_html.rb+22−0
@@ -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
lib/docs/filters/fluture/entries.rb+24−0
@@ -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
lib/docs/scrapers/fluture.rb+29−0
@@ -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+ &copy; 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
public/icons/docs/fluture/16.png+0−0

Binary file not shown.

public/icons/docs/fluture/16@2x.png+0−0

Binary file not shown.

public/icons/docs/fluture/SOURCE+1−0
@@ -0,0 +1 @@
1+https://github.com/fluture-js/Fluture/

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t