| @@ -1,7 +1,37 @@ |
| 1 | maxcdnLink = (className) -> """ | 1 | jetBrainsLink = (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 | |
| | 12 | JETBRAINS_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 | |
| | 19 | jetBrainsType = -> |
| | 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 | |
| | 31 | codeSchoolLink = (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 | |
| 15 | app.templates.splash = """ | 45 | app.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 | """ |