Header for posts

This commit is contained in:
Asutosh Palai
2016-06-19 14:41:00 +05:30
parent 05cee14167
commit d5f0d21328
8 changed files with 48 additions and 371 deletions

View File

@ -9,6 +9,13 @@ sass:
style: :compressed
sass_dir: _sass
defaults:
-
scope:
path: "" # empty string for all files
type: posts # limit to posts
values:
is_post: true # automatically set is_post=true for all posts
name: WONA
url: http://wona.co.in

View File

@ -1,28 +1,30 @@
<div class="navbar-wrapper">
<div class="container-fuild">
{% assign post = site.posts.first %}
{% if page.is_post == true %}
{% assign post = page %}
{% endif %}
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-left" href="/"><img class="navbar-logo" src="/images/logo.png" alt="WONA Logo"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="/">Home</a></li>
<li><a href="/columns/">Columns</a></li>
<li><a href="/news/">News</a></li>
</ul>
</div>
</div>
</nav>
<div id="home-header" class="container-fluid">
<div class="cover-image center-vertical"><img class="center-both img-center-fill" src="/images/posts/{{ post.image }}" alt=""></div>
<div class="cover center-both text-center">
<h1 class="title">{{ post.title }}</h1>
</div>
</div>
<div class="left">
{% if page.is_post and post.next %}
<a class="center-both scroll-buttons" href="{{ post.next.url }}">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
{% endif %}
</div>
<div class="right">
{% if page.is_post and post.next %}
<a class="center-both scroll-buttons" href="{{ post.previous.url }}">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
{% endif %}
</div>
</div>

View File

@ -1,10 +0,0 @@
{% assign cover_post = site.posts.first %}
<div id="home-header" class="container-fluid">
<div class="cover-image center-vertical"><img class="center-both img-center-fill" src="/images/posts/{{ cover_post.image }}" alt=""></div>
<div class="cover center-both text-center">
<h1 class="title">{{ cover_post.title }}</h1>
<!--<p>{{ cover_post.excerpt | markdownify }}</p>-->
</div>
<div class="left"></div>
<div class="right"></div>
</div>

View File

@ -6,6 +6,8 @@
<body>
{% include navbar.html %}
{% include header.html %}
{{ content }}

View File

@ -1,14 +1,6 @@
---
layout: layout
---
{% if page.isImageCover != false %}
{% if page.image %}
<div class="cover">
<img src="/images/posts/{{ page.image }}" alt="">
</div>
{% endif %}
{% endif %}
<section class="post">
<h1>

View File

@ -1,319 +0,0 @@
@font-face {
font-family: 'AvenirNext';
font-style: normal;
font-weight: 300;
src: local("Avenir Next"), local("Avenir Next"), url(/fonts/avenirnext-thin.woff) format("woff"); }
@font-face {
font-family: 'AvenirNext';
font-style: normal;
font-weight: 500;
src: local("Avenir Next"), local("Avenir Next"), url(/fonts/avenirnext-regular.woff) format("woff"); }
@font-face {
font-family: 'AvenirNext';
font-style: normal;
font-weight: 700;
src: local("Avenir Next Bold"), local("Avenir Next Bold"), url(/fonts/avenirnext-bold.woff) format("woff"); }
body {
font-size: 13px;
color: #081522;
border-top: 10px solid #363845;
background: #dddddd url("/images/bg.png");
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; }
* {
font-family: Open Sans, sans-serif; }
a {
color: inherit;
text-decoration: none;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
a:hover {
color: #e74c3c;
border-bottom: 1px solid #e74c3c;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
blockquote {
border-left: 5px solid #e74c3c;
padding-left: 10px;
font-style: italic; }
.pagination {
text-align: center;
font-style: italic; }
.pagination img {
position: relative;
top: 12px;
opacity: 0.7;
cursor: pointer;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
.pagination img:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
.pagination img.disabled {
opacity: 0.5; }
.pagination img.disabled:hover {
opacity: 0.5; }
.redhead {
background: #e74c3c;
border-bottom: 1px solid #c0bfc4;
min-height: 200px; }
header {
font-family: AvenirNext, Sans-serif;
color: white;
padding: 10px 10px;
margin: auto;
text-align: center; }
header.pure-u-2-3 {
display: block; }
header h1, header h3 {
margin: 0px; }
header h3 {
font-weight: 500; }
header img {
width: 30px; }
header nav {
padding: 10px 0px 50px 0px;
margin-top: 30px; }
header nav a {
margin: 0px 10px;
padding: 2px 0px; }
header nav a:hover {
color: #333;
border-bottom: 1px solid #333; }
.container {
position: relative;
top: -30px;
margin: auto;
display: block; }
.cover {
background: white;
margin: auto;
display: block;
position: relative;
margin-bottom: 30px;
z-index: 100;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1); }
.cover img {
width: 100%;
display: block;
opacity: 0.8;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
.cover img:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
.cover img.hidden {
visibility: hidden;
height: 10em;
}
.cover .tag {
width: 100px;
position: absolute;
top: 0px;
right: 0px;
z-index: 1; }
.cover a:hover {
border: none;
color: #000; }
.cover .details {
position: absolute;
bottom: 0;
width: 100%;
background: rgba(255, 255, 255, 0.8);
padding: 20px 20px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; }
.cover .details h2 {
font-weight: 500;
margin: 0 0 5px 0; }
.cover .details p {
margin: 0; }
.content .pure-u-1-3 {
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; }
.article-container {
/*width: 280px;*/
width: 30%;
margin: 0 1.5%;
margin-bottom: 50px;
float: left;
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; }
.article {
border: 1px solid #ccc;
background: white;
padding-bottom: 10px;
color: #6D6D6D;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; }
.article:hover {
color: #333; }
.article:hover img.article-cover {
opacity: 1; }
.article a:hover {
border: none;
color: #000; }
.article .details {
padding: 5px 10px; }
.article .details h3 {
margin: 0 0 10px 0;
color: #363845; }
.article .details blockquote, .article .details p {
margin: 0;
border: none; }
.article img.article-cover {
border-bottom: 1px solid #ccc;
width: 100%;
opacity: 0.8;
overflow-y: hidden;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in; }
.article .tag {
width: 100px;
position: absolute;
top: 0px;
z-index: 1; }
.article.faceoff {
border-top: 2px solid #E67E22; }
.article.bigstory {
border-top: 2px solid #4390DF; }
.article.coverstory {
border-top: 2px solid #FF5050; }
.article.techila {
border-top: 2px solid #9B59B6; }
.article.phekingnews {
border-top: 2px solid #F1C40F; }
.article.editorial {
border-top: 2px solid #2ECC71; }
.article.news {
border-top: 2px solid #1ABC9C; }
.article.almostfamous {
border-top: 2px solid #34495E; }
.article-cover-container {
height: 200px;
overflow: hidden;
}
.post {
background: white;
padding: 10px 50px;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
font-size: 1.1em;
line-height: 1.5em;
color: #333332; }
.post p img {
display: block;
margin: auto;
max-width: 100%;
padding: 5px 0px; }
footer {
background: white; }
footer div {
display: block;
margin: auto; }
footer nav {
margin: 1em 0;
float: right; }
footer nav a {
margin: 0px 10px;
padding: 2px 0px; }
.team {
background: white;
padding: 10px 50px;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
font-size: 1.1em;
line-height: 1.5em;
color: #333332;
text-align: center;
font-size: 0.9em; }
.team h1, .team h3, .team h4, .team h5, .team h6 {
margin: 0px;
font-weight: 500; }
.team .person {
margin-bottom: 20px; }
.about {
background: white;
padding: 10px 50px;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
font-size: 1.1em;
line-height: 1.5em;
color: #333332;
text-align: center;
font-size: 0.9em; }
.img {
padding: 10px 0px 10px 10px; }
.img.right img {
float: right;
width: 300px; }
.img.left img {
float: left;
width: 300px; }
.img.center {
text-align: center; }

View File

@ -146,7 +146,6 @@ body {
margin-bottom: -($new-article-img-height / 4);
background: $home-header-bg-color;
padding: 0;
z-index: -10;
overflow: hidden;
.cover {
@ -169,8 +168,14 @@ body {
width: 100%;
}
}
.left {
.scroll-buttons {
color: white;
font-size: 32px;
}
.left {
position: absolute;
top: 0;
left: 0;
@ -178,7 +183,7 @@ body {
width: 10%;
@include gradient-horizontal($start-color: rgba(0,0,0,.4), $end-color: rgba(0,0,0,.0001));
}
.right {
.right {
position: absolute;
top: 0;
left: auto;
@ -193,6 +198,8 @@ body {
// ============= NEW-ARTICLES ============ //
#new-articles {
z-index: 10;
.img-container {
width: $new-article-img-width;
height: $new-article-img-height;

View File

@ -2,9 +2,6 @@
layout: layout
title: "Home"
---
{% include home_header.html %}
<div class="container content">
<section id="new-articles" class="row">
@ -94,8 +91,7 @@ title: "Home"
<a class="right carousel-control"
href="#myCarousel" role="button"
data-slide="next">
<span class="glyphicon
glyphicon-chevron-right"
<span class="glyphicon glyphicon-chevron-right"
aria-hidden="true"></span>
<span
class="sr-only">Next</span>