tile partial

This commit is contained in:
Lorin Werthen 2016-07-18 16:31:45 +02:00
parent 430579f988
commit 8180888cfc
5 changed files with 23 additions and 32 deletions

View file

@ -2,7 +2,6 @@ language: ruby
cache: bundler cache: bundler
rvm: rvm:
- 2.3.1 - 2.3.1
notifications: notifications:
slack: slack:
secure: tej68wbYns4DYg488iz+4ncU3/CHJvG/5c1qntGcEjti6vZp24atuH32BzNMY+gqa5ftZtcRfqIiJ0I0tkbiFWEDzjSk89bgjG4sgwXq1gMqi/Fj4bqEpjU5m7QLa786q4UfYyTF+srca1fHPLVS5REdGjRr2wxX+bcFnTRxreGCIrlNdWhoZPPJyS37R4RR9k+l5ZWZnqWgUN6bD448O8EzMRVRWoUSxQcJ6+u4QLpinEvem4iXe+WcHOyFfsNmavxGGMMpkOSed/tzA1l+gNpl224qOJl3yAk2qrGi4N6SOnSkeJFfUO5RzX56KDC/tcCL1oJpamhDmzDvRrbDNnCjSriv+g+PkXEjiwBF/tkZwIe7nMKyc9QF698Zvdgb6Ffbq21obsRnkkddkxijthdbUKMAIREPQuU7pXRL4ykPkBeB5GkNjPlErOooxvUHvQEVElJ8NMD4ychQqW6relaYJ0W0uy0QMvrtS+cHkpprZAOZzWLa3AdEOvD50kiS2hDhJway5JHJg/LMl3I6XVVMx6fNGdNWBcezeCqkDZM+nuMJqgAtQ+Tz8bwrHLCJgS5u0lQq/MbrDkYdpmmzvA5LXxn2SpjfOAlgiFKnSIwKSuuuwzW/zCEGdPo1pfBba2VfYAN4y1l863j5ph+eMtlHf7JG8mzIWTo3k+Jx8lQ= secure: tej68wbYns4DYg488iz+4ncU3/CHJvG/5c1qntGcEjti6vZp24atuH32BzNMY+gqa5ftZtcRfqIiJ0I0tkbiFWEDzjSk89bgjG4sgwXq1gMqi/Fj4bqEpjU5m7QLa786q4UfYyTF+srca1fHPLVS5REdGjRr2wxX+bcFnTRxreGCIrlNdWhoZPPJyS37R4RR9k+l5ZWZnqWgUN6bD448O8EzMRVRWoUSxQcJ6+u4QLpinEvem4iXe+WcHOyFfsNmavxGGMMpkOSed/tzA1l+gNpl224qOJl3yAk2qrGi4N6SOnSkeJFfUO5RzX56KDC/tcCL1oJpamhDmzDvRrbDNnCjSriv+g+PkXEjiwBF/tkZwIe7nMKyc9QF698Zvdgb6Ffbq21obsRnkkddkxijthdbUKMAIREPQuU7pXRL4ykPkBeB5GkNjPlErOooxvUHvQEVElJ8NMD4ychQqW6relaYJ0W0uy0QMvrtS+cHkpprZAOZzWLa3AdEOvD50kiS2hDhJway5JHJg/LMl3I6XVVMx6fNGdNWBcezeCqkDZM+nuMJqgAtQ+Tz8bwrHLCJgS5u0lQq/MbrDkYdpmmzvA5LXxn2SpjfOAlgiFKnSIwKSuuuwzW/zCEGdPo1pfBba2VfYAN4y1l863j5ph+eMtlHf7JG8mzIWTo3k+Jx8lQ=

View file

@ -33,20 +33,12 @@
</nav> </nav>
</header> </header>
<main> <main>
<a href="<%= relative_path_to(sorted_articles.first) %>">
<div class="main-event">
<img class="pure-img" src='<%= sorted_articles.first[:banner] %>' alt="" />
</div>
</a>
<div id="all-events"> <div id="all-events">
<%= render '/tile.*', article: sorted_articles[0] %>
<div class="pure-g"> <div class="pure-g">
<% sorted_articles[1..-1].each do |article| %> <% sorted_articles[1..-1].each do |article| %>
<div class="pure-u-1-3"> <div class="pure-u-1-3">
<a href="<%= relative_path_to(article) %>"> <%= render '/tile.*', article: article %>
<div class="event">
<img class="pure-img" src='<%= article[:banner] %>' alt="" />
</div>
</a>
</div> </div>
<% end %> <% end %>
</div> </div>

View file

@ -88,13 +88,6 @@ a, a:hover, a:visited, a:link, a:active {
} }
} }
.main-event {
height: 250px;
margin-bottom: $event-padding;
overflow: hidden;
border: 2px solid $event-border-color;
}
#all-events { #all-events {
margin-left: -10px; margin-left: -10px;
margin-right: -10px; margin-right: -10px;
@ -108,10 +101,7 @@ a, a:hover, a:visited, a:link, a:active {
height: 200px; height: 200px;
margin: $event-padding; margin: $event-padding;
} &:after {
}
.event:after {
content: '\A'; content: '\A';
position: absolute; position: absolute;
width: 100%; height:100%; width: 100%; height:100%;
@ -121,9 +111,11 @@ a, a:hover, a:visited, a:link, a:active {
transition: all 0.5s; transition: all 0.5s;
-webkit-transition: all 0.5s; -webkit-transition: all 0.5s;
} }
.event:hover:after { &:hover:after {
opacity: 1; opacity: 1;
} }
}
}
#event-banner { #event-banner {
@ -164,6 +156,8 @@ a, a:hover, a:visited, a:link, a:active {
#cammie { #cammie {
object-fit: contain; object-fit: contain;
max-width: 100%;
height: auto;
} }
.fullpage { .fullpage {
min-width: 100%; min-width: 100%;

5
layouts/tile.erb Normal file
View file

@ -0,0 +1,5 @@
<a href="<%= relative_path_to(@article) %>">
<div class="event">
<img class="pure-img" src='<%= @article[:banner] %>' alt="" />
</div>
</a>

View file

@ -1,3 +1,4 @@
include Nanoc::Helpers::Blogging include Nanoc::Helpers::Blogging
include Nanoc::Helpers::Capturing include Nanoc::Helpers::Capturing
include Nanoc::Helpers::LinkTo include Nanoc::Helpers::LinkTo
include Nanoc::Helpers::Rendering