Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back to top arrow style updated #367

Merged
merged 11 commits into from
Jun 12, 2017
1 change: 1 addition & 0 deletions app/assets/images/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions app/assets/stylesheets/helpers/_back-to-content.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.back-to-content {
@include core-19;
@include core-16;
display: inline-block;
margin-bottom: $gutter-half;

&:before {
content: "\2191";
.icon {
float: left;
margin-right: 5px;
}

@media print {
Expand Down
20 changes: 9 additions & 11 deletions app/views/shared/_back_to_content_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<%= link_to(
t('content_item.contents'),
'#contents',
class: 'back-to-content',
data: {
track_category: 'contentsClicked',
track_action: 'backToContentsLinkClicked',
track_label: 'contents',
module: 'track-click',
},
) %>
<a class="back-to-content"
data-track-category="contentsClicked"
data-track-action="backToContentsLinkClicked"
data-track-label="contents"
data-module="track-click"
href="#contents">
<svg class="icon" width="14" height="17" viewBox="0 0 14 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g transform="translate(-885.000000, -1380.000000) translate(886.000000, 1380.000000) translate(0.000000, 1.000000)" stroke-width="2" stroke="currentColor" fill="none" fill-rule="evenodd"><polyline points="12 6.61354167 6.10565074 0.719192411 0.312351484 6.51249167"/><path d="M6,1.52415365 L6,15" stroke-linecap="square"/></g></svg>
Contents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be translated. It used to be t('content_item.contents').

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could keep the link_to method by doing this:

<%= link_to(params) do %>
 Link text
<% end %>

</a>