UX: don't show crawler navigation in print view (#6551)

* UX: adds CSS classes to crawler navigation links

* UX: hide crawler navigation in print view
This commit is contained in:
Joe 2018-11-02 06:18:07 +08:00 committed by Sam
parent ab02b9a5d8
commit 4234058358
2 changed files with 9 additions and 3 deletions

View File

@ -28,14 +28,14 @@
<%= yield %>
</div>
<footer class="container">
<nav itemscope itemtype='http://schema.org/SiteNavigationElement'>
<nav class='crawler-nav' itemscope itemtype='http://schema.org/SiteNavigationElement'>
<a href='<%= path "/" %>'><%= t 'home_title' %></a>
<%= link_to t('js.filters.categories.title'), path("/categories") %>
<%= link_to t('guidelines_topic.title'), path("/guidelines") %>
<%= link_to t('tos_topic.title'), path("/tos") %>
<%= link_to t('privacy_topic.title'), path("/privacy") %>
</nav>
<p><%= t 'powered_by_html' %></p>
<p class='powered-by-link'><%= t 'powered_by_html' %></p>
</footer>
<%= theme_lookup("body_tag") %>
</body>

View File

@ -106,9 +106,15 @@
<% content_for :after_body do %>
<style media="print">
/* For readability */
a, a:visited {
a,
a:visited {
color: #0088cc !important;
}
/* hide crawler nav in print view */
.crawler-nav,
.powered-by-link {
display: none;
}
</style>
<%= preload_script('print-page') %>
<% end %>