Merge pull request #1283 from cobyism/blog-posts-tweaks

News section tweaks
This commit is contained in:
Parker Moore 2013-07-08 11:26:32 -07:00
commit e0e72ca38b
11 changed files with 169 additions and 131 deletions

View File

@ -1,18 +1,23 @@
<div class="unit one-fifth hide-on-mobiles">
<aside>
<h4>General</h4>
<ul>
<li class="{% if page.title == 'News' %}current{% endif %}">
<a href="/news/">News Listing</a>
<a href="/news/">All News</a>
</li>
<li class="{% if page.title == 'Releases' %}current{% endif %}">
<a href="/news/releases/">Jekyll Releases</a>
</li>
</ul>
<h4>All Posts</h4>
<h4>Recent Releases</h4>
<ul>
{% for post in site.posts %}
{% for post in site.posts limit:5 %}
<li class="{% if page.title == post.title %}current{% endif %}">
<a href="{{ post.url }}">{{ post.title }}</a>
<a href="{{ post.url }}">Version {{ post.version }}</a>
</li>
{% endfor %}
<li>
<a href="/docs/history/">History »</a>
</li>
</ul>
</aside>
</div>

View File

@ -1,15 +1,24 @@
<div class="post">
<article>
<h2 class="center-on-mobiles">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<span class="post-category">
{% for category in post.categories %}
<span class="label">{{ category }}</span>
{% endfor %}
</span>
<div class="post-meta">
<span class="post-date">
{{ post.date | date_to_string }}
</span>
<a href="https://github.com/{{ post.author }}" class="post-author">
<img src="https://github.com/{{ post.author }}.png" class="avatar" />
{{ post.author }}
</a>
</div>
<p class="post-content">
{{ post.content }}
</p>
<p class="post-details">
Posted on {{ post.date | date_to_string }}
by <a href="https://github.com/{{ post.author }}">@{{ post.author }}</a>,
filed in {{ post.categories | array_to_sentence_string }}
</p>
</div>
</article>

View File

@ -8,10 +8,7 @@ layout: default
{% include news_contents_mobile.html %}
<div class="unit four-fifths">
<h1 class="news-header center-on-mobiles">{{ page.title }}</h1>
<article class="listing">
{{ content }}
</article>
{{ content }}
</div>
{% include news_contents.html %}

View File

@ -2,18 +2,26 @@
layout: news
---
<div class="grid">
<div class="unit whole entry">
<div class="post single">
<p class="post-content">
{{ content }}
</p>
<p class="post-details">
Posted on {{ page.date | date_to_string }}
by <a href="https://github.com/{{ page.author }}">@{{ page.author }}</a>,
filed in {{ page.categories | array_to_sentence_string }}
</p>
</div>
<article>
<h2 class="center-on-mobiles">
{{ page.title }}
<a href="{{ page.url }}" class="permalink" title="Permalink"></a>
</h2>
<span class="post-category">
{% for category in page.categories %}
<span class="label">{{ category }}</span>
{% endfor %}
</span>
<div class="post-meta">
<span class="post-date">
{{ page.date | date_to_string }}
</span>
<a href="https://github.com/{{ page.author }}" class="post-author">
<img src="https://github.com/{{ page.author }}.png" class="avatar" />
{{ page.author }}
</a>
</div>
<div class="clear"></div>
</div>
<p class="post-content">
{{ content }}
</p>
</article>

View File

@ -3,7 +3,8 @@ layout: news_item
title: "Jekyll 1.0.0 Released"
date: "2013-05-06 02:12:52 +0200"
author: parkr
categories: [release, jekyll]
version: 1.0.0
categories: [release]
---
Hey! After many months of hard work by Jekyll's contributors, we're excited
@ -16,7 +17,7 @@ examples and for compiling this list):
- Automatically generated post excerpts ([example](https://gist.github.com/benbalter/5555369))
- Save and preview drafts before publishing ([example](https://gist.github.com/benbalter/5555992))
_(Take a look at the [Upgrading][] page in the docs for more detailed information.)_
Take a look at the [Upgrading][] page in the docs for more detailed information.
[history]: /docs/history/#100__20130506
[Upgrading]: /docs/upgrading/

View File

@ -3,7 +3,8 @@ layout: news_item
title: "Jekyll 1.0.1 Released"
date: "2013-05-08 23:46:11 +0200"
author: parkr
categories: [release, jekyll]
version: 1.0.1
categories: [release]
---
Hot on the trails of v1.0, v1.0.1 is out! Here are the highlights:
@ -16,7 +17,7 @@ Hot on the trails of v1.0, v1.0.1 is out! Here are the highlights:
* Don't print deprecation warning when no arguments are specified. ([#1041][])
* Add missing `</div>` to site template used by `new` subcommand, fixed typos in code ([#1032][])
_(Take a look at the [History][] page in the docs for more detailed information.)_
See the [History][] page for more information on this release.
{% assign issue_numbers = "1037|1040|1048|1053|1045|1041|1032" | split: "|" %}
{% for issue in issue_numbers %}

View File

@ -3,7 +3,8 @@ layout: news_item
title: "Jekyll 1.0.2 Released"
date: "2013-05-12 14:45:00 +0200"
author: parkr
categories: [release, jekyll]
version: 1.0.2
categories: [release]
---
v1.0.2 has some key bugfixes that optionally restore some behaviour from pre-1.0
@ -17,7 +18,7 @@ releases, and fix some other annoying bugs:
* Add a `data-lang="<lang>"` attribute to Redcarpet code blocks ([#1066][])
* Catching that Redcarpet gem isn't installed ([#1059][])
_(Take a look at the [History][] page in the docs for more detailed information.)_
See the [History][] page for more information on this release.
{% assign issue_numbers = "1059|1061|1066|1067|1078|1081|1084" | split: "|" %}
{% for issue in issue_numbers %}

View File

@ -3,7 +3,8 @@ layout: news_item
title: "Jekyll 1.0.3 Released"
date: "2013-06-07 21:02:13 +0200"
author: parkr
categories: [release, jekyll]
version: 1.0.3
categories: [release]
---
v1.0.3 contains some key enhancements and bug fixes:
@ -14,7 +15,7 @@ v1.0.3 contains some key enhancements and bug fixes:
- Fix compatibility with `exclude` and `include` with pre-1.0 Jekyll ([#1114][])
- Fix pagination issue regarding `File.basename` and `page:num` ([#1063][])
_(Take a look at the [History][] page in the docs for more detailed information.)_
See the [History][] page for more information on this release.
{% assign issue_numbers = "1190|1121|1189|1115|1114|1063" | split: "|" %}
{% for issue in issue_numbers %}

View File

@ -359,40 +359,38 @@ body > footer a:hover img {
}
}
/* Documentation */
/* Article - Used for both docs and news */
.docs .content {
padding: 0;
}
.docs article {
article {
background: #444;
border-radius: 10px;
padding: 20px;
margin: 0 10px;
box-shadow: 0 3px 10px rgba(0,0,0,.1);
min-height: 800px;
font-size: 16px;
}
@media (max-width: 568px){
.docs article {
article {
margin: 0;
}
}
@media (min-width: 768px){
.docs article {
article {
padding: 40px 40px 30px;
font-size: 21px;
}
}
.docs aside {
/* Right-side nav - used by both docs and news */
aside {
padding-top: 30px;
}
.docs aside h4 {
aside h4 {
text-transform: uppercase;
font-size: 14px;
font-weight: 700;
@ -402,20 +400,24 @@ body > footer a:hover img {
border-bottom: 1px solid #c00;
}
.docs aside ul {
aside ul {
padding-left: 0;
}
.docs aside li {
aside ul:first-child {
margin-top: 0;
}
aside li {
list-style-type: none;
}
.docs aside li a {
aside li a {
font-size: 16px;
position: relative
}
.docs aside li.current a:before {
aside li.current a:before {
content: "";
border-color: transparent transparent transparent #444;
border-style: solid;
@ -427,6 +429,16 @@ body > footer a:hover img {
left: -30px;
}
/* Documentation */
.docs article {
min-height: 800px;
}
.docs .content {
padding: 0;
}
.section-nav {
text-align: center;
padding-top: 40px;
@ -501,94 +513,92 @@ body > footer a:hover img {
/* News */
.news .news-header {
margin: 10px 50px;
article h2:first-child {
margin-top: 0;
}
.news .entry {
background: #444;
border-radius: 10px;
padding: 20px;
margin: 0 10px;
box-shadow: 0 3px 10px rgba(0,0,0,.1);
font-size: 16px;
.post-category,
.post-meta {
display: inline-block;
vertical-align: middle;
font-size: .8em;
}
.post-category {
display: inline-block;
margin-left: -30px;
padding: 6px 10px 8px;
padding-left: 50px;
border-radius: 0 5px 5px 0;
position: relative;
box-shadow: 0 1px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(0,0,0,.3);
background: #9e2812;
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllMjgxMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZjBkMGQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9e2812), color-stop(100%,#6f0d0d));
background: -webkit-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
background: -o-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
background: -ms-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
background: linear-gradient(to bottom, #9e2812 0%,#6f0d0d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
}
.label {
float: left;
text-transform: uppercase;
font-weight: bold;
text-shadow: 0 -1px 0 rgba(0,0,0,.5);
}
@media (max-width: 568px){
.news .entry {
margin: 0 0 20px 0;
.post-category {
margin-right: -30px;
}
}
@media (min-width: 768px){
.news .entry {
font-size: 21px;
margin-bottom: 20px;
.post-category {
margin-left: -50px;
}
}
.news .post {
padding: 40px;
}
.news .post.single {
padding-top: 10px;
}
.news .news-listing h2 {
margin: 0;
padding-top: 10px;
border-top: rgba(220, 220, 220, 0.5) 1px solid;
}
.news .listing h2 {
margin-top: 0;
}
.news .post-details {
padding: 0;
font-size: 0.8em;
color: gray;
}
.news aside {
padding-top: 95px;
padding-left: 20px;
}
.news aside h4 {
text-transform: uppercase;
font-size: 14px;
font-weight: 700;
padding: 0 0 10px 29px;
margin-left: -29px;
display: inline-block;
border-bottom: 1px solid #c00;
}
.news aside ul {
padding-left: 0;
}
.news aside li {
list-style-type: none;
}
.news aside li a {
font-size: 16px;
position: relative
}
.news aside li.current a:before {
.post-category:before {
content: "";
border-color: transparent transparent transparent #444;
position: absolute;
top: -10px;
left: 0px;
border-color: transparent #6f0d0d #6f0d0d transparent;
border-style: solid;
border-width: 10px;
border-width: 5px;
width: 0;
height: 0;
position: absolute;
top: 0;
left: -30px;
}
.avatar {
width: 24px;
height: 24px;
border-radius: 3px;
display: inline-block;
vertical-align: middle;
}
.post-meta {
padding: 5px 0;
color: #aaa;
font-weight: 600;
text-shadow: 0 -1px 0 #000;
}
.post-date,
.post-author {
margin-left: 10px;
}
.news article + article {
margin-top: -10px;
border-radius: 0 0 10px 10px;
border-top: 1px solid #555;
box-shadow: 0 -1px 0 #2f2f2f;
}
/* Code Highlighting */

View File

@ -5,11 +5,6 @@ permalink: /news/
author: all
---
<div class="grid">
{% for post in site.posts %}
<div class="unit whole entry">
{% for post in site.posts %}
{% include news_item.html %}
</div>
{% endfor %}
<div class="clear"></div>
</div>
{% endfor %}

View File

@ -0,0 +1,10 @@
---
layout: news
title: Releases
permalink: /news/releases/
author: all
---
{% for post in site.categories.release %}
{% include news_item.html %}
{% endfor %}