Skip to content

Commit

Permalink
multiple tweaks to new layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Parsons committed Jan 17, 2013
1 parent dcfa36b commit 310a08c
Show file tree
Hide file tree
Showing 120 changed files with 6,846 additions and 2,116 deletions.
90 changes: 70 additions & 20 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ layout: default
title: Tags
type: A tag cloud
---
<div id="home">
<div id="current" class="post">
<div id="post" class="post">
<h1><a>tag cloud</a></h1>
<div class='hero-unit'>
<p>
<a href='{{ site.url }}'>a blog by Chris Parsons</a>
</p>
<h1>
Tag cloud
</h1>
</div>
<hr />
<div class='row' id='post'>
<div class='span8'>
<p>Click on a tag to see the relevant posts.</p>
<ul class='tags'>
HTML

site.categories.sort.each do |category, posts|
Expand All @@ -37,11 +44,27 @@ type: A tag cloud
HTML

s = posts.count
font_size = 12 + (s*1.5);
html << "<a class='tag' href=\"/tag/#{category}/\" title=\"Entries tagged #{category}\" style=\"font-size: #{font_size}px; line-height:#{font_size}px\">#{category}</a> "
font_size = 12;
html << "<li><a class='tag' href=\"/tag/#{category}/\" title=\"Entries tagged #{category}\" style=\"font-size: #{font_size}px;\">#{category}</a></li>"
end

html << "<p>You may also wish to browse the <a href=\"/all/\" title=\"Archives for {{site.title}}\">archives</a>.</div></div></div>"
html << <<-HTML
</ul>
<br/><br/>
</div>
<div class='sidebar span4'>
<div class='widget'>
<ul class='list-style'>
<li>
<i class='icon-chevron-right'></i>
<a href='/all'>Archives</a>
</li>
</ul>
</div>
</div>
</div>
HTML


File.open('tags/index.html', 'w+') do |file|
Expand Down Expand Up @@ -101,26 +124,53 @@ layout: default
title: Entries tagged "#{category}"
type: "#{category.gsub(/\b\w/){$&.upcase}}"
---
<div id="home">
<div id="current" class="post">
<div id="post" class="post">
<h1 id="#{category}"><a>entries tagged "#{category}"</a></h1>
<p>&laquo; <a href="/tags/" title="Tag cloud for {{site.title}}">show all tags</a></p>
<div class='hero-unit'>
<p>
<a href='{{ site.url }}'>a blog by Chris Parsons</a>
</p>
<h1>
Posts tagged "#{category}"
</h1>
</div>
<hr />
<div class='row' id='post'>
<div class='span8'>
HTML

html << '<ul class="posting_list">'
posts.each do |post|
post_data = post.to_liquid
html << <<-HTML
<li>
<span>#{post_data['date'].strftime("%d %b %Y")}</span> &raquo; <a href="#{post.url}">#{post_data['title']}</a>
<div class='strap'>#{ post.categories.map {|tag| "<a class='tag' href='/tag/#{tag}/'>#{tag}</a>" }.join(' ') }</div>
</li>
<article class="post">
<div class="entry-body">
<a href="#{post.url}">
<h2 class="entry-title">#{post_data['title']}</h2>
</a>
</div>
<div class="entry-meta">
<span class="entry-date">#{post_data['date'].strftime("%d %b %Y")}</span>
</div>
</article>
HTML
end
html << '</ul>'
html << <<-HTML
</div>
<div class='span4 sidebar'>
<div class='widget'>
<ul class='list-style'>
<li>
<i class='icon-chevron-right'></i>
<a href='/all'>Archives</a>
</li>
<li>
<i class='icon-chevron-right'></i>
<a href='/tags'>All Categories</a>
</li>
</ul>
</div>
</div>
</div>
HTML

html << '<p>You may also be interested in browsing the <a href="/all/" title="Archives">archives</a> or seeing <a href="/tags/" title="Tag cloud">the tag cloud</a>.</div></div></div>'
html
end

Expand Down
16 changes: 12 additions & 4 deletions _includes/post_list_entry.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<li>
<span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a>
<div class='strap'>{% include taglist.html %}</div>
</li>
<article class="post">
<div class="entry-body">
<a href="{{ post.url }}">
<h2 class="entry-title">{{ post.title }}</h2>
</a>

{{ post.content | truncatewords: 30 }}
</div>
<div class="entry-meta">
<span class="entry-date">{{ post.date | date_to_string }}</span>
</div>
</article>
1 change: 1 addition & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.8.3.min.js"%3E%3C/script%3E'))</script>
<style type='text/css'>
/*<![CDATA[*/
.post .entry-content { font-size: 1.1em; }
.entry-content h2, .entry-content h1 { font-size: 18px; }
/*]]>*/
</style>
Expand Down
1 change: 1 addition & 0 deletions _layouts/default_haml.haml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.8.3.min.js"%3E%3C/script%3E'))</script>
:css
.post .entry-content { font-size: 1.1em; }
.entry-content h2, .entry-content h1 { font-size: 18px; }
%body
:plain
Expand Down
25 changes: 14 additions & 11 deletions all/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
layout: default
title: "Chris Parsons: all posts"
---
<div id="home">
<div id="current" class="post">
<div id="post" class="post">
<h1><a>all posts</a></h1>
<div class='strap'>last updated {{ site.posts.first.date | date_to_string }}</div>
<ul>
{% for post in site.posts %}
{% include post_list_entry.html %}
{% endfor %}
</ul>
</div>
<div class='hero-unit'>
<p>
<a href='{{ site.url }}'>a blog by Chris Parsons</a>
</p>
<h1>
all posts
</h1>
</div>
<hr />
<div class='row' id='post'>
<div class='span8'>
{% for post in site.posts %}
{% include post_list_entry.html %}
{% endfor %}
</div>
</div>
19 changes: 19 additions & 0 deletions all/index_haml.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:plain
---
layout: default
title: "Chris Parsons: all posts"
---
.hero-unit
%p
%a{:href => "{{ site.url }}" } a blog by Chris Parsons
%h1
all posts

%hr

#post.row
.span8
:plain
{% for post in site.posts %}
{% include post_list_entry.html %}
{% endfor %}
127 changes: 59 additions & 68 deletions css/syntax.css
Original file line number Diff line number Diff line change
@@ -1,69 +1,60 @@
.highlight { overflow: auto; padding: 4px; font-family: Monaco, fixed; }
.highlight .c { color: #999999; font-style: italic } /* Comment */
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .g { color: #d0d0d0 } /* Generic */
.highlight .k { color: #6ab825; font-weight: bold } /* Keyword */
.highlight .l { color: #d0d0d0 } /* Literal */
.highlight .n { color: #d0d0d0 } /* Name */
.highlight .o { color: #d0d0d0 } /* Operator */
.highlight .x { color: #d0d0d0 } /* Other */
.highlight .p { color: #d0d0d0 } /* Punctuation */
.highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */
.highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
.highlight .gd { color: #d22323 } /* Generic.Deleted */
.highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
.highlight .gr { color: #d22323 } /* Generic.Error */
.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #589819 } /* Generic.Inserted */
.highlight .go { color: #cccccc } /* Generic.Output */
.highlight .gp { color: #aaaaaa } /* Generic.Prompt */
.highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
.highlight .gt { color: #d22323 } /* Generic.Traceback */
.highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #6ab825 } /* Keyword.Pseudo */
.highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */
.highlight .ld { color: #d0d0d0 } /* Literal.Date */
.highlight .m { color: #3677a9 } /* Literal.Number */
.highlight .s { color: #ed9d13 } /* Literal.String */
.highlight .na { color: #bbbbbb } /* Name.Attribute */
.highlight .nb { color: #24909d } /* Name.Builtin */
.highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */
.highlight .no { color: #40ffff } /* Name.Constant */
.highlight .nd { color: #ffa500 } /* Name.Decorator */
.highlight .ni { color: #d0d0d0 } /* Name.Entity */
.highlight .ne { color: #bbbbbb } /* Name.Exception */
.highlight .nf { color: #447fcf } /* Name.Function */
.highlight .nl { color: #d0d0d0 } /* Name.Label */
.highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */
.highlight .nx { color: #d0d0d0 } /* Name.Other */
.highlight .py { color: #d0d0d0 } /* Name.Property */
.highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #40ffff } /* Name.Variable */
.highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */
.highlight .w { color: #666666 } /* Text.Whitespace */
.highlight .mf { color: #3677a9 } /* Literal.Number.Float */
.highlight .mh { color: #3677a9 } /* Literal.Number.Hex */
.highlight .mi { color: #3677a9 } /* Literal.Number.Integer */
.highlight .mo { color: #3677a9 } /* Literal.Number.Oct */
.highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */
.highlight .sc { color: #ed9d13 } /* Literal.String.Char */
.highlight .sd { color: #ed9d13 } /* Literal.String.Doc */
.highlight .s2 { color: #ed9d13 } /* Literal.String.Double */
.highlight .se { color: #ed9d13 } /* Literal.String.Escape */
.highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */
.highlight .si { color: #ed9d13 } /* Literal.String.Interpol */
.highlight .sx { color: #ffa500 } /* Literal.String.Other */
.highlight .sr { color: #ed9d13 } /* Literal.String.Regex */
.highlight .s1 { color: #ed9d13 } /* Literal.String.Single */
.highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */
.highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */
.highlight .vc { color: #40ffff } /* Name.Variable.Class */
.highlight .vg { color: #40ffff } /* Name.Variable.Global */
.highlight .vi { color: #40ffff } /* Name.Variable.Instance */
.highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ <h4>Popular Categories</h4>
-->
<li><a href="/tag/agile/">agile (15)</a></li><li><a href="/tag/anti-pattern/">anti-pattern (3)</a></li><li><a href="/tag/apprenticeship/">apprenticeship (5)</a></li><li><a href="/tag/bdd/">bdd (18)</a></li><li><a href="/tag/bddkickstart/">bddkickstart (4)</a></li><li><a href="/tag/business/">business (12)</a></li><li><a href="/tag/c++/">c++ (5)</a></li><li><a href="/tag/code/">code (33)</a></li><li><a href="/tag/craftsmanship/">craftsmanship (14)</a></li><li><a href="/tag/cucumber/">cucumber (18)</a></li><li><a href="/tag/game%20development/">game development (5)</a></li><li><a href="/tag/java/">java (12)</a></li><li><a href="/tag/katas/">katas (3)</a></li><li><a href="/tag/lean/">lean (9)</a></li><li><a href="/tag/lean%20startup/">lean startup (3)</a></li><li><a href="/tag/life/">life (13)</a></li><li><a href="/tag/meta/">meta (4)</a></li><li><a href="/tag/pairing/">pairing (5)</a></li><li><a href="/tag/pomodoros/">pomodoros (3)</a></li><li><a href="/tag/process/">process (4)</a></li><li><a href="/tag/productivity/">productivity (15)</a></li><li><a href="/tag/products/">products (12)</a></li><li><a href="/tag/rails/">rails (3)</a></li><li><a href="/tag/richclient/">richclient (11)</a></li><li><a href="/tag/ruby/">ruby (13)</a></li><li><a href="/tag/sol%20trader/">sol trader (9)</a></li><li><a href="/tag/spring/">spring (11)</a></li><li><a href="/tag/tdd/">tdd (11)</a></li><li><a href="/tag/team/">team (8)</a></li><li><a href="/tag/testing/">testing (5)</a></li><li><a href="/tag/tutorial/">tutorial (11)</a></li><li><a href="/tag/ux/">ux (5)</a></li><li><a href="/tag/writing/">writing (3)</a></li> </ul>
</div>
<div class='widget'>
<h4>More</h4>
<ul class='list-style'>
<li>
<i class='icon-chevron-right'></i>
<a href='/all'>Archives</a>
</li>
<li>
<i class='icon-chevron-right'></i>
<a href='/tags'>All Categories</a>
</li>
</ul>
</div>
<div class='widget'>
{% include hello.html %}
</div>
Expand Down
9 changes: 9 additions & 0 deletions index_haml.haml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
print "#{category} (#{posts.length})</a>"
print "</li>"
end
.widget
%h4 More
%ul.list-style
%li
%i.icon-chevron-right
%a{:href => '/all'} Archives
%li
%i.icon-chevron-right
%a{:href => '/tags'} All Categories
.widget
:plain
{% include hello.html %}
Loading

0 comments on commit 310a08c

Please sign in to comment.