Skip to content
Browse files

add post image support to index page

  • Loading branch information...
1 parent e9a333f commit e3333423b71bbd23d46f06e45cd92fee591f1447 @tmack8001 committed
Showing with 32 additions and 1 deletion.
  1. +26 −0 assets/css/screen.css
  2. +6 −1 index.hbs
View
26 assets/css/screen.css
@@ -439,6 +439,32 @@ margin on the iframe, cause it breaks stuff. */
box-shadow: #fff 0 0 0 5px;
}
+.post-image {
+ margin-bottom: 5px;
+}
+
+.post-image a {
+ display: block;
+ height: 100%;
+ width: 100%;
+ max-height: 400px;
+}
+
+.post-image img {
+ width: 100%;
+ -webkit-backface-visibility: hidden;
+ transition: 0.3s;
+ -webkit-transition: 0.3s;
+ -mox-transition: 0.3s;
+ -o-transition: 0.3s;
+}
+
+.post-image img:hover,
+.post-image img:active,
+.post-image img:focus {
+ opaxity: 0.8;
+}
+
.post-title {
margin:0;
}
View
7 index.hbs
@@ -22,6 +22,11 @@
{{#foreach posts}}
<article class="{{post_class}}">
+ <div class="post-image">
+ <a href="{{url}}">
+ {{content words="0"}}
+ </a>
+ </div>
<header class="post-header">
<span class="post-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time> {{tags prefix="on "}}</span>
<h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2>
@@ -37,4 +42,4 @@
{{!! After all the posts, we have the previous/next pagination links }}
{{pagination}}
-</main>
+</main>

0 comments on commit e333342

Please sign in to comment.
Something went wrong with that request. Please try again.