Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style changes for blog pages. #36

Merged
merged 3 commits into from
Dec 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions source/blog/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
pageable: true
---
<section class='blog'>
<section class='blog_post'>
<h2>Blog</h2>
<% if paginate && num_pages > 1 %>
<p>Page <%= page_number %> of <%= num_pages %></p>
Expand All @@ -12,10 +12,14 @@ pageable: true
<% end %>

<% page_articles.each_with_index do |article, i| %>
<h3><%= link_to article.title, article %> <span><%= article.date.strftime('%b %e, %Y') %></span></h3>
<h3>
<%= link_to article.title, article %>
<small><%= article.date.strftime('%b %e, %Y') %></small>
</h3>
<!-- use article.summary(250) if you have Nokogiri available to show just
the first 250 characters -->
<%= article.summary(500) %>
<hr>
<% end %>

<% if paginate %>
Expand Down
49 changes: 33 additions & 16 deletions source/stylesheets/pages/blog.css.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
@import "partials/standard_article";

pre {
padding: 1em;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
.blog_post {
pre {
font-size: 90%;
line-height: 1.25em;
overflow: auto;
padding: 0.8em;
white-space: pre;
overflow-x: auto;
overflow-y: hidden;
word-wrap: normal;
}

ul {
list-style-type: disc;
padding-bottom: 1em;
padding-top: 1em;
}
pre code {
font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace!important;
}

section article h2 {
padding: 0.5em
}
ul {
list-style-position: outside;
list-style-type: disc;
padding-left: 1em;
}

h3+ul {
margin-top: -1em;
}

section article h2 {
margin: 1em 0;
padding: 0;
}

h3 {
text-transform: inherit;
font-size: 120%
h3 {
text-transform: inherit;
font-size: 120%;
margin: 2.5em 0 1.5em 0;
}
}