1
0
Эх сурвалжийг харах

Remove MaxCDN documentation

Thibaut 10 жил өмнө
parent
commit
f7d1c21bb8

BIN
assets/images/icons.png


BIN
assets/images/icons@2x.png


+ 0 - 28
assets/javascripts/views/pages/maxcdn.coffee

@@ -1,28 +0,0 @@
-#= require views/pages/base
-
-class app.views.MaxcdnPage extends app.views.BasePage
-  @events:
-    click: 'onClick'
-
-  afterRender: ->
-    @highlightCode @findAll('.tab-pane[id^="ruby"] > pre'), 'ruby'
-    @highlightCode @findAll('.tab-pane[id^="python"] > pre'), 'python'
-    @highlightCode @findAll('.tab-pane[id^="node"] > pre, .tab-pane[id^="resp"] > pre'), 'javascript'
-    return
-
-  onClick: (event) ->
-    return unless (link = event.target).getAttribute('data-toggle') is 'tab'
-    $.stopEvent(event)
-
-    list = link.parentNode.parentNode
-    tabs = list.nextElementSibling
-
-    li = link.parentNode
-    position = 1
-    position++ while li = li.previousElementSibling
-
-    $('.active', list).classList.remove('active')
-    $('.active', tabs).classList.remove('active')
-
-    link.parentNode.classList.add('active')
-    $(".tab-pane:nth-child(#{position})", tabs).classList.add('active')

+ 0 - 1
assets/stylesheets/application-dark.css.scss

@@ -46,7 +46,6 @@
         'pages/knockout',
         'pages/laravel',
         'pages/lua',
-        'pages/maxcdn',
         'pages/mdn',
         'pages/meteor',
         'pages/modernizr',

+ 0 - 1
assets/stylesheets/application.css.scss

@@ -46,7 +46,6 @@
         'pages/knockout',
         'pages/laravel',
         'pages/lua',
-        'pages/maxcdn',
         'pages/mdn',
         'pages/meteor',
         'pages/modernizr',

+ 1 - 1
assets/stylesheets/global/_icons.scss

@@ -65,7 +65,7 @@
 ._icon-go:before            { background-position: -1rem -4rem; }
 ._icon-express:before       { background-position: -2rem -4rem; }
 ._icon-grunt:before         { background-position: -3rem -4rem; }
-._icon-maxcdn:before        { background-position: -4rem -4rem; }
+
 ._icon-laravel:before       { background-position: -5rem -4rem; }
 ._icon-haskell:before       { background-position: -6rem -4rem; }
 ._icon-requirejs:before     { background-position: -7rem -4rem; }

+ 0 - 43
assets/stylesheets/pages/_maxcdn.scss

@@ -1,43 +0,0 @@
-._maxcdn {
-  @extend %simple;
-
-  .url {
-    padding: .5rem;
-    white-space: normal;
-    @extend %pre, %note-green;
-  }
-
-  .http_method { @extend %label; }
-
-  .nav-tabs {
-    height: 2rem;
-    padding: 0;
-    list-style: none;
-    border-bottom: 1px solid $boxBorder;
-
-    > li {
-      float: left;
-      margin: -1px 0;
-
-      > a {
-        display: block;
-        padding: .5rem 1em;
-        line-height: 1rem;
-        margin-right: 2px;
-        border: 1px solid transparent;
-        border-radius: 3px 3px 0 0;
-      }
-
-      &.active > a {
-        color: $textColor;
-        text-decoration: none;
-        background: $contentBackground;
-        border-color: $boxBorder $boxBorder transparent;
-        cursor: default;
-      }
-    }
-  }
-
-  .tab-pane { display: none; }
-  .tab-pane.active { display: block; }
-}

+ 0 - 25
lib/docs/filters/maxcdn/clean_html.rb

@@ -1,25 +0,0 @@
-module Docs
-  class Maxcdn
-    class CleanHtmlFilter < Filter
-      def call
-        css('hr', 'td:last-child:empty').remove
-
-        css('h1, h2, h3, h4').each do |node|
-          node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
-        end
-
-        at_css('h2').name = 'h1'
-
-        css('.path > a').each do |node|
-          node.before(node.children).remove
-        end
-
-        css('[name]').each do |node|
-          node.remove_attribute 'name'
-        end
-
-        doc
-      end
-    end
-  end
-end

+ 0 - 30
lib/docs/filters/maxcdn/entries.rb

@@ -1,30 +0,0 @@
-module Docs
-  class Maxcdn
-    class EntriesFilter < Docs::EntriesFilter
-      def additional_entries
-        type = id_prefix = nil
-
-        doc.children.each_with_object [] do |node, entries|
-          if node.name == 'h2'
-            type = node.content.strip
-            type.remove! %r{ API\z}
-            type.remove! ' Custom Domains'
-            id_prefix = type.parameterize
-            type = 'Reports' if type.starts_with? 'Reports'
-          elsif node.name == 'h3'
-            next unless type
-            name = node.content.strip
-            id = "#{id_prefix}-#{name}".parameterize
-            node['id'] = id
-
-            if name.ends_with?('Domain') && ['Push Zone', 'Pull Zone', 'VOD Zone'].include?(type)
-              name << " (#{type})"
-            end
-
-            entries << [name, id, type]
-          end
-        end
-      end
-    end
-  end
-end

+ 0 - 17
lib/docs/scrapers/maxcdn.rb

@@ -1,17 +0,0 @@
-module Docs
-  class Maxcdn < UrlScraper
-    self.name = 'MaxCDN'
-    self.type = 'maxcdn'
-    self.base_url = 'https://docs.maxcdn.com/'
-
-    html_filters.push 'maxcdn/clean_html', 'maxcdn/entries'
-
-    options[:container] = '#readme-docs'
-    options[:skip_links] = true
-
-    options[:attribution] = <<-HTML
-      &copy; 2015 MaxCDN<br>
-      Licensed under the MIT License.
-    HTML
-  end
-end

BIN
public/icons/docs/maxcdn/16.png


BIN
public/icons/docs/maxcdn/16@2x.png


+ 0 - 1
public/icons/docs/maxcdn/SOURCE

@@ -1 +0,0 @@
-https://github.com/MaxCDN/media