mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
7.0 KiB
123 lines
7.0 KiB
jetBrainsLink = (className) ->
|
|
type = jetBrainsType()
|
|
path = "/#{type}" if type
|
|
|
|
"""
|
|
<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>
|
|
"""
|
|
|
|
app.templates.splash = -> """
|
|
<div class="_splash-title">DevDocs</div>
|
|
<div class="_splash-sponsors">
|
|
#{jetBrainsLink '_splash-sponsor'}
|
|
#{codeSchoolLink '_splash-sponsor'}
|
|
</div>
|
|
"""
|
|
|
|
<% if App.development? %>
|
|
app.templates.intro = """
|
|
<div class="_intro"><div class="_intro-message">
|
|
<a class="_intro-hide" data-hide-intro>Stop showing this message</a>
|
|
<h2 class="_intro-title">Hi there!</h2>
|
|
<p>Thanks for downloading DevDocs. Here are a few things you should know:
|
|
<ol class="_intro-list">
|
|
<li>Your local version of DevDocs won't self-update. Unless you're modifying the code,
|
|
I recommend using the hosted version at <a href="http://devdocs.io">devdocs.io</a>.
|
|
<li>Run <code>thor docs:list</code> to see all available documentations.
|
|
<li>Run <code>thor docs:download --all</code> to download/update all documentations.
|
|
<li>To be notified about new versions, don't forget to <a href="https://github.com/Thibaut/devdocs/subscription">watch the repository</a> on GitHub.
|
|
<li>The <a href="https://github.com/Thibaut/devdocs/issues">issue tracker</a> is the preferred channel for bug reports and
|
|
feature requests. For everything else, use the <a href="https://groups.google.com/d/forum/devdocs">mailing list</a>.
|
|
<li>Contributions are welcome. See the <a href="https://github.com/Thibaut/devdocs/blob/master/CONTRIBUTING.md">guidelines</a>.
|
|
<li>DevDocs is licensed under the terms of the Mozilla Public License v2.0. For more information,
|
|
see the <a href="https://github.com/Thibaut/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a> and
|
|
<a href="https://github.com/Thibaut/devdocs/blob/master/LICENSE">LICENSE</a> files.
|
|
<li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
|
|
</ol>
|
|
<p class="_intro-sponsors">
|
|
#{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'}
|
|
<p>Happy coding!
|
|
</div></div>
|
|
"""
|
|
<% else %>
|
|
app.templates.intro = """
|
|
<div class="_intro"><div class="_intro-message">
|
|
<a class="_intro-hide" data-hide-intro>Stop showing this message</a>
|
|
<h2 class="_intro-title">Welcome!</h2>
|
|
<p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
|
|
Here's what you should know before you start:
|
|
<ol class="_intro-list">
|
|
<li>To enable more docs, click <a class="_intro-link" data-pick-docs>Select documentation</a> in the bottom left corner
|
|
<li>You don't have to use your mouse — see the list of <a href="/help#shortcuts">keyboard shortcuts</a>
|
|
<li>The search supports fuzzy matching (e.g. "bgcp" brings up "background-clip")
|
|
<li>To search a specific documentation, type its name (or an abbreviation), then Tab
|
|
<li>You can search using your browser's address bar — <a href="/help#browser_search">learn how</a>
|
|
<li>DevDocs works <a href="/offline">offline</a>, on mobile, and can be installed on <a href="https://chrome.google.com/webstore/detail/devdocs/mnfehgbmkapmjnhcnbodoamcioleeooe">Chrome</a> and <a href="https://marketplace.firefox.com/app/devdocs/">Firefox</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 free and <a href="https://github.com/Thibaut/devdocs">open source</a>
|
|
<iframe class="_github-btn" src="//ghbtns.com/github-btn.html?user=Thibaut&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
|
|
<li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/devdocs/">Gratipay</a>. Thanks!
|
|
</ol>
|
|
<p class="_intro-sponsors">
|
|
#{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'}
|
|
<p>Happy coding!
|
|
</div></div>
|
|
"""
|
|
<% end %>
|
|
|
|
app.templates.mobileNav = """
|
|
<nav class="_mobile-nav">
|
|
<a href="/offline" class="_mobile-nav-link">Offline</a>
|
|
<a href="/about" class="_mobile-nav-link">About</a>
|
|
<a href="/news" class="_mobile-nav-link">News</a>
|
|
<a href="/help" class="_mobile-nav-link">Help</a>
|
|
</nav>
|
|
"""
|
|
|
|
app.templates.mobileIntro = """
|
|
<div class="_mobile-intro">
|
|
<h2 class="_intro-title">Welcome!</h2>
|
|
<p>DevDocs combines multiple API documentations in a fast, organized, and searchable interface.
|
|
Here's what you should know before you start:
|
|
<ol class="_intro-list">
|
|
<li>To pick your docs, click <a data-pick-docs>Select documentation</a> at the bottom of the menu
|
|
<li>The search supports fuzzy matching (e.g. "bgcp" matches "background-clip")
|
|
<li>To search a specific documentation, type its name (or an abbreviation), then Space
|
|
<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>
|
|
</ol>
|
|
<p>Happy coding!
|
|
<p class="_intro-sponsors">#{jetBrainsLink '_intro-sponsor'} #{codeSchoolLink '_intro-sponsor'}</p>
|
|
<a class="_intro-hide" data-hide-intro>Stop showing this message</a>
|
|
</div>
|
|
"""
|