Skip to content

Commit

Permalink
added stories page and minor mobile styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
apnerve committed Aug 8, 2015
1 parent f175130 commit 0d6af64
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 32 deletions.
6 changes: 2 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ email: [email protected]
description: > # this means to ignore newlines until "baseurl:"
Travel Blog 123
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://harshac.github.io/darbadar" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: harshac
permalink: /:year/:month/:title
url: "http://darbadar.com" # the base hostname & protocol for your site
permalink: /stories/:year/:month/:title
timezone: Asia/Kolkata

# Build settings
Expand Down
4 changes: 1 addition & 3 deletions _config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ description: > # this means to ignore newlines until "baseurl:"
Travel Blog 123
baseurl: "" # the subpath of your site, e.g. /blog/
url: "" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: harshac
permalink: /:year/:month/:title
permalink: /stories/:title
timezone: Asia/Kolkata

# Build settings
Expand Down
13 changes: 13 additions & 0 deletions _includes/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<h1 class="page-heading">Stories</h1>

<ul class="post-list cf">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>

<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>
2 changes: 1 addition & 1 deletion _posts/2009-01-20-obama-inaugural-address.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: post
title: "Obama Inaugural Address"
categories: speeches
---
Expand Down
2 changes: 1 addition & 1 deletion _posts/2013-12-18-bacon-ipsum-short.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: post
title: "Bacon Ipsum (Short)"
categories: loremipsum
---
Expand Down
2 changes: 1 addition & 1 deletion _posts/2013-12-18-bacon-ipsum-tiny.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: post
title: "Bacon Ipsum (Tiny)"
categories: loremipsum
---
Expand Down
2 changes: 1 addition & 1 deletion _posts/2013-12-24-bacon-ipsum-long.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: post
title: "Bacon Ipsum (Long)"
categories: loremipsum
---
Expand Down
2 changes: 1 addition & 1 deletion _posts/2014-01-12-really-long-title-post.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: post
title: "Some really obnoxiously long post title"
---

Expand Down
3 changes: 0 additions & 3 deletions _posts/2015-07-14-welcome-to-jekyll.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
layout: post
title: "Welcome to Jekyll!"
date: 2015-07-14 00:43:06
categories: jekyll update
tags: lorem ipsum
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

Expand Down
6 changes: 5 additions & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ pre {
.wrapper {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
width: 60em;
margin-right: auto;
margin-left: auto;
padding-right: $spacing-unit;
Expand All @@ -169,6 +168,11 @@ pre {
padding-right: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}

@include media-query($on-palm) {
max-width: 100%;
padding: 0;
}
}


Expand Down
16 changes: 15 additions & 1 deletion _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
line-height: 56px;
margin-bottom: 0;
float: left;
@include media-query($on-palm) {
margin-left: 9px;
}

&,
&:visited {
Expand Down Expand Up @@ -41,7 +44,7 @@
@include media-query($on-palm) {
position: absolute;
top: 9px;
right: 30px;
right: 9px;
background-color: $background-color;
border: 1px solid $grey-color-light;
border-radius: 5px;
Expand Down Expand Up @@ -160,6 +163,9 @@
*/
.page-content {
padding: $spacing-unit 0;
@include media-query($on-palm) {
padding: $spacing-unit $spacing-unit /2;
}
}

.page-heading {
Expand Down Expand Up @@ -201,6 +207,13 @@
font-weight: 800;
color: $text-color;
}

@include media-query($on-palm) {
float: none;
width: auto;
height: auto;
margin-right: 0;
}
}
}

Expand All @@ -221,6 +234,7 @@
*/
.post {
width: 32em;
max-width: 100%;
margin: auto;
}
.post-header {
Expand Down
17 changes: 2 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,7 @@

<div class="home">

<h1 class="page-heading">Stories</h1>

<ul class="post-list cf">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>

<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
<p class="intro">{{ site.description }}</p>
{% include list.html %}

</div>
9 changes: 9 additions & 0 deletions stories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: default
title: Stories
permalink: /stories/
---

{% include list.html %}

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>

0 comments on commit 0d6af64

Please sign in to comment.