Skip to content

Commit e8f04b9

Browse files
committed
Add fluture documentation (14.0.0)
1 parent acbf684 commit e8f04b9

File tree

8 files changed

+84
-0
lines changed

8 files changed

+84
-0
lines changed

assets/stylesheets/application.css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
'pages/erlang',
6060
'pages/express',
6161
'pages/fastapi',
62+
'pages/fluture',
6263
'pages/git',
6364
'pages/github',
6465
'pages/gnuplot',
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
._fluture {
2+
@extend %simple;
3+
4+
pre > code {
5+
font-size: inherit;
6+
}
7+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3.66 KB
Loading
4.19 KB
Loading

public/icons/docs/fluture/SOURCE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/fluture-js/Fluture/

0 commit comments

Comments
 (0)