History

Improve help page

Thibaut Courouble committed 9 years ago

Commit 3ce64931 parent f010b603 files · +15 −21Browse files

Unified · Split

3 files
  1. assets/javascripts/news.json +1 −1
  2. assets/javascripts/templates/pages/help_tmpl.coffee +13 −14
  3. assets/stylesheets/components/_content.scss +1 −6
assets/javascripts/news.json+1−1
@@ -88,7 +88,7 @@ · 87 unmodified lines
8888 "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"
8989 ], [
9090 "2015-07-26",
91− "Added search abbreviations (e.g. <code class=\"_label\">$</code> is an alias for <code class=\"_label\">jQuery</code>).\n<a href=\"/help#abbreviations\">Click here</a> to see the full list. Feel free to suggest more on <a href=\"https://github.com/Thibaut/devdocs/issues/new\" target=\"_blank\" rel=\"noopener\">GitHub</a>.",
91+ "Added search aliases (e.g. <code class=\"_label\">$</code> is an alias for <code class=\"_label\">jQuery</code>).\n<a href=\"/help#aliases\">Click here</a> to see the full list. Feel free to suggest more on <a href=\"https://github.com/Thibaut/devdocs/issues/new\" target=\"_blank\" rel=\"noopener\">GitHub</a>.",
9292 "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."
9393 ], [
9494 "2015-07-05",
assets/javascripts/templates/pages/help_tmpl.coffee+13−14
@@ -7,7 +7,7 @@ app.templates.helpPage = """ · 6 unmodified lines
77 <ul class="_toc-list">
88 <li><a href="#search">Search</a>
99 <li><a href="#shortcuts">Keyboard Shortcuts</a>
10− <li><a href="#abbreviations">Abbreviations</a>
10+ <li><a href="#aliases">Search Aliases</a>
1111 </ul>
1212 </nav>
1313
@@ -15,14 +15,13 @@ app.templates.helpPage = """ · 1 unmodified line
1515
1616 <h2 class="_block-heading" id="search">Search</h2>
1717 <p>
18− The search is case-insensitive and supports fuzzy matching (for queries longer than two characters).
19− For example, searching <code class="_label">bgcp</code> brings up <code class="_label">background-clip</code>.<br>
20− Abbreviations are also supported (<a href="#abbreviations">full list</a> below).
21− For example, <code class="_label">$</code> is an alias for <code class="_label">jQuery</code>.
18+ The search is case-insensitive. It supports fuzzy matching
19+ (e.g. <code class="_label">bgcp</code> matches <code class="_label">background-clip</code>)
20+ and aliases (<a href="#aliases">full list</a> below).
2221 <dl>
2322 <dt id="doc_search">Searching a single documentation
2423 <dd>
25− You can scope the search to a single documentation by typing its name (or an abbreviation),
24+ You can scope the search to a single documentation by typing its name (or an abbreviation)
2625 and pressing <code class="_label">Tab</code> (<code class="_label">Space</code> on mobile devices).
2726 For example, to search the JavaScript documentation, enter <code class="_label">javascript</code>
2827 or <code class="_label">js</code>, then <code class="_label">Tab</code>.<br>
@@ -30,16 +29,16 @@ app.templates.helpPage = """ · 1 unmodified line
3029 <dt id="url_search">Prefilling the search field
3130 <dd>
3231 The search field can be prefilled from the URL by visiting <a href="/#q=keyword" target="_top">devdocs.io/#q=keyword</a>.
33− Characters after <code class="_label">#q=</code> will be used as search string.<br>
32+ Characters after <code class="_label">#q=</code> will be used as search query.<br>
3433 To search a single documentation, add its name and a space before the keyword:
3534 <a href="/#q=js%20date" target="_top">devdocs.io/#q=js date</a>.
3635 <dt id="browser_search">Searching using the address bar
3736 <dd>
38− DevDocs supports OpenSearch, meaning it can easily be installed as a search engine on most web browsers.
37+ DevDocs supports OpenSearch. It can easily be installed as a search engine on most web browsers:
3938 <ul>
4039 <li>On Chrome, the setup is done automatically. Simply press <code class="_label">Tab</code> when devdocs.io is autocompleted
4140 in the omnibox (to set a custom keyword, click <em>Manage search engines\u2026</em> in Chrome's settings).
42− <li>On Firefox, open the search engine list (icon in the search bar) and select <em>Add "DevDocs Search"</em>.
41+ <li>On Firefox, open the search engine list (icon in the search bar) and click <em>Add "DevDocs Search"</em>.
4342 DevDocs is now available in the search bar. You can also search from the location bar by following
4443 <a href="https://support.mozilla.org/en-US/kb/how-search-from-address-bar">these instructions</a>.
4544 </dl>
@@ -114,16 +113,16 @@ app.templates.helpPage = """ · 68 unmodified lines
114113 <code class="_shortcut-code">alt + s</code>
115114 <dd class="_shortcuts-dd">Search on Stack Overflow
116115 </dl>
117− <p class="_note">
116+ <p class="_note _note-green">
118117 <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or
119118 continue to type and it will refocus the search field and start showing new results.
120119
121− <h2 class="_block-heading" id="abbreviations">Abbreviations</h2>
122− <p>Feel free to suggest new abbreviations on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.
123− <table class="_abbreviations">
120+ <h2 class="_block-heading" id="aliases">Search Aliases</h2>
121+ <table>
124122 <tr>
125123 <th>Word
126124 <th>Alias
127− #{("<tr><td>#{key}<td>#{value}" for key, value of app.models.Entry.ALIASES).join('')}
125+ #{("<tr><td class=\"_code\">#{key}<td class=\"_code\">#{value}" for key, value of app.models.Entry.ALIASES).join('')}
128126 </table>
127+ <p>Feel free to suggest new aliases on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.
129128 """
assets/stylesheets/components/_content.scss+1−6
@@ -357,12 +357,6 @@ · 356 unmodified lines
357357 @extend %label;
358358 }
359359
360−//
361−// Abbreviations
362−//
363−
364−._abbreviations td { @extend %code; }
365−
366360 //
367361 // Utilities
368362 //
@@ -370,6 +364,7 @@ · 1 unmodified line
370364 ._note { @extend %note; }
371365 ._note-green { @extend %note-green; }
372366 ._label { @extend %label; }
367+._code { @extend %code; }
373368 ._highlight { background: $highlightBackground !important; }
374369
375370 ._pre-clip {