History

Add new sponsors

Thibaut committed 11 years ago

Commit 02166e01 parent 05d5b9325 files · +154 −67Browse files

Unified · Split

25 files
  1. README.md +1 −2
  2. assets/images/code-school-bw.png +0 −0
  3. assets/images/code-school-bw@2x.png +0 −0
  4. assets/images/code-school.png +0 −0
  5. assets/images/code-school@2x.png +0 −0
  6. assets/images/jetbrains-bw.png +0 −0
  7. assets/images/jetbrains-bw@2x.png +0 −0
  8. assets/images/jetbrains.png +0 −0
  9. assets/images/jetbrains@2x.png +0 −0
  10. assets/images/maxcdn-bw.png +0 −0
  11. assets/images/maxcdn-bw@2x.png +0 −0
  12. assets/images/maxcdn.png +0 −0
  13. assets/images/maxcdn@2x.png +0 −0
  14. assets/javascripts/news.json +3 −0
  15. assets/javascripts/templates/notif_tmpl.coffee +4 −3
  16. assets/javascripts/templates/pages/about_tmpl.coffee +1 −2
  17. assets/javascripts/templates/pages/root_tmpl.coffee.erb +46 −13
  18. assets/stylesheets/components/_content.scss +60 −29
  19. assets/stylesheets/components/_mobile.scss +18 −2
  20. assets/stylesheets/components/_notif.scss +2 −1
  21. assets/stylesheets/global/_variables.scss +1 −1
  22. assets/stylesheets/global/variables-dark.scss +3 −3
  23. lib/app.rb +18 −18
  24. test/app_test.rb +1 −1
  25. views/manifest.erb +8 −4
README.md+1−2
@@ -3,8 +3,7 @@ · 2 unmodified lines
3DevDocs combines multiple API documentations in a fast, organized, and searchable interface.3DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
4 4
5* Created by [Thibaut Courouble](http://thibaut.me)5* Created by [Thibaut Courouble](http://thibaut.me)
6* Made at [Shopify](http://devdocs.io/s/shopify)6* Supported by [JetBrains](http://devdocs.io/s/jetbrains), [Code School](http://devdocs.io/s/code-school) and [Shopify](http://devdocs.io/s/shopify)
7* Powered by [MaxCDN](http://devdocs.io/s/maxcdn)
8 7
9Keep track of development and community news:8Keep track of development and community news:
10 9
assets/images/code-school-bw.png+0−0

Binary file not shown.

assets/images/code-school-bw@2x.png+0−0

Binary file not shown.

assets/images/code-school.png+0−0

Binary file not shown.

assets/images/code-school@2x.png+0−0

Binary file not shown.

assets/images/jetbrains-bw.png+0−0

Binary file not shown.

assets/images/jetbrains-bw@2x.png+0−0

Binary file not shown.

assets/images/jetbrains.png+0−0

Binary file not shown.

assets/images/jetbrains@2x.png+0−0

Binary file not shown.

assets/images/maxcdn-bw.png+0−0

Binary file not shown.

assets/images/maxcdn-bw@2x.png+0−0

Binary file not shown.

assets/images/maxcdn.png+0−0

Binary file not shown.

assets/images/maxcdn@2x.png+0−0

Binary file not shown.

assets/javascripts/news.json+3−0
@@ -1,5 +1,8 @@
1[1[
2 [2 [
3 "2015-07-12",
4 "New sponsors: <a href=\"http://devdocs.io/s/jetbrains\">JetBrains</a> and <a href=\"http://devdocs.io/s/code-school\">Code School</a>\nIf you like DevDocs, please take a moment to check out their products — they're awesome!"
5 ], [
3 "2015-07-05",6 "2015-07-05",
4 "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>"7 "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>"
5 ], [8 ], [
assets/javascripts/templates/notif_tmpl.coffee+4−3
@@ -34,10 +34,11 @@ app.templates.notifShare = -> · 33 unmodified lines
34 34
35app.templates.notifThanks = ->35app.templates.notifThanks = ->
36 textNotif """ Hi there! """,36 textNotif """ Hi there! """,
37 """ <p class="_notif-text">Quick shout-out to our awesome sponsors:37 """ <p class="_notif-text">Like DevDocs? Check out these awesome companies who are making it possible:
38 <ul class="_notif-list">38 <ul class="_notif-list">
39 <li><a href="http://devdocs.io/s/maxcdn" target="_blank">MaxCDN</a> has been supporting DevDocs since day one. They provide CDN solutions that make DevDocs and countless other sites faster.</li>39 <li><a href="http://devdocs.io/s/jetbrains" target="_blank">JetBrains</a> — We make software development a more productive and enjoyable experience through smart IDEs and code editors.
40 <li><a href="http://devdocs.io/s/shopify" target="_blank">Shopify</a> is where I spend my weekdays. Interested in working on one of the biggest commerce platforms in the world, in a delightful work environment? We're hiring!40 <li><a href="http://devdocs.io/s/code-school" target="_blank">Code School</a> — Learn new skills from the comfort of your own browser. Offering more than 45 courses covering JavaScript, HTML/CSS, Ruby, Git, and iOS for only $29/month.
41 <li><a href="http://devdocs.io/s/shopify" target="_blank">Shopify</a> — Interested in working on one of the biggest commerce platforms in the world, in a delightful work environment? We're hiring!
41 </ul>42 </ul>
42 <p class="_notif-text">Have a great day :) """43 <p class="_notif-text">Have a great day :) """
43 44
assets/javascripts/templates/pages/about_tmpl.coffee+1−2
@@ -13,8 +13,7 @@ app.templates.aboutPage = -> """ · 12 unmodified lines
13 <p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface.13 <p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
14 <ul>14 <ul>
15 <li>Created and maintained by <a href="http://thibaut.me">Thibaut Courouble</a>15 <li>Created and maintained by <a href="http://thibaut.me">Thibaut Courouble</a>
16 <li>Supported by <a href="http://devdocs.io/s/shopify">Shopify</a>16 <li>Supported by <a href="http://devdocs.io/s/jetbrains">JetBrains</a>, <a href="http://devdocs.io/s/code-school">Code School</a> and <a href="http://devdocs.io/s/shopify">Shopify</a>
17 <li>Powered by <a href="http://devdocs.io/s/maxcdn" title="Content Delivery Network Services">MaxCDN</a>
18 <li>Free and <a href="https://github.com/Thibaut/devdocs">open source</a>17 <li>Free and <a href="https://github.com/Thibaut/devdocs">open source</a>
19 <iframe class="_github-btn" src="https://ghbtns.com/github-btn.html?user=Thibaut&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>18 <iframe class="_github-btn" src="https://ghbtns.com/github-btn.html?user=Thibaut&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
20 </ul>19 </ul>
assets/javascripts/templates/pages/root_tmpl.coffee.erb+46−13
@@ -1,7 +1,37 @@
1maxcdnLink = (className) -> """1jetBrainsLink = (className) ->
2 <a href="http://devdocs.io/s/maxcdn" class="#{className}">2 type = jetBrainsType()
3 <span class="_logo-thx _maxcdn-logo">MaxCDN</span>3 path = "/#{type}" if type
4 <span class="_logo-info">MaxCDN has been supporting DevDocs since day one. They provide CDN solutions that make DevDocs and countless other sites faster.</span>4
5 """
6 <a href="http://devdocs.io/s/jetbrains#{path || ''}" class="#{className}">
7 <span class="_logo-thx _jetbrains-logo">JetBrains</span>
8 <span class="_logo-info">#{JETBRAINS_INFO[type || 'default']}</span>
9 </a>
10 """
11
12JETBRAINS_INFO =
13 ruby: 'Developing in Ruby? Boost your productivity with RubyMine, a powerful IDE with smart coding assistance and advanced testing and debugging features.'
14 python: 'Developing in Python? Enjoy productive development with PyCharm, an intelligent Python IDE offering unique coding experience.'
15 c: 'Developing in C? Now benefit from CLion, a C/C++ IDE enhancing your productivity with on-thy-fly static analysis and automated refactorings.'
16 web: 'Doing client-side development? Try WebStorm, an IDE that really understands JavaScript and modern frameworks like AngularJS and boosts your productivity.'
17 default: 'JetBrains makes software development a more productive and enjoyable experience through smart IDEs and code editors.'
18
19jetBrainsType = ->
20 docs = if app.settings then app.settings.getDocs() else []
21
22 if docs.indexOf('ruby') != -1
23 'ruby'
24 else if docs.indexOf('python') != -1 || docs.indexOf('python2') != -1
25 'python'
26 else if docs.indexOf('c') != -1 or docs.indexOf('cpp') != -1
27 'c'
28 else if docs.indexOf('javascript') != -1 or docs.indexOf('jquery') != -1
29 'web'
30
31codeSchoolLink = (className) -> """
32 <a href="http://devdocs.io/s/code-school" class="#{className}">
33 <span class="_logo-thx _code-school-logo">Code School</span>
34 <span class="_logo-info">With more than 45 courses covering JavaScript, HTML/CSS, Ruby, Git, and iOS, Code School pairs experienced instructors with engaging content. Start learning at codeschool.com.</span>
5 </a>35 </a>
6"""36"""
7 37
@@ -12,10 +42,13 @@ shopifyLink = (className) -> """ · 4 unmodified lines
12 </a>42 </a>
13"""43"""
14 44
15app.templates.splash = """45app.templates.splash = -> """
16 <div class="_splash-title">DevDocs</div>46 <div class="_splash-title">DevDocs</div>
17 #{maxcdnLink '_splash-sponsor'}47 <div class="_splash-sponsors">
18 #{shopifyLink '_splash-sponsor'}48 #{jetBrainsLink '_splash-sponsor'}
49 #{codeSchoolLink '_splash-sponsor'}
50 #{shopifyLink '_splash-sponsor'}
51 </div>
19"""52"""
20 53
21<% if App.development? %>54<% if App.development? %>
@@ -39,8 +72,8 @@ app.templates.intro = """ · 17 unmodified lines
39 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!72 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
40 </ol>73 </ol>
41 <p class="_intro-sponsors">74 <p class="_intro-sponsors">
42 Thanks to#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'}75 #{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}
43 <p>That's all. Happy coding!76 <p>Happy coding!
44 </div></div>77 </div></div>
45"""78"""
46<% else %>79<% else %>
@@ -63,8 +96,8 @@ app.templates.intro = """ · 16 unmodified lines
63 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!96 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
64 </ol>97 </ol>
65 <p class="_intro-sponsors">98 <p class="_intro-sponsors">
66 Thanks to#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'}99 #{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}
67 <p>That's all. Happy coding!100 <p>Happy coding!
68 </div></div>101 </div></div>
69"""102"""
70<% end %>103<% end %>
@@ -90,8 +123,8 @@ app.templates.mobileIntro = """ · 19 unmodified lines
90 <li>For the latest news, subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a> or follow <a href="https://twitter.com/DevDocs">@DevDocs</a>123 <li>For the latest news, subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a> or follow <a href="https://twitter.com/DevDocs">@DevDocs</a>
91 <li>DevDocs is <a href="https://github.com/Thibaut/devdocs">open source</a>124 <li>DevDocs is <a href="https://github.com/Thibaut/devdocs">open source</a>
92 </ol>125 </ol>
93 <p>That's all. Happy coding!126 <p>Happy coding!
94 <p class="_intro-sponsors">#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'}</p>127 <p class="_intro-sponsors">#{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}</p>
95 <a class="_intro-hide" data-hide-intro>Stop showing this message</a>128 <a class="_intro-hide" data-hide-intro>Stop showing this message</a>
96 </div>129 </div>
97"""130"""
assets/stylesheets/components/_content.scss+60−29
@@ -68,26 +68,32 @@ · 67 unmodified lines
68 color: $splashText;68 color: $splashText;
69 cursor: default;69 cursor: default;
70 opacity: 1;70 opacity: 1;
71 margin-top: -1.25em;
71 @extend ._booting:before, %user-select-none;72 @extend ._booting:before, %user-select-none;
72}73}
73 74
74._splash-sponsor {75._splash-sponsors {
75 position: absolute;76 position: absolute;
76 display: block;77 top: 50%;
77 bottom: 1.25rem;78 left: 0;
78 right: 1rem;79 right: 0;
80 margin-top: 1.25rem;
81 text-align: center;
82 line-height: 2rem;
83}
79 84
80 ._logo-thx { opacity: .25; }85._splash-sponsor {
81 &:hover ._logo-thx { opacity: .5; }86 position: relative;
87 display: inline-block;
88 vertical-align: top;
89 margin: .5rem 1.5rem;
82 90
83 & + & {91 ._logo-thx { opacity: .3; }
84 left: 1rem;92 &:hover ._logo-thx { opacity: .6; }
85 right: auto;
86 93
87 ._logo-info {94 ._logo-info {
88 right: auto;95 right: 50%;
89 left: 0;96 margin-right: -9rem;
90 }
91 }97 }
92}98}
93 99
@@ -409,24 +415,25 @@ · 315 unmodified lines
409 margin-bottom: .75rem;415 margin-bottom: .75rem;
410 padding: .5rem .75rem;416 padding: .5rem .75rem;
411 line-height: 1.375rem;417 line-height: 1.375rem;
418 text-align: left;
412 pointer-events: none;419 pointer-events: none;
413 @extend %notif;420 @extend %notif;
414 421
415 :hover > & { opacity: 1; }422 :hover > & { opacity: 1; }
416}423}
417 424
418._maxcdn-logo {425._shopify-logo {
419 width: 6.25rem;426 width: 5.5rem;
420 background-image: image-url('maxcdn.png');427 background-image: image-url('shopify.png');
421 background-size: 6.25rem 1rem;428 background-size: 5.5rem 1.5rem;
422 429
423 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {430 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
424 background-image: image-url('maxcdn@2x.png');431 background-image: image-url('shopify@2x.png');
425 }432 }
426}433}
427 434
428._splash-sponsor > ._maxcdn-logo {435._splash-sponsor > ._shopify-logo {
429 background-image: image-url('maxcdn-bw.png');436 background-image: image-url('shopify-bw.png');
430 437
431 @if $style == 'dark' {438 @if $style == 'dark' {
432 filter: invert(100%);439 filter: invert(100%);
@@ -434,22 +441,23 @@ · 1 unmodified line
434 }441 }
435 442
436 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {443 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
437 background-image: image-url('maxcdn-bw@2x.png');444 background-image: image-url('shopify-bw@2x.png');
438 }445 }
439}446}
440 447
441._shopify-logo {448._jetbrains-logo {
442 width: 5.5rem;449 top: 1px;
443 background-image: image-url('shopify.png');450 width: 5rem;
444 background-size: 5.5rem 1.5rem;451 background-image: image-url('jetbrains.png');
452 background-size: 5rem 1.5rem;
445 453
446 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {454 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
447 background-image: image-url('shopify@2x.png');455 background-image: image-url('jetbrains@2x.png');
448 }456 }
449}457}
450 458
451._splash-sponsor > ._shopify-logo {459._splash-sponsor > ._jetbrains-logo {
452 background-image: image-url('shopify-bw.png');460 background-image: image-url('jetbrains-bw.png');
453 461
454 @if $style == 'dark' {462 @if $style == 'dark' {
455 filter: invert(100%);463 filter: invert(100%);
@@ -457,6 +465,29 @@ · 1 unmodified line
457 }465 }
458 466
459 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {467 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
460 background-image: image-url('shopify-bw@2x.png');468 background-image: image-url('jetbrains-bw@2x.png');
469 }
470}
471
472._code-school-logo {
473 width: 7rem;
474 background-image: image-url('code-school.png');
475 background-size: 7rem 1.25rem;
476
477 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
478 background-image: image-url('code-school@2x.png');
479 }
480}
481
482._splash-sponsor > ._code-school-logo {
483 background-image: image-url('code-school-bw.png');
484
485 @if $style == 'dark' {
486 filter: invert(100%);
487 -webkit-filter: invert(100%);
488 }
489
490 @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
491 background-image: image-url('code-school-bw@2x.png');
461 }492 }
462}493}
assets/stylesheets/components/_mobile.scss+18−2
@@ -90,6 +90,22 @@ · 89 unmodified lines
90 box-shadow: 0 1px $noteGreenBorder, 0 -1px $noteGreenBorder;90 box-shadow: 0 1px $noteGreenBorder, 0 -1px $noteGreenBorder;
91 }91 }
92 92
93 // Splash
94
95 ._splash-sponsors { margin-top: 1rem; }
96
97 ._splash-sponsor {
98 position: static;
99
100 ._logo-info {
101 left: 1rem;
102 right: 1rem;
103 width: auto;
104 max-width: none;
105 margin: 0;
106 }
107 }
108
93 // Notice109 // Notice
94 110
95 ._notice {111 ._notice {
@@ -189,9 +205,9 @@ · 93 unmodified lines
189 position: static;205 position: static;
190 float: none;206 float: none;
191 display: block;207 display: block;
192 margin-top: 1.25rem;208 margin-top: .75rem;
193 text-align: center;209 text-align: center;
194 }210 }
195 211
196 ._intro-sponsor { margin: 0 1em; }212 ._intro-sponsor { margin: .5em .75em; }
197}213}
assets/stylesheets/components/_notif.scss+2−1
@@ -55,7 +55,7 @@ · 54 unmodified lines
55 overflow-y: auto;55 overflow-y: auto;
56 56
57 > ._notif-title {57 > ._notif-title {
58 margin: -.125rem 0 1em;58 margin-bottom: .5rem;
59 text-align: center;59 text-align: center;
60 }60 }
61 61
@@ -63,6 +63,7 @@ · 1 unmodified line
63 line-height: 1.125rem;63 line-height: 1.125rem;
64 font-size: .6875rem;64 font-size: .6875rem;
65 color: $notifColorLight;65 color: $notifColorLight;
66 margin-bottom: .25rem;
66 67
67 + ._news-row { margin-top: .75rem; }68 + ._news-row { margin-top: .75rem; }
68 }69 }
assets/stylesheets/global/_variables.scss+1−1
@@ -20,7 +20,7 @@ $focusBorder: #d4d4d4; · 19 unmodified lines
20$focusText: #000;20$focusText: #000;
21 21
22$loadingText: #e6e6e6;22$loadingText: #e6e6e6;
23$splashText: #d7d7d7;23$splashText: #bbb;
24$promoText: #bbb;24$promoText: #bbb;
25 25
26$selectionBackground: #398df0;26$selectionBackground: #398df0;
assets/stylesheets/global/variables-dark.scss+3−3
@@ -19,9 +19,9 @@ $focusBackground: #3d3d3e; · 18 unmodified lines
19$focusBorder: #3d3d3e;19$focusBorder: #3d3d3e;
20$focusText: #f7f2f2;20$focusText: #f7f2f2;
21 21
22$loadingText: #616161;22$loadingText: #666;
23$splashText: #616161;23$splashText: #666;
24$promoText: #616161;24$promoText: #666;
25 25
26$selectionBackground: #346fce;26$selectionBackground: #346fce;
27$selectionBorder: #346fce;27$selectionBorder: #346fce;
lib/app.rb+18−18
@@ -184,12 +184,24 @@ class App < Sinatra::Application · 183 unmodified lines
184 CODE184 CODE
185 end185 end
186 186
187 get '/s/maxcdn' do187 {
188 redirect 'https://www.maxcdn.com/?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'188 '/s/maxcdn' => 'https://www.maxcdn.com/?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs',
189 end189 '/s/shopify' => 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs',
190 190 '/s/jetbrains' => 'https://www.jetbrains.com/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
191 get '/s/shopify' do191 '/s/jetbrains/ruby' => 'https://www.jetbrains.com/ruby/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
192 redirect 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'192 '/s/jetbrains/python' => 'https://www.jetbrains.com/pycharm/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
193 '/s/jetbrains/c' => 'https://www.jetbrains.com/clion/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
194 '/s/jetbrains/web' => 'https://www.jetbrains.com/webstorm/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
195 '/s/code-school' => 'http://www.codeschool.com/?utm_campaign=devdocs&utm_content=homepage&utm_source=devdocs&utm_medium=sponsorship',
196 '/s/tw' => 'https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20offline%20API%20documentation%20browser%3A',
197 '/s/fb' => 'https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20offline%20API%20documentation%20browser%3A',
198 '/s/re' => 'http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20offline%20API%20documentation%20browser&resubmit=true'
199 }.each do |path, url|
200 class_eval <<-CODE, __FILE__, __LINE__ + 1
201 get '#{path}' do
202 redirect '#{url}'
203 end
204 CODE
193 end205 end
194 206
195 get %r{\A/feed(?:\.atom)?\z} do207 get %r{\A/feed(?:\.atom)?\z} do
@@ -197,18 +209,6 @@ class App < Sinatra::Application · 1 unmodified line
197 settings.news_feed209 settings.news_feed
198 end210 end
199 211
200 get '/s/tw' do
201 redirect 'https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20offline%20API%20documentation%20browser%3A'
202 end
203
204 get '/s/fb' do
205 redirect 'https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdevdocs.io'
206 end
207
208 get '/s/re' do
209 redirect 'http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20offline%20API%20documentation%20browser&resubmit=true'
210 end
211
212 get %r{\A/(\w+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest|212 get %r{\A/(\w+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest|
213 return 404 unless @doc = settings.docs[doc]213 return 404 unless @doc = settings.docs[doc]
214 214
test/app_test.rb+1−1
@@ -225,7 +225,7 @@ class AppTest < MiniTest::Spec · 224 unmodified lines
225 225
226 describe "/s/[link]" do226 describe "/s/[link]" do
227 it "redirects" do227 it "redirects" do
228 %w(maxcdn shopify tw fb re).each do |link|228 %w(maxcdn shopify code-school jetbrains tw fb re).each do |link|
229 get "/s/#{link}"229 get "/s/#{link}"
230 assert last_response.redirect?230 assert last_response.redirect?
231 end231 end
views/manifest.erb+8−4
@@ -8,10 +8,14 @@ CACHE: · 7 unmodified lines
8<%= stylesheet_path 'application-dark' %>8<%= stylesheet_path 'application-dark' %>
9<%= image_path 'icons.png' %>9<%= image_path 'icons.png' %>
10<%= image_path 'icons@2x.png' %>10<%= image_path 'icons@2x.png' %>
11<%= image_path 'maxcdn.png' %>11<%= image_path 'jetbrains.png' %>
12<%= image_path 'maxcdn@2x.png' %>12<%= image_path 'jetbrains@2x.png' %>
13<%= image_path 'maxcdn-bw.png' %>13<%= image_path 'jetbrains-bw.png' %>
14<%= image_path 'maxcdn-bw@2x.png' %>14<%= image_path 'jetbrains-bw@2x.png' %>
15<%= image_path 'code-school.png' %>
16<%= image_path 'code-school@2x.png' %>
17<%= image_path 'code-school-bw.png' %>
18<%= image_path 'code-school-bw@2x.png' %>
15<%= image_path 'shopify.png' %>19<%= image_path 'shopify.png' %>
16<%= image_path 'shopify@2x.png' %>20<%= image_path 'shopify@2x.png' %>
17<%= image_path 'shopify-bw.png' %>21<%= image_path 'shopify-bw.png' %>