diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index cda606e4..2b5a4fb2 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -581,6 +581,11 @@ credits = [ 'JS Foundation and other contributors', 'MIT', 'https://raw.githubusercontent.com/moment/moment/master/LICENSE' + ], [ + 'Moment.js Timezone', + 'JS Foundation and other contributors', + 'MIT', + 'https://raw.githubusercontent.com/moment/moment-timezone/master/LICENSE' ], [ 'Mongoose', '2010 LearnBoost', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 8a6221b6..d6189c5d 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -87,6 +87,7 @@ 'pages/mkdocs', 'pages/modernizr', 'pages/moment', + 'pages/moment_timezone', 'pages/nginx', 'pages/node', 'pages/npm', diff --git a/assets/stylesheets/pages/_moment_timezone.scss b/assets/stylesheets/pages/_moment_timezone.scss new file mode 100644 index 00000000..b30da34d --- /dev/null +++ b/assets/stylesheets/pages/_moment_timezone.scss @@ -0,0 +1,5 @@ +._moment_timezone { + > h2 { @extend %block-heading; } + > h3 { @extend %block-label, %label-blue; } + code { @extend %label; } +} diff --git a/lib/docs/filters/moment_timezone/clean_html.rb b/lib/docs/filters/moment_timezone/clean_html.rb new file mode 100644 index 00000000..e6e0b6d1 --- /dev/null +++ b/lib/docs/filters/moment_timezone/clean_html.rb @@ -0,0 +1,29 @@ +module Docs + class MomentTimezone + class CleanHtmlFilter < Filter + def call + # Set id attributes on headings + css('a.docs-section-target', 'a.docs-method-target').each do |node| + node.next_element['id'] = node['id'] + node.remove + end + + css('> article', '.docs-method-prose', '.docs-method-signature', 'h2 > a', 'h3 > a', 'pre > code').each do |node| + node.before(node.children).remove + end + + css('.docs-method-edit', 'hr').remove + + css('pre').each do |node| + if node.content =~ /\A + Licensed under the MIT License. + HTML + + def get_latest_version(opts) + get_github_tags('moment', 'moment-timezone', opts)[0]['name'] + end + end +end diff --git a/public/icons/docs/moment_timezone/16.png b/public/icons/docs/moment_timezone/16.png new file mode 100644 index 00000000..29c6b987 Binary files /dev/null and b/public/icons/docs/moment_timezone/16.png differ diff --git a/public/icons/docs/moment_timezone/16@2x.png b/public/icons/docs/moment_timezone/16@2x.png new file mode 100644 index 00000000..0f8a8e4b Binary files /dev/null and b/public/icons/docs/moment_timezone/16@2x.png differ diff --git a/public/icons/docs/moment_timezone/SOURCE b/public/icons/docs/moment_timezone/SOURCE new file mode 100644 index 00000000..f3616477 --- /dev/null +++ b/public/icons/docs/moment_timezone/SOURCE @@ -0,0 +1 @@ +https://momentjs.com/static/img/moment-timezone-favicon.png \ No newline at end of file