From 8180888cfc03c46b8d74ee35aace49dea9af1130 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Mon, 18 Jul 2016 16:31:45 +0200 Subject: [PATCH] tile partial --- .travis.yml | 1 - content/index.erb | 12 ++---------- content/stylesheet.scss | 36 +++++++++++++++--------------------- layouts/tile.erb | 5 +++++ lib/builtin.rb | 1 + 5 files changed, 23 insertions(+), 32 deletions(-) create mode 100644 layouts/tile.erb diff --git a/.travis.yml b/.travis.yml index 9f2414e..e6f376c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: ruby cache: bundler rvm: - 2.3.1 - notifications: 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= diff --git a/content/index.erb b/content/index.erb index e4b836a..8fa44be 100644 --- a/content/index.erb +++ b/content/index.erb @@ -33,20 +33,12 @@
- -
- -
-
+ <%= render '/tile.*', article: sorted_articles[0] %>
<% sorted_articles[1..-1].each do |article| %>
- -
- -
-
+ <%= render '/tile.*', article: article %>
<% end %>
diff --git a/content/stylesheet.scss b/content/stylesheet.scss index 888d2d3..40a287b 100644 --- a/content/stylesheet.scss +++ b/content/stylesheet.scss @@ -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 { margin-left: -10px; margin-right: -10px; @@ -108,23 +101,22 @@ a, a:hover, a:visited, a:link, a:active { height: 200px; margin: $event-padding; + &:after { + content: '\A'; + position: absolute; + width: 100%; height:100%; + top:0; left:0; + background:rgba(0,0,0,0.6); + opacity: 0; + transition: all 0.5s; + -webkit-transition: all 0.5s; + } + &:hover:after { + opacity: 1; + } } } -.event:after { - content: '\A'; - position: absolute; - width: 100%; height:100%; - top:0; left:0; - background:rgba(0,0,0,0.6); - opacity: 0; - transition: all 0.5s; - -webkit-transition: all 0.5s; -} -.event:hover:after { - opacity: 1; -} - #event-banner { position: fixed; @@ -164,6 +156,8 @@ a, a:hover, a:visited, a:link, a:active { #cammie { object-fit: contain; + max-width: 100%; + height: auto; } .fullpage { min-width: 100%; diff --git a/layouts/tile.erb b/layouts/tile.erb new file mode 100644 index 0000000..1437e53 --- /dev/null +++ b/layouts/tile.erb @@ -0,0 +1,5 @@ + +
+ +
+
diff --git a/lib/builtin.rb b/lib/builtin.rb index acf71c3..9486cb2 100644 --- a/lib/builtin.rb +++ b/lib/builtin.rb @@ -1,3 +1,4 @@ include Nanoc::Helpers::Blogging include Nanoc::Helpers::Capturing include Nanoc::Helpers::LinkTo +include Nanoc::Helpers::Rendering