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
88 "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"88 "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"
89 ], [89 ], [
90 "2015-07-26",90 "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>.",
92 "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."92 "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."
93 ], [93 ], [
94 "2015-07-05",94 "2015-07-05",
assets/javascripts/templates/pages/help_tmpl.coffee+13−14
@@ -7,7 +7,7 @@ app.templates.helpPage = """ · 6 unmodified lines
7 <ul class="_toc-list">7 <ul class="_toc-list">
8 <li><a href="#search">Search</a>8 <li><a href="#search">Search</a>
9 <li><a href="#shortcuts">Keyboard Shortcuts</a>9 <li><a href="#shortcuts">Keyboard Shortcuts</a>
10 <li><a href="#abbreviations">Abbreviations</a>10 <li><a href="#aliases">Search Aliases</a>
11 </ul>11 </ul>
12 </nav>12 </nav>
13 13
@@ -15,14 +15,13 @@ app.templates.helpPage = """ · 1 unmodified line
15 15
16 <h2 class="_block-heading" id="search">Search</h2>16 <h2 class="_block-heading" id="search">Search</h2>
17 <p>17 <p>
18 The search is case-insensitive and supports fuzzy matching (for queries longer than two characters).18 The search is case-insensitive. It supports fuzzy matching
19 For example, searching <code class="_label">bgcp</code> brings up <code class="_label">background-clip</code>.<br>19 (e.g. <code class="_label">bgcp</code> matches <code class="_label">background-clip</code>)
20 Abbreviations are also supported (<a href="#abbreviations">full list</a> below).20 and aliases (<a href="#aliases">full list</a> below).
21 For example, <code class="_label">$</code> is an alias for <code class="_label">jQuery</code>.
22 <dl>21 <dl>
23 <dt id="doc_search">Searching a single documentation22 <dt id="doc_search">Searching a single documentation
24 <dd>23 <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)
26 and pressing <code class="_label">Tab</code> (<code class="_label">Space</code> on mobile devices).25 and pressing <code class="_label">Tab</code> (<code class="_label">Space</code> on mobile devices).
27 For example, to search the JavaScript documentation, enter <code class="_label">javascript</code>26 For example, to search the JavaScript documentation, enter <code class="_label">javascript</code>
28 or <code class="_label">js</code>, then <code class="_label">Tab</code>.<br>27 or <code class="_label">js</code>, then <code class="_label">Tab</code>.<br>
@@ -30,16 +29,16 @@ app.templates.helpPage = """ · 1 unmodified line
30 <dt id="url_search">Prefilling the search field29 <dt id="url_search">Prefilling the search field
31 <dd>30 <dd>
32 The search field can be prefilled from the URL by visiting <a href="/#q=keyword" target="_top">devdocs.io/#q=keyword</a>.31 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>
34 To search a single documentation, add its name and a space before the keyword:33 To search a single documentation, add its name and a space before the keyword:
35 <a href="/#q=js%20date" target="_top">devdocs.io/#q=js date</a>.34 <a href="/#q=js%20date" target="_top">devdocs.io/#q=js date</a>.
36 <dt id="browser_search">Searching using the address bar35 <dt id="browser_search">Searching using the address bar
37 <dd>36 <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:
39 <ul>38 <ul>
40 <li>On Chrome, the setup is done automatically. Simply press <code class="_label">Tab</code> when devdocs.io is autocompleted39 <li>On Chrome, the setup is done automatically. Simply press <code class="_label">Tab</code> when devdocs.io is autocompleted
41 in the omnibox (to set a custom keyword, click <em>Manage search engines\u2026</em> in Chrome's settings).40 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>.
43 DevDocs is now available in the search bar. You can also search from the location bar by following42 DevDocs is now available in the search bar. You can also search from the location bar by following
44 <a href="https://support.mozilla.org/en-US/kb/how-search-from-address-bar">these instructions</a>.43 <a href="https://support.mozilla.org/en-US/kb/how-search-from-address-bar">these instructions</a>.
45 </dl>44 </dl>
@@ -114,16 +113,16 @@ app.templates.helpPage = """ · 68 unmodified lines
114 <code class="_shortcut-code">alt + s</code>113 <code class="_shortcut-code">alt + s</code>
115 <dd class="_shortcuts-dd">Search on Stack Overflow114 <dd class="_shortcuts-dd">Search on Stack Overflow
116 </dl>115 </dl>
117 <p class="_note">116 <p class="_note _note-green">
118 <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or117 <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or
119 continue to type and it will refocus the search field and start showing new results.118 continue to type and it will refocus the search field and start showing new results.
120 119
121 <h2 class="_block-heading" id="abbreviations">Abbreviations</h2>120 <h2 class="_block-heading" id="aliases">Search Aliases</h2>
122 <p>Feel free to suggest new abbreviations on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.121 <table>
123 <table class="_abbreviations">
124 <tr>122 <tr>
125 <th>Word123 <th>Word
126 <th>Alias124 <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('')}
128 </table>126 </table>
127 <p>Feel free to suggest new aliases on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.
129"""128"""
assets/stylesheets/components/_content.scss+1−6
@@ -357,12 +357,6 @@ · 356 unmodified lines
357 @extend %label;357 @extend %label;
358}358}
359 359
360//
361// Abbreviations
362//
363
364._abbreviations td { @extend %code; }
365
366//360//
367// Utilities361// Utilities
368//362//
@@ -370,6 +364,7 @@ · 1 unmodified line
370._note { @extend %note; }364._note { @extend %note; }
371._note-green { @extend %note-green; }365._note-green { @extend %note-green; }
372._label { @extend %label; }366._label { @extend %label; }
367._code { @extend %code; }
373._highlight { background: $highlightBackground !important; }368._highlight { background: $highlightBackground !important; }
374 369
375._pre-clip {370._pre-clip {