1
0
Thibaut Courouble 8 жил өмнө
parent
commit
3ce649351c

+ 1 - 1
assets/javascripts/news.json

@@ -88,7 +88,7 @@
     "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"
     "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"
   ], [
   ], [
     "2015-07-26",
     "2015-07-26",
-    "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>.",
+    "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>.",
     "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."
     "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."
   ], [
   ], [
     "2015-07-05",
     "2015-07-05",

+ 13 - 14
assets/javascripts/templates/pages/help_tmpl.coffee

@@ -7,7 +7,7 @@ app.templates.helpPage = """
     <ul class="_toc-list">
     <ul class="_toc-list">
       <li><a href="#search">Search</a>
       <li><a href="#search">Search</a>
       <li><a href="#shortcuts">Keyboard Shortcuts</a>
       <li><a href="#shortcuts">Keyboard Shortcuts</a>
-      <li><a href="#abbreviations">Abbreviations</a>
+      <li><a href="#aliases">Search Aliases</a>
     </ul>
     </ul>
   </nav>
   </nav>
 
 
@@ -15,14 +15,13 @@ app.templates.helpPage = """
 
 
   <h2 class="_block-heading" id="search">Search</h2>
   <h2 class="_block-heading" id="search">Search</h2>
   <p>
   <p>
-    The search is case-insensitive and supports fuzzy matching (for queries longer than two characters).
-    For example, searching <code class="_label">bgcp</code> brings up <code class="_label">background-clip</code>.<br>
-    Abbreviations are also supported (<a href="#abbreviations">full list</a> below).
-    For example, <code class="_label">$</code> is an alias for <code class="_label">jQuery</code>.
+    The search is case-insensitive. It supports fuzzy matching
+    (e.g. <code class="_label">bgcp</code> matches <code class="_label">background-clip</code>)
+    and aliases (<a href="#aliases">full list</a> below).
   <dl>
   <dl>
     <dt id="doc_search">Searching a single documentation
     <dt id="doc_search">Searching a single documentation
     <dd>
     <dd>
-      You can scope the search to a single documentation by typing its name (or an abbreviation),
+      You can scope the search to a single documentation by typing its name (or an abbreviation)
       and pressing <code class="_label">Tab</code> (<code class="_label">Space</code> on mobile devices).
       and pressing <code class="_label">Tab</code> (<code class="_label">Space</code> on mobile devices).
       For example, to search the JavaScript documentation, enter <code class="_label">javascript</code>
       For example, to search the JavaScript documentation, enter <code class="_label">javascript</code>
       or <code class="_label">js</code>, then <code class="_label">Tab</code>.<br>
       or <code class="_label">js</code>, then <code class="_label">Tab</code>.<br>
@@ -30,16 +29,16 @@ app.templates.helpPage = """
     <dt id="url_search">Prefilling the search field
     <dt id="url_search">Prefilling the search field
     <dd>
     <dd>
       The search field can be prefilled from the URL by visiting <a href="/#q=keyword" target="_top">devdocs.io/#q=keyword</a>.
       The search field can be prefilled from the URL by visiting <a href="/#q=keyword" target="_top">devdocs.io/#q=keyword</a>.
-      Characters after <code class="_label">#q=</code> will be used as search string.<br>
+      Characters after <code class="_label">#q=</code> will be used as search query.<br>
       To search a single documentation, add its name and a space before the keyword:
       To search a single documentation, add its name and a space before the keyword:
       <a href="/#q=js%20date" target="_top">devdocs.io/#q=js date</a>.
       <a href="/#q=js%20date" target="_top">devdocs.io/#q=js date</a>.
     <dt id="browser_search">Searching using the address bar
     <dt id="browser_search">Searching using the address bar
     <dd>
     <dd>
-      DevDocs supports OpenSearch, meaning it can easily be installed as a search engine on most web browsers.
+      DevDocs supports OpenSearch. It can easily be installed as a search engine on most web browsers:
       <ul>
       <ul>
         <li>On Chrome, the setup is done automatically. Simply press <code class="_label">Tab</code> when devdocs.io is autocompleted
         <li>On Chrome, the setup is done automatically. Simply press <code class="_label">Tab</code> when devdocs.io is autocompleted
             in the omnibox (to set a custom keyword, click <em>Manage search engines\u2026</em> in Chrome's settings).
             in the omnibox (to set a custom keyword, click <em>Manage search engines\u2026</em> in Chrome's settings).
-        <li>On Firefox, open the search engine list (icon in the search bar) and select <em>Add "DevDocs Search"</em>.
+        <li>On Firefox, open the search engine list (icon in the search bar) and click <em>Add "DevDocs Search"</em>.
             DevDocs is now available in the search bar. You can also search from the location bar by following
             DevDocs is now available in the search bar. You can also search from the location bar by following
             <a href="https://support.mozilla.org/en-US/kb/how-search-from-address-bar">these instructions</a>.
             <a href="https://support.mozilla.org/en-US/kb/how-search-from-address-bar">these instructions</a>.
   </dl>
   </dl>
@@ -114,16 +113,16 @@ app.templates.helpPage = """
       <code class="_shortcut-code">alt + s</code>
       <code class="_shortcut-code">alt + s</code>
     <dd class="_shortcuts-dd">Search on Stack Overflow
     <dd class="_shortcuts-dd">Search on Stack Overflow
   </dl>
   </dl>
-  <p class="_note">
+  <p class="_note _note-green">
     <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or
     <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or
     continue to type and it will refocus the search field and start showing new results.
     continue to type and it will refocus the search field and start showing new results.
 
 
-  <h2 class="_block-heading" id="abbreviations">Abbreviations</h2>
-  <p>Feel free to suggest new abbreviations on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.
-  <table class="_abbreviations">
+  <h2 class="_block-heading" id="aliases">Search Aliases</h2>
+  <table>
     <tr>
     <tr>
       <th>Word
       <th>Word
       <th>Alias
       <th>Alias
-    #{("<tr><td>#{key}<td>#{value}" for key, value of app.models.Entry.ALIASES).join('')}
+    #{("<tr><td class=\"_code\">#{key}<td class=\"_code\">#{value}" for key, value of app.models.Entry.ALIASES).join('')}
   </table>
   </table>
+  <p>Feel free to suggest new aliases on <a href="https://github.com/Thibaut/devdocs/issues/new">GitHub</a>.
 """
 """

+ 1 - 6
assets/stylesheets/components/_content.scss

@@ -357,12 +357,6 @@
   @extend %label;
   @extend %label;
 }
 }
 
 
-//
-// Abbreviations
-//
-
-._abbreviations td { @extend %code; }
-
 //
 //
 // Utilities
 // Utilities
 //
 //
@@ -370,6 +364,7 @@
 ._note { @extend %note; }
 ._note { @extend %note; }
 ._note-green { @extend %note-green; }
 ._note-green { @extend %note-green; }
 ._label { @extend %label; }
 ._label { @extend %label; }
+._code { @extend %code; }
 ._highlight { background: $highlightBackground !important; }
 ._highlight { background: $highlightBackground !important; }
 
 
 ._pre-clip {
 ._pre-clip {