mirror of https://github.com/freeCodeCamp/devdocs
commit
bf53a00ca9
@ -1,4 +1,7 @@
|
||||
language: ruby
|
||||
|
||||
cache: bundler
|
||||
|
||||
before_script:
|
||||
- gem update --system
|
||||
- gem install bundler
|
||||
|
@ -1,107 +0,0 @@
|
||||
//= depend_on sprites/docs.png
|
||||
//= depend_on sprites/docs@2x.png
|
||||
//= depend_on sprites/docs.json
|
||||
|
||||
/*!
|
||||
* Copyright 2013-2018 Thibaut Courouble and other contributors
|
||||
*
|
||||
* This source code is licensed under the terms of the Mozilla
|
||||
* Public License, v. 2.0, a copy of which may be obtained at:
|
||||
* http://mozilla.org/MPL/2.0/
|
||||
*/
|
||||
|
||||
@import 'global/variables-dark',
|
||||
'global/mixins',
|
||||
'global/icons',
|
||||
'global/classes',
|
||||
'global/base';
|
||||
|
||||
@import 'components/app',
|
||||
'components/header',
|
||||
'components/notif',
|
||||
'components/sidebar',
|
||||
'components/settings',
|
||||
'components/content',
|
||||
'components/page',
|
||||
'components/fail',
|
||||
'components/path',
|
||||
'components/notice',
|
||||
'components/prism',
|
||||
'components/mobile';
|
||||
|
||||
@import 'pages/simple',
|
||||
'pages/angular',
|
||||
'pages/angularjs',
|
||||
'pages/apache',
|
||||
'pages/async',
|
||||
'pages/bash',
|
||||
'pages/bootstrap',
|
||||
'pages/c',
|
||||
'pages/cakephp',
|
||||
'pages/clojure',
|
||||
'pages/codeception',
|
||||
'pages/coffeescript',
|
||||
'pages/cordova',
|
||||
'pages/crystal',
|
||||
'pages/d',
|
||||
'pages/d3',
|
||||
'pages/dart',
|
||||
'pages/dojo',
|
||||
'pages/drupal',
|
||||
'pages/elixir',
|
||||
'pages/ember',
|
||||
'pages/erlang',
|
||||
'pages/express',
|
||||
'pages/git',
|
||||
'pages/github',
|
||||
'pages/go',
|
||||
'pages/graphite',
|
||||
'pages/haskell',
|
||||
'pages/jekyll',
|
||||
'pages/jquery',
|
||||
'pages/julia',
|
||||
'pages/knockout',
|
||||
'pages/kotlin',
|
||||
'pages/laravel',
|
||||
'pages/liquid',
|
||||
'pages/love',
|
||||
'pages/lua',
|
||||
'pages/mdn',
|
||||
'pages/meteor',
|
||||
'pages/modernizr',
|
||||
'pages/moment',
|
||||
'pages/nginx',
|
||||
'pages/node',
|
||||
'pages/npm',
|
||||
'pages/openjdk',
|
||||
'pages/perl',
|
||||
'pages/phalcon',
|
||||
'pages/phaser',
|
||||
'pages/php',
|
||||
'pages/phpunit',
|
||||
'pages/postgres',
|
||||
'pages/pug',
|
||||
'pages/python',
|
||||
'pages/qt',
|
||||
'pages/ramda',
|
||||
'pages/rdoc',
|
||||
'pages/react_native',
|
||||
'pages/redis',
|
||||
'pages/rethinkdb',
|
||||
'pages/rfc',
|
||||
'pages/rubydoc',
|
||||
'pages/rust',
|
||||
'pages/sinon',
|
||||
'pages/socketio',
|
||||
'pages/sphinx',
|
||||
'pages/sphinx_simple',
|
||||
'pages/sqlite',
|
||||
'pages/support_tables',
|
||||
'pages/tcl_tk',
|
||||
'pages/tensorflow',
|
||||
'pages/terraform',
|
||||
'pages/underscore',
|
||||
'pages/vue',
|
||||
'pages/webpack',
|
||||
'pages/yard',
|
||||
'pages/yii';
|
@ -1,92 +1,76 @@
|
||||
$baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
|
||||
$monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
$boldFontWeight: 500;
|
||||
$bolderFontWeight: 600;
|
||||
html._theme-dark {
|
||||
--absolute: white;
|
||||
|
||||
$style: 'dark';
|
||||
--documentBackground: #222;
|
||||
--contentBackground: #33373a;
|
||||
|
||||
$maxWidth: 80rem;
|
||||
$headerHeight: 3rem;
|
||||
$sidebarWidth: 20rem;
|
||||
$sidebarMediumWidth: 16rem;
|
||||
--textColor: #cbd0d0;
|
||||
--textColorLight: #9da5ad;
|
||||
--textColorLighter: #77787a;
|
||||
|
||||
$documentBackground: #222;
|
||||
$contentBackground: #33373a;
|
||||
--externalsBackground: #fff;
|
||||
|
||||
$textColor: #cbd0d0;
|
||||
$textColorLight: #9da5ad;
|
||||
$textColorLighter: #77787a;
|
||||
$textColorRed: #f44336;
|
||||
--inputFocusBorder: transparent;
|
||||
|
||||
$inputFocusBorder: false;
|
||||
--focusBackground: #3f4042;
|
||||
--focusBorder: #000;
|
||||
--focusText: #f7f2f2;
|
||||
|
||||
$focusBackground: #3f4042;
|
||||
$focusBorder: #000;
|
||||
$focusText: #f7f2f2;
|
||||
--loadingText: #5d6164;
|
||||
|
||||
$loadingText: #5d6164;
|
||||
$splashText: $loadingText;
|
||||
--selectionBackground: #007acc;
|
||||
--selectionBorder: #000;
|
||||
|
||||
$selectionBackground: #007acc;
|
||||
$selectionBorder: #000;
|
||||
$selectionText: #fff;
|
||||
--highlightBackground: #64675f;
|
||||
|
||||
$highlightBackground: #64675f;
|
||||
--linkColor: var(--textColor);
|
||||
--linkColorHover: white;
|
||||
--linkTextDecoration: underline;
|
||||
|
||||
$linkColor: $textColor;
|
||||
$linkColorHover: white;
|
||||
$linkTextDecoration: underline;
|
||||
--headerBackground: #1c1c1c;
|
||||
--headerBorder: #000;
|
||||
--searchTagBackground: #{darken(#1c1c1c, 5%)};
|
||||
--searchBorder: #{darken(#000, 2%)};
|
||||
|
||||
$headerBackground: #1c1c1c;
|
||||
$headerBorder: #000;
|
||||
--sidebarBackground: #24282a;
|
||||
--transparentSidebarBackground: #{rgba(#24282a, 0)};
|
||||
--sidebarBorder: #000;
|
||||
|
||||
$sidebarBackground: #24282a;
|
||||
$sidebarBorder: #000;
|
||||
--scrollbarColor: #6c6c6f;
|
||||
--scrollbarColorHover: #949697;
|
||||
|
||||
$scrollbarColor: #6c6c6f;
|
||||
$scrollbarColorHover: #949697;
|
||||
--pathBackground: var(--headerBackground);
|
||||
--pathBorder: var(--headerBorder);
|
||||
|
||||
$pathBackground: $headerBackground;
|
||||
$pathBorder: $headerBorder;
|
||||
--noticeBackground: var(--sidebarBackground);
|
||||
--noticeBorder: var(--sidebarBorder);
|
||||
|
||||
$noticeBackground: $sidebarBackground;
|
||||
$noticeBorder: $sidebarBorder;
|
||||
--boxBackground: var(--sidebarBackground);
|
||||
--boxBorder: var(--headerBorder);
|
||||
--boxBorderLight: var(--headerBorder);
|
||||
--boxHeaderColor: #dbe4e4;
|
||||
--boxHeaderBackground: var(--sidebarBackground);
|
||||
|
||||
$boxBackground: $sidebarBackground;
|
||||
$boxBorder: $headerBorder;
|
||||
$boxBorderLight: $headerBorder;
|
||||
$boxHeaderColor: #dbe4e4;
|
||||
$boxHeaderBackground: $sidebarBackground;
|
||||
--noteBackground: #45474b;
|
||||
--noteBorder: #000;
|
||||
|
||||
$noteBackground: #45474b;
|
||||
$noteBorder: #000;
|
||||
--noteGreenBackground: #284a2a;
|
||||
--noteGreenBorder: #000;
|
||||
|
||||
$noteGreenBackground: #284a2a;
|
||||
$noteGreenBorder: #000;
|
||||
--noteBlueBackground: #2a4151;
|
||||
--noteBlueBorder: #000;
|
||||
|
||||
$noteBlueBackground: #2a4151;
|
||||
$noteBlueBorder: #000;
|
||||
--noteOrangeBackground: #563322;
|
||||
--noteOrangeBorder: #000;
|
||||
|
||||
$noteOrangeBackground: #563322;
|
||||
$noteOrangeBorder: #000;
|
||||
--noteRedBackground: #603033;
|
||||
--noteRedBorder: #000;
|
||||
|
||||
$noteRedBackground: #603033;
|
||||
$noteRedBorder: #000;
|
||||
--labelBackground: var(--boxBackground);
|
||||
|
||||
$labelBackground: $boxBackground;
|
||||
--notifBackground: #{rgba(#555, .95)};
|
||||
--notifBorder: 1px solid #000;
|
||||
|
||||
$notifBackground: rgba(#555, .95);
|
||||
$notifBorder: 1px solid #000;
|
||||
$notifColor: #fff;
|
||||
$notifColorLight: #ccc;
|
||||
|
||||
$tipBackground: $notifBackground;
|
||||
$tipBorder: $notifBorder;
|
||||
|
||||
$mediumScreen: '(max-width: 800px)';
|
||||
|
||||
$contentZ: 1;
|
||||
$sidebarZ: 2;
|
||||
$headerZ: 3;
|
||||
$noticeZ: 4;
|
||||
$hoverZ: 5;
|
||||
--tipBackground: var(--notifBackground);
|
||||
--tipBorder: var(--notifBorder);
|
||||
}
|
||||
|
@ -0,0 +1,76 @@
|
||||
html._theme-default {
|
||||
--absolute: black;
|
||||
|
||||
--documentBackground: #f3f3f3;
|
||||
--contentBackground: #fff;
|
||||
|
||||
--textColor: #333;
|
||||
--textColorLight: #666;
|
||||
--textColorLighter: #888;
|
||||
|
||||
--externalsBackground: #fff;
|
||||
|
||||
--inputFocusBorder: #35b5f4;
|
||||
|
||||
--focusBackground: #e5e5e5;
|
||||
--focusBorder: #d4d4d4;
|
||||
--focusText: #000;
|
||||
|
||||
--loadingText: #ccc;
|
||||
|
||||
--selectionBackground: #398df0;
|
||||
--selectionBorder: #196fc2;
|
||||
|
||||
--highlightBackground: #fffdcd;
|
||||
|
||||
--linkColor: #3377c0;
|
||||
--linkColorHover: #2f6cb6;
|
||||
--linkTextDecoration: none;
|
||||
|
||||
--headerBackground: #eee;
|
||||
--headerBorder: #d7d7d7;
|
||||
--searchTagBackground: #{darken(#eee, 5%)};
|
||||
--searchBorder: #{darken(#d7d7d7, 2%)};
|
||||
|
||||
--sidebarBackground: #f9f9f9;
|
||||
--transparentSidebarBackground: #{rgba(#f9f9f9, 0)};
|
||||
--sidebarBorder: #e1e1e1;
|
||||
|
||||
--scrollbarColor: #ccc;
|
||||
--scrollbarColorHover: #999;
|
||||
|
||||
--pathBackground: var(--sidebarBackground);
|
||||
--pathBorder: var(--sidebarBorder);
|
||||
|
||||
--noticeBackground: #faf9e2;
|
||||
--noticeBorder: #e2e2c1;
|
||||
|
||||
--boxBackground: #fafafa;
|
||||
--boxBorder: #d8d8d8;
|
||||
--boxBorderLight: #e5e5e5;
|
||||
--boxHeaderColor: var(--textColor);
|
||||
--boxHeaderBackground: #f5f5f5;
|
||||
|
||||
--noteBackground: #f8f8dd;
|
||||
--noteBorder: #d3d952;
|
||||
|
||||
--noteGreenBackground: #e7f8e1;
|
||||
--noteGreenBorder: #89da70;
|
||||
|
||||
--noteBlueBackground: #d4f3fd;
|
||||
--noteBlueBorder: #94bbeb;
|
||||
|
||||
--noteOrangeBackground: #fbe6d1;
|
||||
--noteOrangeBorder: #ec8b01;
|
||||
|
||||
--noteRedBackground: #fed5d3;
|
||||
--noteRedBorder: #dc7874;
|
||||
|
||||
--labelBackground: #f4f4f4;
|
||||
|
||||
--notifBackground: #{rgba(#333, .85)};
|
||||
--notifBorder: none;
|
||||
|
||||
--tipBackground: #{rgba(#fffdcd, .95)};
|
||||
--tipBorder: 1px solid #e7dca9;
|
||||
}
|
@ -1,92 +1,35 @@
|
||||
// Variables needed to style the error message for browsers that don't support CSS variables.
|
||||
$baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
|
||||
$monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
$boldFontWeight: 500;
|
||||
$bolderFontWeight: 600;
|
||||
|
||||
$style: 'light';
|
||||
|
||||
$maxWidth: 80rem;
|
||||
$headerHeight: 3rem;
|
||||
$sidebarWidth: 20rem;
|
||||
$sidebarMediumWidth: 16rem;
|
||||
|
||||
$documentBackground: #f3f3f3;
|
||||
$contentBackground: #fff;
|
||||
|
||||
$textColor: #333;
|
||||
$textColorLight: #666;
|
||||
$textColorLighter: #888;
|
||||
$textColorRed: #f44336;
|
||||
|
||||
$inputFocusBorder: #35b5f4;
|
||||
|
||||
$focusBackground: #e5e5e5;
|
||||
$focusBorder: #d4d4d4;
|
||||
$focusText: #000;
|
||||
|
||||
$loadingText: #ccc;
|
||||
$splashText: #ccc;
|
||||
|
||||
$selectionBackground: #398df0;
|
||||
$selectionBorder: #196fc2;
|
||||
$selectionText: #fff;
|
||||
|
||||
$highlightBackground: #fffdcd;
|
||||
|
||||
$linkColor: #3377c0;
|
||||
$linkColorHover: #2f6cb6;
|
||||
$linkTextDecoration: none;
|
||||
|
||||
$headerBackground: #eee;
|
||||
$headerBorder: #d7d7d7;
|
||||
|
||||
$sidebarBackground: #f9f9f9;
|
||||
$sidebarBorder: #e1e1e1;
|
||||
|
||||
$scrollbarColor: #ccc;
|
||||
$scrollbarColorHover: #999;
|
||||
|
||||
$pathBackground: $sidebarBackground;
|
||||
$pathBorder: $sidebarBorder;
|
||||
|
||||
$noticeBackground: #faf9e2;
|
||||
$noticeBorder: #e2e2c1;
|
||||
|
||||
$boxBackground: #fafafa;
|
||||
$boxBorder: #d8d8d8;
|
||||
$boxBorderLight: #e5e5e5;
|
||||
$boxHeaderColor: $textColor;
|
||||
$boxHeaderBackground: #f5f5f5;
|
||||
|
||||
$noteBackground: #f8f8dd;
|
||||
$noteBorder: #d3d952;
|
||||
|
||||
$noteGreenBackground: #e7f8e1;
|
||||
$noteGreenBorder: #89da70;
|
||||
|
||||
$noteBlueBackground: #d4f3fd;
|
||||
$noteBlueBorder: #94bbeb;
|
||||
html {
|
||||
--baseFont: #{$baseFont};
|
||||
--monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
--boldFontWeight: 500;
|
||||
--bolderFontWeight: 600;
|
||||
|
||||
$noteOrangeBackground: #fbe6d1;
|
||||
$noteOrangeBorder: #ec8b01;
|
||||
--textColorRed: #f44336;
|
||||
|
||||
$noteRedBackground: #fed5d3;
|
||||
$noteRedBorder: #dc7874;
|
||||
--splashText: var(--loadingText);
|
||||
|
||||
$labelBackground: #f4f4f4;
|
||||
--selectionText: #fff;
|
||||
--transparentSelectionText: rgba(255, 255, 255, 0.9);
|
||||
|
||||
$notifBackground: rgba(#333, .85);
|
||||
$notifBorder: none;
|
||||
$notifColor: #fff;
|
||||
$notifColorLight: #ccc;
|
||||
--notifColor: #fff;
|
||||
--notifColorLight: #ccc;
|
||||
|
||||
$tipBackground: rgba(#fffdcd, .95);
|
||||
$tipBorder: 1px solid #e7dca9;
|
||||
--maxWidth: 80rem;
|
||||
--headerHeight: 3rem;
|
||||
--sidebarWidth: 20rem;
|
||||
--sidebarMediumWidth: 16rem;
|
||||
|
||||
$mediumScreen: '(max-width: 800px)';
|
||||
--focusBackground: #e5e5e5;
|
||||
--focusBorder: #d4d4d4;
|
||||
--focusText: #000;
|
||||
|
||||
$contentZ: 1;
|
||||
$sidebarZ: 2;
|
||||
$headerZ: 3;
|
||||
$noticeZ: 4;
|
||||
$hoverZ: 5;
|
||||
--contentZ: 1;
|
||||
--sidebarZ: 2;
|
||||
--headerZ: 3;
|
||||
--noticeZ: 4;
|
||||
--hoverZ: 5;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
._dojo {
|
||||
@extend %simple;
|
||||
|
||||
.jsdoc-inheritance { color: $textColorLight; }
|
||||
.jsdoc-inheritance { color: var(--textColorLight); }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
._yard {
|
||||
@extend %simple;
|
||||
|
||||
.tag_title { font-weight: $boldFontWeight; }
|
||||
.tag_title { font-weight: var(--boldFontWeight); }
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
module Docs
|
||||
class Handlebars
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
# Remove the t-shirt shop advertisement
|
||||
css('#callout').remove
|
||||
|
||||
# The title filter is used to add titles to pages without one, remove original headers
|
||||
css('h1').remove
|
||||
|
||||
# Remove the link to the issue tracker
|
||||
css('.issue-tracker').remove
|
||||
|
||||
css('pre').each do |node|
|
||||
# Remove nested nodes inside pre tags
|
||||
node.content = node.content
|
||||
|
||||
# Add syntax highlighting
|
||||
node['data-language'] = 'html'
|
||||
end
|
||||
|
||||
# Transform 'Learn More' links to headers in the "Getting Started" part of the homepage
|
||||
# If this step is skipped, that section looks cluttered with 4 sub-sections without any dividers
|
||||
css('#getting-started + .contents a.more-info').each do |node|
|
||||
clone = node.clone
|
||||
|
||||
# Move it to the top of the sub-section
|
||||
node.parent.prepend_child(clone)
|
||||
|
||||
# Turn it into a header
|
||||
clone.name = 'h3'
|
||||
|
||||
# Remove the "Learn More: " part
|
||||
clone.content = clone.content[12..-1]
|
||||
end
|
||||
|
||||
# Remove class attributes from div elements to reduce file size
|
||||
css('div').remove_attr('class')
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,19 @@
|
||||
module Docs
|
||||
class Handlebars
|
||||
class EntriesFilter < Docs::EntriesFilter
|
||||
def get_name
|
||||
subpath[0..-6].titleize
|
||||
end
|
||||
|
||||
def get_type
|
||||
name
|
||||
end
|
||||
|
||||
def additional_entries
|
||||
css('h2, h3').to_a.map do |node|
|
||||
[node.content.strip, node['id'], root_page? ? 'Manual' : nil]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,24 @@
|
||||
module Docs
|
||||
class Puppeteer
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
at_css('h1').content = 'Puppeteer Documentation'
|
||||
|
||||
# None of the elements to remove have classes, so the order of the remove calls is trivial
|
||||
|
||||
# Remove links to previous versions of the reference
|
||||
at_css('h1 + ul').remove
|
||||
|
||||
# Remove table of contents
|
||||
at_css('h1 + h5').remove
|
||||
at_css('h1 + ul').remove
|
||||
|
||||
# Make headers bigger by transforming them into a bigger variant
|
||||
css('h3').each { |node| node.name = 'h2' }
|
||||
css('h4').each { |node| node.name = 'h3' }
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,41 @@
|
||||
module Docs
|
||||
class Puppeteer
|
||||
class EntriesFilter < Docs::EntriesFilter
|
||||
# The entire reference is one big page, so get_name and get_type are not necessary
|
||||
|
||||
def additional_entries
|
||||
entries = []
|
||||
|
||||
css('h3').each do |node|
|
||||
name = node.content.split(': ').last
|
||||
|
||||
# Find all sub-items (all h4's between the current h3 and the next)
|
||||
current = node.next
|
||||
while !current.nil? && current.name != 'h3'
|
||||
if current.name == 'h4'
|
||||
current_name = current.content
|
||||
|
||||
# Prepend events with the class name
|
||||
if current_name.start_with?('event: ')
|
||||
current_name = "#{name} event: #{current_name[/'(.*)'/, 1]}"
|
||||
end
|
||||
|
||||
# Remove arguments from functions
|
||||
if current_name.include?('(')
|
||||
current_name = current_name.split('(')[0] + '()'
|
||||
end
|
||||
|
||||
entries << [current_name, current['id'], name]
|
||||
end
|
||||
|
||||
current = current.next
|
||||
end
|
||||
|
||||
entries << [name, node['id'], name]
|
||||
end
|
||||
|
||||
entries
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,23 @@
|
||||
module Docs
|
||||
class Handlebars < UrlScraper
|
||||
self.name = 'Handlebars.js'
|
||||
self.slug = 'handlebars'
|
||||
self.type = 'simple'
|
||||
self.release = '4.0.12'
|
||||
self.base_url = 'https://handlebarsjs.com/'
|
||||
self.links = {
|
||||
home: 'https://handlebarsjs.com/',
|
||||
code: 'https://github.com/wycats/handlebars.js/'
|
||||
}
|
||||
|
||||
html_filters.push 'handlebars/entries', 'handlebars/clean_html', 'title'
|
||||
|
||||
options[:container] = '#contents'
|
||||
options[:root_title] = 'Handlebars.js'
|
||||
|
||||
options[:attribution] = <<-HTML
|
||||
© 2011–2017 by Yehuda Katz<br>
|
||||
Licensed under the MIT License.
|
||||
HTML
|
||||
end
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue