Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -192,6 +192,11 @@ credits = [ · 191 unmodified lines | |||
| 192 | '2009-2014 The Dojo Foundation', | 192 | '2009-2014 The Dojo Foundation', |
| 193 | 'MIT', | 193 | 'MIT', |
| 194 | 'https://raw.github.com/lodash/lodash/master/LICENSE.txt' | 194 | 'https://raw.github.com/lodash/lodash/master/LICENSE.txt' |
| 195 | ], [ | ||
| 196 | 'Marionette.js', | ||
| 197 | '2014 Muted Solutions, LLC', | ||
| 198 | 'MIT', | ||
| 199 | 'http://mutedsolutions.mit-license.org/' | ||
| 195 | ], [ | 200 | ], [ |
| 196 | 'Markdown', | 201 | 'Markdown', |
| 197 | '2004 John Gruber', | 202 | '2004 John Gruber', |
| @@ -34,7 +34,7 @@ newsItem = (date, news) -> · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | app.news = [ | 35 | app.news = [ |
| 36 | [ 1413676800000, # October 19, 2014 | 36 | [ 1413676800000, # October 19, 2014 |
| 37 | """ New <a href="/svg/">SVG</a> documentation """, | 37 | """ New <a href="/svg/">SVG</a> and <a href="/marionette">Marionette.js</a> documentations """, |
| 38 | ], [ | 38 | ], [ |
| 39 | 1413590400000, # October 18, 2014 | 39 | 1413590400000, # October 18, 2014 |
| 40 | """ New <a href="/nginx/">nginx</a> documentation """, | 40 | """ New <a href="/nginx/">nginx</a> documentation """, |
| @@ -0,0 +1,4 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | #= require views/pages/underscore | ||
| 3 | |||
| 4 | app.views.MarionettePage = app.views.UnderscorePage | ||
| @@ -45,6 +45,7 @@ · 44 unmodified lines | |||
| 45 | 'pages/laravel', | 45 | 'pages/laravel', |
| 46 | 'pages/less', | 46 | 'pages/less', |
| 47 | 'pages/lodash', | 47 | 'pages/lodash', |
| 48 | 'pages/marionette', | ||
| 48 | 'pages/markdown', | 49 | 'pages/markdown', |
| 49 | 'pages/maxcdn', | 50 | 'pages/maxcdn', |
| 50 | 'pages/mdn', | 51 | 'pages/mdn', |
| @@ -67,3 +67,4 @@ · 66 unmodified lines | |||
| 67 | ._icon-xpath:before { background-position: -3rem -10rem; } | 67 | ._icon-xpath:before { background-position: -3rem -10rem; } |
| 68 | ._icon-nginx:before { background-position: -4rem -10rem; } | 68 | ._icon-nginx:before { background-position: -4rem -10rem; } |
| 69 | ._icon-svg:before { background-position: 0 -11rem; } | 69 | ._icon-svg:before { background-position: 0 -11rem; } |
| 70 | ._icon-marionette:before { background-position: -1rem -11rem; } | ||
| @@ -0,0 +1,7 @@ | |||
| 1 | ._marionette { | ||
| 2 | padding-left: 1rem; | ||
| 3 | |||
| 4 | > h1, > h2 { margin-left: -1rem; } | ||
| 5 | > h2 { @extend %block-heading; } | ||
| 6 | > h3 { @extend %block-label, %label-blue; } | ||
| 7 | } | ||
| @@ -0,0 +1,30 @@ | |||
| 1 | module Docs | ||
| 2 | class Marionette | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | root_page? ? root : other | ||
| 6 | doc | ||
| 7 | end | ||
| 8 | |||
| 9 | def root | ||
| 10 | at_css('p').remove | ||
| 11 | end | ||
| 12 | |||
| 13 | def other | ||
| 14 | css('#source + h2', '#improve', '#source', '.glyphicon').remove | ||
| 15 | |||
| 16 | css('pre > code').each do |node| | ||
| 17 | node.before(node.children).remove | ||
| 18 | end | ||
| 19 | |||
| 20 | css('h2', 'h3').each do |node| | ||
| 21 | id = node.content.strip | ||
| 22 | id.downcase! | ||
| 23 | id.remove! %r{['"\/\.:]} | ||
| 24 | id.gsub! %r{[\ _]}, '-' | ||
| 25 | node['id'] = id | ||
| 26 | end | ||
| 27 | end | ||
| 28 | end | ||
| 29 | end | ||
| 30 | end | ||
| @@ -0,0 +1,12 @@ | |||
| 1 | module Docs | ||
| 2 | class Marionette | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def get_name | ||
| 5 | name = at_css('h1').content.strip | ||
| 6 | name.remove!(/Marionette./) | ||
| 7 | name = name[0].upcase + name.from(1) | ||
| 8 | name | ||
| 9 | end | ||
| 10 | end | ||
| 11 | end | ||
| 12 | end | ||
| @@ -0,0 +1,27 @@ | |||
| 1 | module Docs | ||
| 2 | class Marionette < UrlScraper | ||
| 3 | self.name = 'Marionette.js' | ||
| 4 | self.slug = 'marionette' | ||
| 5 | self.type = 'marionette' | ||
| 6 | self.version = '2.2.1' | ||
| 7 | self.base_url = 'http://marionettejs.com/docs/' | ||
| 8 | self.root_path = 'current' | ||
| 9 | |||
| 10 | html_filters.push 'marionette/clean_html', 'marionette/entries' | ||
| 11 | |||
| 12 | options[:container] = '#content' | ||
| 13 | |||
| 14 | options[:skip] = %w(/readme.html) | ||
| 15 | options[:skip_patterns] = [/\A\/v\d/] | ||
| 16 | |||
| 17 | options[:fix_urls] = ->(url) do | ||
| 18 | url.sub! %r{marionette([^\/#\?]*)\.md}, 'marionette\1' | ||
| 19 | url | ||
| 20 | end | ||
| 21 | |||
| 22 | options[:attribution] = <<-HTML | ||
| 23 | © 2014 Muted Solutions, LLC<br> | ||
| 24 | Licensed under the MIT License. | ||
| 25 | HTML | ||
| 26 | end | ||
| 27 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://github.com/marionettejs/marionettejs.com | ||