Minor fixes

This commit is contained in:
Asutosh Palai
2016-12-28 23:05:30 +05:30
parent 2e9b61cd77
commit f07bdfa33e
4 changed files with 51 additions and 36 deletions

View File

@ -1,9 +1,12 @@
--- ---
- name: academics - name: academics
title: Academics
subcategories: subcategories:
- name: cultural - name: cultural
title: Cultural
subcategories: subcategories:
- name: columns - name: columns
title: Columns
subcategories: subcategories:
- name: coverstory - name: coverstory
title: Cover Story title: Cover Story
@ -11,20 +14,25 @@
title: Big Story title: Big Story
- name: almostfamous - name: almostfamous
title: Almost Famous title: Almost Famous
- name: phekingnews
title: Pheking News
- name: guestcomentary - name: guestcomentary
title: Guest Comentary title: Guest Comentary
- name: editorial
title: Editorial
- name: tech - name: tech
title: Tech
subcategories: subcategories:
- name: career - name: career
title: Career
subcategories: subcategories:
- name: sac - name: sac
title: SAC title: SAC
subcategories: subcategories:
- name: editorial - name: phekingnews
title: Editorial title: Pheking News
subcategories:
- name: verbatim - name: verbatim
title: Verbatim
subcategories: subcategories:
- name: sports - name: sports
title: Sports
subcategories: subcategories:

View File

@ -3,6 +3,7 @@
{% assign post = page %} {% assign post = page %}
{% endif %} {% endif %}
<a href="{{ post.url }}">
<div id="header" class="container {% if page.is_post %}post-header{% endif %}"> <div id="header" class="container {% if page.is_post %}post-header{% endif %}">
<div class="row header-row outer-row"> <div class="row header-row outer-row">
{% if post.image != nil %} {% if post.image != nil %}
@ -29,6 +30,7 @@
</div> </div>
</div> </div>
</div> </div>
</a>
<div id="new-articles" class="container content"> <div id="new-articles" class="container content">
<div class="container-title">New Articles</div> <div class="container-title">New Articles</div>
@ -37,26 +39,28 @@
{% for post in site.related_posts limit: 5 %} {% for post in site.related_posts limit: 5 %}
{% if forloop.index == 3 %} {% if forloop.index == 3 %}
</div> </div>
<div class="row outer-row"> <div class="row outer-row">
{% endif %} {% endif %}
<div class="col-sm-{% if forloop.index < 3 %}6{% else %}4{% endif %} article-col"> <div class="col-sm-{% if forloop.index < 3 %}6{% else %}4{% endif %} article-col">
<div class="article"> <a href="{{ post.url }}">
<div class="center-fill-container img-container tinted"> <div class="article">
<img src="/images/posts/{{post.image}}" alt="" class="img-center-fill center-both {% if post.image == null %}hidden{% endif %}"> <div class="center-fill-container img-container tinted">
</div> <img src="/images/posts/{{post.image}}" alt="" class="img-center-fill center-both {% if post.image == null %}hidden{% endif %}">
<div class="details"> </div>
<div class="head"> <div class="details">
<h3 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h3> <div class="head">
<div class="tag"><a href="/category/{{ post.category }}/">{{ site.data.categories_name[post.category] }}</a></div> <h3 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h3>
<span class="date">{{ post.date | date: "%b %e, %Y" | upcase }}</span> <div class="tag"><a href="/category/{{ post.category }}/">{{ site.data.categories_name[post.category] }}</a></div>
<span class="date">{{ post.date | date: "%b %e, %Y" | upcase }}</span>
</div>
{% if forloop.index < 3 %}
<div class="excerpt">{% if post.excerpt != null %}{{ post.excerpt | markdownify }}{% endif %}</div>
{% endif %}
</div> <!-- details -->
</div> </div>
{% if forloop.index < 3 %} </a>
<div class="excerpt">{% if post.excerpt != null %}{{ post.excerpt | markdownify }}{% endif %}</div>
{% endif %}
</div> <!-- details -->
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -31,17 +31,17 @@
{% for cat in site.data.categories %} {% for cat in site.data.categories %}
{% if cat.subcategories != nil %} {% if cat.subcategories != nil %}
<li class = "dropdown"> <li class = "dropdown">
<a class="hover-underline" href="#" class="dropdown-toggle" data-toggle="dropdown">{{ cat.name | uppercase }} <span class="caret"></span></a> <a class="hover-underline" href="#" class="dropdown-toggle" data-toggle="dropdown">{{ cat.title }} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% for subcat in cat.subcategories %} {% for subcat in cat.subcategories %}
{% if site.categories[subcat.name] != nil %} {% if site.categories[subcat.name] != nil %}
<li><a class="hover-underline" href="/category/{{ subcat.name }}/">{{ subcat.title | uppercase }}</a></li> <li><a class="hover-underline" href="/category/{{ subcat.name }}/">{{ subcat.title }}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>
{% elsif site.categories[cat.name] != nil%} {% elsif site.categories[cat.name] != nil%}
<li><a class="hover-underline" href="/category/{{ cat.name }}/">{{ cat.name | uppercase }}</a></li> <li><a class="hover-underline" href="/category/{{ cat.name }}/">{{ cat.title }}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -14,6 +14,7 @@ $navbar-default-border: none;
$pre-nav-logo-height: 65px; $pre-nav-logo-height: 65px;
$home-header-bg-color: #22221f; $home-header-bg-color: #22221f;
$home-header-height: 340px; $home-header-height: 340px;
$home-header-shadow: 0 0 30px 0px rgba(0,0,0,0.4);
$new-article-img-height: 150px; $new-article-img-height: 150px;
$new-article-img-width: 225px; $new-article-img-width: 225px;
$new-article-title-color: black; $new-article-title-color: black;
@ -171,7 +172,7 @@ nav {
.nav { .nav {
width: initial; width: initial;
> li { &:after {
width: initial; width: initial;
} }
} }
@ -183,22 +184,28 @@ nav {
} }
.nav > li { .nav > li {
width: 1/9 * 100%;
text-align: center; text-align: center;
display: inline-block;
float: none;
margin-bottom: -100%; // Hack to fix the spacing between header and navbar
&:first-of-type a { &:first-of-type a {
padding-left: 0; padding-left: 0;
text-align: left;
} }
&:last-of-type a { &:last-of-type a {
text-align: right; padding-right: 0;
} }
} }
.navbar-nav { .navbar-nav {
font-size: 16px; font-size: 16px;
text-transform: capitalize; text-align: justify;
font-weight: bold; font-weight: bold;
&:after {
width: 100%; /* Ensures justification for single lines */
display: inline-block;
}
} }
// ================ /NAV ================// // ================ /NAV ================//
@ -206,7 +213,6 @@ nav {
// ============= HOME-HEADER ============= // // ============= HOME-HEADER ============= //
#header { #header {
margin-top: 25px;
font-size: 12px; font-size: 12px;
.header-row { .header-row {
@ -216,7 +222,7 @@ nav {
border-radius: 8px 8px 0 0; border-radius: 8px 8px 0 0;
overflow: hidden; overflow: hidden;
color: white; color: white;
box-shadow: 0 0 35px 6px rgba(0,0,0,0.35); box-shadow: $home-header-shadow;
} }
@ -238,6 +244,7 @@ nav {
.cover-link:hover { .cover-link:hover {
text-decoration: none; text-decoration: none;
color: rgb(174, 170, 170);
} }
.cover-title-label { .cover-title-label {
@ -251,10 +258,6 @@ nav {
margin-top: 0; margin-top: 0;
margin-bottom: 20px; margin-bottom: 20px;
} }
.title:hover {
text-shadow: 1px 1px 10px #777777;
}
} }
#header.category-header { #header.category-header {
@ -302,7 +305,7 @@ nav {
background: #fafafa; background: #fafafa;
font-size: 14px; font-size: 14px;
padding: 0.35em 2.35em; padding: 0.35em 2.35em;
box-shadow: 0 0 35px 6px rgba(0,0,0,0.35); box-shadow: $home-header-shadow;
border-radius: 0.4em; border-radius: 0.4em;
} }
@ -322,7 +325,7 @@ nav {
position: relative; position: relative;
height: 340px; height: 340px;
margin-top: 10px; margin-top: 10px;
box-shadow: 0 0 35px 6px rgba(0,0,0,0.35); box-shadow: $home-header-shadow;
} }
.details { .details {