Skip to content

Commit

Permalink
Make tile link an a tag. #379
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel.metzenthin committed Jan 20, 2018
1 parent 06f9595 commit a112d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/assets/stylesheets/tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@

.tile {
width: 100%;
max-width: 200px;
max-width: 12em;
padding: 16px;
display: inline;
cursor:pointer;
}


a {
color: inherit;
}

.tile-img {
display: block;
Expand Down
5 changes: 4 additions & 1 deletion app/views/application/_tile_template.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<div onclick="location.href='<%= destination_path%>';" class="tile">

<div class="tile">
<a href="<%= destination_path%>">
<div class="tile-content">
<div class="tile-img-wrapper">
<img class="tile-img" src="<%= image_url %>"/>
</div>
<span class="tile-title"> <%= title %></span>
<span class="tile-description"> <%= description %></span>
</div>
</a>
</div>


0 comments on commit a112d53

Please sign in to comment.