Add new sponsors

pull/229/merge
Thibaut 10 years ago
parent 05d5b93967
commit 02166e0843

@ -3,8 +3,7 @@
DevDocs combines multiple API documentations in a fast, organized, and searchable interface. DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
* Created by [Thibaut Courouble](http://thibaut.me) * Created by [Thibaut Courouble](http://thibaut.me)
* Made at [Shopify](http://devdocs.io/s/shopify) * Supported by [JetBrains](http://devdocs.io/s/jetbrains), [Code School](http://devdocs.io/s/code-school) and [Shopify](http://devdocs.io/s/shopify)
* Powered by [MaxCDN](http://devdocs.io/s/maxcdn)
Keep track of development and community news: Keep track of development and community news:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

@ -1,5 +1,8 @@
[ [
[ [
"2015-07-12",
"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!"
], [
"2015-07-05", "2015-07-05",
"New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>" "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>"
], [ ], [

@ -34,10 +34,11 @@ app.templates.notifShare = ->
app.templates.notifThanks = -> app.templates.notifThanks = ->
textNotif """ Hi there! """, textNotif """ Hi there! """,
""" <p class="_notif-text">Quick shout-out to our awesome sponsors: """ <p class="_notif-text">Like DevDocs? Check out these awesome companies who are making it possible:
<ul class="_notif-list"> <ul class="_notif-list">
<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> <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.
<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! <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.
<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!
</ul> </ul>
<p class="_notif-text">Have a great day :) """ <p class="_notif-text">Have a great day :) """

@ -13,8 +13,7 @@ app.templates.aboutPage = -> """
<p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface. <p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
<ul> <ul>
<li>Created and maintained by <a href="http://thibaut.me">Thibaut Courouble</a> <li>Created and maintained by <a href="http://thibaut.me">Thibaut Courouble</a>
<li>Supported by <a href="http://devdocs.io/s/shopify">Shopify</a> <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>
<li>Powered by <a href="http://devdocs.io/s/maxcdn" title="Content Delivery Network Services">MaxCDN</a>
<li>Free and <a href="https://github.com/Thibaut/devdocs">open source</a> <li>Free and <a href="https://github.com/Thibaut/devdocs">open source</a>
<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> <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>
</ul> </ul>

@ -1,7 +1,37 @@
maxcdnLink = (className) -> """ jetBrainsLink = (className) ->
<a href="http://devdocs.io/s/maxcdn" class="#{className}"> type = jetBrainsType()
<span class="_logo-thx _maxcdn-logo">MaxCDN</span> path = "/#{type}" if type
<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>
"""
<a href="http://devdocs.io/s/jetbrains#{path || ''}" class="#{className}">
<span class="_logo-thx _jetbrains-logo">JetBrains</span>
<span class="_logo-info">#{JETBRAINS_INFO[type || 'default']}</span>
</a>
"""
JETBRAINS_INFO =
ruby: 'Developing in Ruby? Boost your productivity with RubyMine, a powerful IDE with smart coding assistance and advanced testing and debugging features.'
python: 'Developing in Python? Enjoy productive development with PyCharm, an intelligent Python IDE offering unique coding experience.'
c: 'Developing in C? Now benefit from CLion, a C/C++ IDE enhancing your productivity with on-thy-fly static analysis and automated refactorings.'
web: 'Doing client-side development? Try WebStorm, an IDE that really understands JavaScript and modern frameworks like AngularJS and boosts your productivity.'
default: 'JetBrains makes software development a more productive and enjoyable experience through smart IDEs and code editors.'
jetBrainsType = ->
docs = if app.settings then app.settings.getDocs() else []
if docs.indexOf('ruby') != -1
'ruby'
else if docs.indexOf('python') != -1 || docs.indexOf('python2') != -1
'python'
else if docs.indexOf('c') != -1 or docs.indexOf('cpp') != -1
'c'
else if docs.indexOf('javascript') != -1 or docs.indexOf('jquery') != -1
'web'
codeSchoolLink = (className) -> """
<a href="http://devdocs.io/s/code-school" class="#{className}">
<span class="_logo-thx _code-school-logo">Code School</span>
<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>
</a> </a>
""" """
@ -12,10 +42,13 @@ shopifyLink = (className) -> """
</a> </a>
""" """
app.templates.splash = """ app.templates.splash = -> """
<div class="_splash-title">DevDocs</div> <div class="_splash-title">DevDocs</div>
#{maxcdnLink '_splash-sponsor'} <div class="_splash-sponsors">
#{jetBrainsLink '_splash-sponsor'}
#{codeSchoolLink '_splash-sponsor'}
#{shopifyLink '_splash-sponsor'} #{shopifyLink '_splash-sponsor'}
</div>
""" """
<% if App.development? %> <% if App.development? %>
@ -39,8 +72,8 @@ app.templates.intro = """
<li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks! <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
</ol> </ol>
<p class="_intro-sponsors"> <p class="_intro-sponsors">
Thanks to#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'} #{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}
<p>That's all. Happy coding! <p>Happy coding!
</div></div> </div></div>
""" """
<% else %> <% else %>
@ -63,8 +96,8 @@ app.templates.intro = """
<li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks! <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
</ol> </ol>
<p class="_intro-sponsors"> <p class="_intro-sponsors">
Thanks to#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'} #{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}
<p>That's all. Happy coding! <p>Happy coding!
</div></div> </div></div>
""" """
<% end %> <% end %>
@ -90,8 +123,8 @@ app.templates.mobileIntro = """
<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> <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>
<li>DevDocs is <a href="https://github.com/Thibaut/devdocs">open source</a> <li>DevDocs is <a href="https://github.com/Thibaut/devdocs">open source</a>
</ol> </ol>
<p>That's all. Happy coding! <p>Happy coding!
<p class="_intro-sponsors">#{shopifyLink '_intro-sponsor'} #{maxcdnLink '_intro-sponsor'}</p> <p class="_intro-sponsors">#{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'} #{shopifyLink '_intro-sponsor'}</p>
<a class="_intro-hide" data-hide-intro>Stop showing this message</a> <a class="_intro-hide" data-hide-intro>Stop showing this message</a>
</div> </div>
""" """

@ -68,26 +68,32 @@
color: $splashText; color: $splashText;
cursor: default; cursor: default;
opacity: 1; opacity: 1;
margin-top: -1.25em;
@extend ._booting:before, %user-select-none; @extend ._booting:before, %user-select-none;
} }
._splash-sponsor { ._splash-sponsors {
position: absolute; position: absolute;
display: block; top: 50%;
bottom: 1.25rem; left: 0;
right: 1rem; right: 0;
margin-top: 1.25rem;
text-align: center;
line-height: 2rem;
}
._logo-thx { opacity: .25; } ._splash-sponsor {
&:hover ._logo-thx { opacity: .5; } position: relative;
display: inline-block;
vertical-align: top;
margin: .5rem 1.5rem;
& + & { ._logo-thx { opacity: .3; }
left: 1rem; &:hover ._logo-thx { opacity: .6; }
right: auto;
._logo-info { ._logo-info {
right: auto; right: 50%;
left: 0; margin-right: -9rem;
}
} }
} }
@ -409,24 +415,49 @@
margin-bottom: .75rem; margin-bottom: .75rem;
padding: .5rem .75rem; padding: .5rem .75rem;
line-height: 1.375rem; line-height: 1.375rem;
text-align: left;
pointer-events: none; pointer-events: none;
@extend %notif; @extend %notif;
:hover > & { opacity: 1; } :hover > & { opacity: 1; }
} }
._maxcdn-logo { ._shopify-logo {
width: 6.25rem; width: 5.5rem;
background-image: image-url('maxcdn.png'); background-image: image-url('shopify.png');
background-size: 6.25rem 1rem; background-size: 5.5rem 1.5rem;
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('shopify@2x.png');
}
}
._splash-sponsor > ._shopify-logo {
background-image: image-url('shopify-bw.png');
@if $style == 'dark' {
filter: invert(100%);
-webkit-filter: invert(100%);
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('maxcdn@2x.png'); background-image: image-url('shopify-bw@2x.png');
} }
} }
._splash-sponsor > ._maxcdn-logo { ._jetbrains-logo {
background-image: image-url('maxcdn-bw.png'); top: 1px;
width: 5rem;
background-image: image-url('jetbrains.png');
background-size: 5rem 1.5rem;
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('jetbrains@2x.png');
}
}
._splash-sponsor > ._jetbrains-logo {
background-image: image-url('jetbrains-bw.png');
@if $style == 'dark' { @if $style == 'dark' {
filter: invert(100%); filter: invert(100%);
@ -434,22 +465,22 @@
} }
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('maxcdn-bw@2x.png'); background-image: image-url('jetbrains-bw@2x.png');
} }
} }
._shopify-logo { ._code-school-logo {
width: 5.5rem; width: 7rem;
background-image: image-url('shopify.png'); background-image: image-url('code-school.png');
background-size: 5.5rem 1.5rem; background-size: 7rem 1.25rem;
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('shopify@2x.png'); background-image: image-url('code-school@2x.png');
} }
} }
._splash-sponsor > ._shopify-logo { ._splash-sponsor > ._code-school-logo {
background-image: image-url('shopify-bw.png'); background-image: image-url('code-school-bw.png');
@if $style == 'dark' { @if $style == 'dark' {
filter: invert(100%); filter: invert(100%);
@ -457,6 +488,6 @@
} }
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
background-image: image-url('shopify-bw@2x.png'); background-image: image-url('code-school-bw@2x.png');
} }
} }

@ -90,6 +90,22 @@
box-shadow: 0 1px $noteGreenBorder, 0 -1px $noteGreenBorder; box-shadow: 0 1px $noteGreenBorder, 0 -1px $noteGreenBorder;
} }
// Splash
._splash-sponsors { margin-top: 1rem; }
._splash-sponsor {
position: static;
._logo-info {
left: 1rem;
right: 1rem;
width: auto;
max-width: none;
margin: 0;
}
}
// Notice // Notice
._notice { ._notice {
@ -189,9 +205,9 @@
position: static; position: static;
float: none; float: none;
display: block; display: block;
margin-top: 1.25rem; margin-top: .75rem;
text-align: center; text-align: center;
} }
._intro-sponsor { margin: 0 1em; } ._intro-sponsor { margin: .5em .75em; }
} }

@ -55,7 +55,7 @@
overflow-y: auto; overflow-y: auto;
> ._notif-title { > ._notif-title {
margin: -.125rem 0 1em; margin-bottom: .5rem;
text-align: center; text-align: center;
} }
@ -63,6 +63,7 @@
line-height: 1.125rem; line-height: 1.125rem;
font-size: .6875rem; font-size: .6875rem;
color: $notifColorLight; color: $notifColorLight;
margin-bottom: .25rem;
+ ._news-row { margin-top: .75rem; } + ._news-row { margin-top: .75rem; }
} }

@ -20,7 +20,7 @@ $focusBorder: #d4d4d4;
$focusText: #000; $focusText: #000;
$loadingText: #e6e6e6; $loadingText: #e6e6e6;
$splashText: #d7d7d7; $splashText: #bbb;
$promoText: #bbb; $promoText: #bbb;
$selectionBackground: #398df0; $selectionBackground: #398df0;

@ -19,9 +19,9 @@ $focusBackground: #3d3d3e;
$focusBorder: #3d3d3e; $focusBorder: #3d3d3e;
$focusText: #f7f2f2; $focusText: #f7f2f2;
$loadingText: #616161; $loadingText: #666;
$splashText: #616161; $splashText: #666;
$promoText: #616161; $promoText: #666;
$selectionBackground: #346fce; $selectionBackground: #346fce;
$selectionBorder: #346fce; $selectionBorder: #346fce;

@ -184,12 +184,24 @@ class App < Sinatra::Application
CODE CODE
end end
get '/s/maxcdn' do {
redirect 'https://www.maxcdn.com/?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs' '/s/maxcdn' => 'https://www.maxcdn.com/?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs',
'/s/shopify' => 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs',
'/s/jetbrains' => 'https://www.jetbrains.com/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
'/s/jetbrains/ruby' => 'https://www.jetbrains.com/ruby/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
'/s/jetbrains/python' => 'https://www.jetbrains.com/pycharm/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
'/s/jetbrains/c' => 'https://www.jetbrains.com/clion/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
'/s/jetbrains/web' => 'https://www.jetbrains.com/webstorm/?utm_source=devdocs&utm_medium=sponsorship&utm_campaign=devdocs',
'/s/code-school' => 'http://www.codeschool.com/?utm_campaign=devdocs&utm_content=homepage&utm_source=devdocs&utm_medium=sponsorship',
'/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',
'/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',
'/s/re' => 'http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20offline%20API%20documentation%20browser&resubmit=true'
}.each do |path, url|
class_eval <<-CODE, __FILE__, __LINE__ + 1
get '#{path}' do
redirect '#{url}'
end end
CODE
get '/s/shopify' do
redirect 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'
end end
get %r{\A/feed(?:\.atom)?\z} do get %r{\A/feed(?:\.atom)?\z} do
@ -197,18 +209,6 @@ class App < Sinatra::Application
settings.news_feed settings.news_feed
end end
get '/s/tw' do
redirect 'https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20offline%20API%20documentation%20browser%3A'
end
get '/s/fb' do
redirect 'https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdevdocs.io'
end
get '/s/re' do
redirect 'http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20offline%20API%20documentation%20browser&resubmit=true'
end
get %r{\A/(\w+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest| get %r{\A/(\w+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest|
return 404 unless @doc = settings.docs[doc] return 404 unless @doc = settings.docs[doc]

@ -225,7 +225,7 @@ class AppTest < MiniTest::Spec
describe "/s/[link]" do describe "/s/[link]" do
it "redirects" do it "redirects" do
%w(maxcdn shopify tw fb re).each do |link| %w(maxcdn shopify code-school jetbrains tw fb re).each do |link|
get "/s/#{link}" get "/s/#{link}"
assert last_response.redirect? assert last_response.redirect?
end end

@ -8,10 +8,14 @@ CACHE:
<%= stylesheet_path 'application-dark' %> <%= stylesheet_path 'application-dark' %>
<%= image_path 'icons.png' %> <%= image_path 'icons.png' %>
<%= image_path 'icons@2x.png' %> <%= image_path 'icons@2x.png' %>
<%= image_path 'maxcdn.png' %> <%= image_path 'jetbrains.png' %>
<%= image_path 'maxcdn@2x.png' %> <%= image_path 'jetbrains@2x.png' %>
<%= image_path 'maxcdn-bw.png' %> <%= image_path 'jetbrains-bw.png' %>
<%= image_path 'maxcdn-bw@2x.png' %> <%= image_path 'jetbrains-bw@2x.png' %>
<%= image_path 'code-school.png' %>
<%= image_path 'code-school@2x.png' %>
<%= image_path 'code-school-bw.png' %>
<%= image_path 'code-school-bw@2x.png' %>
<%= image_path 'shopify.png' %> <%= image_path 'shopify.png' %>
<%= image_path 'shopify@2x.png' %> <%= image_path 'shopify@2x.png' %>
<%= image_path 'shopify-bw.png' %> <%= image_path 'shopify-bw.png' %>

Loading…
Cancel
Save