Skip to content

Commit

Permalink
Tooltips for masthead links (mmistakes#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
maazadeeb authored and mmistakes committed Dec 4, 2017
1 parent a7453f1 commit a5187b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _includes/masthead.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
{% else %}
{% assign domain = site.url | append: site.baseurl %}
{% endif %}
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li>
<li class="masthead__menu-item">
<a href="{{ domain }}{{ link.url }}" {% if link.description %} title="{{ link.description }}" {% endif %}>{{ link.title }}</a>
</li>
{% endfor %}
</ul>
<button type="button">
Expand Down
2 changes: 2 additions & 0 deletions docs/_docs/07-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Which will give you a responsive masthead similar to this:
![priority plus masthead animation]({{ "/assets/images/mm-priority-plus-masthead.gif" | absolute_url }})
Optionally, you can add a `description` key per title in the `main` key. This `description` will show up like a tooltip, when the user hovers over the link on a desktop browser.

**ProTip:** Put the most important links first so they're always visible and not hidden behind the **menu toggle**.
{: .notice--info}

Expand Down

0 comments on commit a5187b1

Please sign in to comment.