Skip to content

Commit

Permalink
Add tag cloud and tweak style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmcaffer committed Nov 16, 2015
1 parent 0b34f50 commit 4956fbf
Show file tree
Hide file tree
Showing 22 changed files with 182 additions and 70 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Site settings
title:
title: Jeff McAffer
email: jeffmcaffer@gmail.com
description: > # this means to ignore newlines until "baseurl:"
Jeff McAffer on open source, Microsoft, and maybe even car racing.
Expand All @@ -8,6 +8,8 @@ url: "http://mcaffer.com" # the base hostname & protocol for your site
twitter_username: jeffmcaffer
github_username: jeffmcaffer

excerpt_separator: <!--more-->

# Build settings
markdown: kramdown
highlighter: rouge
21 changes: 13 additions & 8 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="site-footer wrapper spaced">
<h2 class="footer-heading">{{ site.title }}</h2>
<!--<h2 class="footer-heading">{{ site.title }}</h2>-->

<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
Expand All @@ -11,15 +11,17 @@ <h2 class="footer-heading">{{ site.title }}</h2>
<path fill="#828282 " d="M201.8 347.2c0 20.3-16.5 36.8-36.8 36.8 -20.3 0-36.8-16.5-36.8-36.8s16.5-36.8 36.8-36.8C185.3 310.4 201.8 326.8 201.8 347.2zM128.2 204.7v54.5c68.5 0.7 124 56.3 124.7 124.7h54.5C306.7 285.3 226.9 205.4 128.2 204.7zM128.2 166.6c57.9 0.3 112.3 22.9 153.2 63.9 41 41 63.7 95.5 63.9 153.5h54.5c-0.3-149.9-121.7-271.4-271.6-271.9V166.6L128.2 166.6z ">
</path>
</svg>
</span>-->
</span>-->
</a>

&nbsp;&nbsp;

<a href="/feed.xml"><img src="feed-icon-14x14.png" /> <span class="username ">rss</span></a>
<a href="/feed.xml"><img src="/images/feed-icon-14x14.png" /> <span class="username ">rss</span></a>

&nbsp;&nbsp; {% if site.github_username %}
<a href="https://github.com/{{ site.github_username }} ">
&nbsp;&nbsp;

{% if site.github_username %}
<a href="https://github.com/{{ site.github_username }}">
<span class="icon icon--github ">
<svg viewBox="0 0 16 16 ">
<path fill="#828282 " d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32
Expand All @@ -31,8 +33,12 @@ <h2 class="footer-heading">{{ site.title }}</h2>
</span>
<span class="username ">{{ site.github_username }}</span>
</a>
{% endif %} &nbsp;&nbsp; {% if site.twitter_username %}
<a href="https://twitter.com/{{ site.twitter_username }} ">
{% endif %}

&nbsp;&nbsp;

{% if site.twitter_username %}
<a href="https://twitter.com/{{ site.twitter_username }}">
<span class="icon icon--twitter ">
<svg viewBox="0 0 16 16 ">
<path fill="#828282 " d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
Expand All @@ -42,7 +48,6 @@ <h2 class="footer-heading">{{ site.title }}</h2>
c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z "> </path>
</svg>
</span>

<span class="username ">{{ site.twitter_username }}</span>
</a>
{% endif %}
Expand Down
18 changes: 7 additions & 11 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<header>


<a href="http://mcaffer.com/">
<div class="site-header" style="background:transparent url(http://mcaffer.com/wp-content/themes/book/images/header/header-anegada1.jpg) no-repeat center bottom;">
<div id="header-left">
</div>
<div id="header-right">
<a href="{{ site.url }}" class="site-header-link">
<div class="site-header" style="background:transparent url(/images/header/header-anegada1.jpg) no-repeat center bottom; ">
<!--<div id="header-left"></div>-->
<!--<div id="header-right">Jeff McAffer</div>-->
<div class="site-header-block">
<div class="site-header-title">Jeff McAffer</div>
<div class="site-header-subtitle">Thinking without boxes</div>
</div>
</div>
</a>


<!--<div id="header-left"> </div>
<div id="header-right"> </div>-->

<div class="wrapper">
<!--<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>-->

<nav class="site-nav">
<a href="#" class="menu-icon">
<svg viewBox="0 0 18 15">
Expand Down
2 changes: 1 addition & 1 deletion _includes/right-about.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="textwidget">These days I'm either driving Industrial Open Source @ Microsoft or driving my Pro3 race car. Previously I spent a whack o' time writing code and books in the runtime parts of <a href="http://eclipse.org">Eclipse</a>, writing Smalltalk code and travelling about.
<div class="textwidget">These days I'm either driving Open Source @ Microsoft or driving my <a href="http://pro3-racing.com">Pro3 race car</a>. Previously I spent a whack o' time writing code and books in the runtime parts of <a href="http://eclipse.org">Eclipse</a>, writing Smalltalk code, and travelling/living around the world.
<br><a href="/about">Learn more...</a>
</div>
Empty file removed _includes/sdfds.html
Empty file.
34 changes: 34 additions & 0 deletions _includes/tagcloud.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="tag-cloud">

{% capture tags %}
{% for tag in site.tags %}
{{ tag[0] }}
{% endfor %}
{% endcapture %}
{% assign sortedtags = tags | split:' ' | uniq | sort %}

{% assign min = 1000 %}
{% assign max = 0 %}
{% for tag in site.tags %}
{% if tag[1].size > max %}
{% assign max = tag[1].size %}
{% else %}
{% if tag[1].size < min %}
{% assign min = tag[1].size %}
{% endif %}
{% endif %}
{% endfor %}

{% assign range = max | minus: min | plus: 1 %}

{% for tag in sortedtags %}
{% assign count = site.tags[tag].size %}
{% if range > 10 %}
{% assign font = count | minus: min | times: 10 | divided_by: range | plus: 1 %}
{% else %}
{% assign font = 10 | minus: range | divided_by: 2 | plus: count %}
{% endif %}
<a href="/tags.html#{{ tag | first }}" class="tag-cloud-{{ font }}" >{{ tag }}</a>
{% endfor %}

</div>
3 changes: 2 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
<div class="wrapper spaced">
<div class="page-content">
{{ content }}
{% include disqus.html %}
</div>

<div class="sidebar">
{% include right-about.html %}
{% include tagcloud.html %}

</div>
</div>

Expand Down
10 changes: 8 additions & 2 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
---
<div class="post">

<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<header>
<h2 class="post-header">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ page.title }}</a>
</h2>
</header>

<!--<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>-->

<article class="post-content">
{{ content }}
</article>
Expand Down
14 changes: 11 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@
---
<div class="post">

<header class="post-header">
<header>
<div>
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
<span class="post-meta">{{ page.date | date: "%b %-d, %Y" }}</span>

<h2 class="post-header">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ page.title }}</a>
</h2>

<!--<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>-->
</div>
</header>

<article class="post-content">
{{ content }}
{% include disqus.html %}
</article>

</div>

4 changes: 3 additions & 1 deletion _posts/2015-10-26-welcome-to-jekyll.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ layout: post
title: "Welcome to Jekyll!"
date: 2015-10-26 10:24:24
categories: jekyll update
tags: foo, bar
tags: foo bar
---
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.

<!--more-->

To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:
Expand Down
12 changes: 12 additions & 0 deletions _posts/2015-11-16-Test-test.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: post
title: "Testing. Testing.!"
date: 2015-11-16 11:11:11
categories: jekyll update
tags: foo testing
---
this is a test to see if what another post looks like lkjdslf jdslk safjlkdsf jlkdsjflsf j;lkdsajfdsjfjdslks d;lkfjdsalf dsjf;lkds flkdsjflkds jfjlkdsaj foiewufoiew lknewfjn

<!--more-->

This s more text after the break lkjas fjdsalkfjsd ofoidsjffoidsfoidsjfoidsfodsjofijdsoifdsofndsoif oidsnfoidsnfnodsnfoindsfonoiw fowecnwkf newihiu gisckjsc dskjf dsk dsflkds fds f hdskj
2 changes: 1 addition & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ a {

&:hover {
color: $text-color;
text-decoration: underline;
text-decoration: none;
}
}

Expand Down
86 changes: 54 additions & 32 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/**
* Site header
*/

.site-header-padding {
min-height: 24px;
}

.spaced {
margin-top: 0px;
Expand All @@ -16,14 +12,14 @@
}

.site-header {

// Positioning context for the mobile navigation icon
position: relative;

height: 130px;
min-height: 56px;
margin: auto;
margin-top: 24px;
margin-bottom: 10px;
padding: 0;

box-shadow: 10px 10px 5px #888;
Expand All @@ -32,33 +28,30 @@

}


#header-left {
background:transparent url(http://mcaffer.com/wp-content/themes/book/images/title.png) no-repeat scroll 0% 50%;
height:130px;
width: 350px;
float:right;
display:none;
.site-header-block {
width:350px;
height:130px;
float: right;
text-shadow: 0px 0px 20px #FFFFFF;
text-align: center;
font-weight: 500;

&,
&:visited {
color: $text-color;
// color: $grey-color-dark;
}
}

#header-right {
background:transparent url(http://mcaffer.com/wp-content/themes/book/images/title.png) no-repeat scroll 50% 50%;
width:350px;
height:130px;
float:right;
.site-header-title {
width:350px;
padding-top: 30px;
font-size: 36px;
}

.site-title {
font-size: 26px;
line-height: 56px;
letter-spacing: -1px;
margin-bottom: 0;
float: left;

&,
&:visited {
color: $grey-color-dark;
}
.site-header-subtitle {
vertical-align: top;
font-size: 20px;
}

.site-nav {
Expand Down Expand Up @@ -128,7 +121,7 @@ float:right;
width: -webkit-calc(21% - (#{$spacing-unit} / 2));
width: calc(21% - (#{$spacing-unit} / 2));
float: right;
padding: 20px 0px;
padding: $spacing-unit 0px;
}

/**
Expand Down Expand Up @@ -237,17 +230,46 @@ float:right;
font-size: 24px;
}

// Tags
.tag-cloud {

}

.tag-cloud-1 { font-size: 3pt; }
.tag-cloud-2 { font-size: 6pt; }
.tag-cloud-3 { font-size: 9pt; }
.tag-cloud-4 { font-size: 12pt; }
.tag-cloud-5 { font-size: 15pt; }
.tag-cloud-6 { font-size: 18pt; }
.tag-cloud-7 { font-size: 21pt; }
.tag-cloud-8 { font-size: 24pt; }
.tag-cloud-9 { font-size: 27pt; }
.tag-cloud-10 { font-size: 30pt; }

.tag-list {
margin-left: 0;
list-style: none;

> li {
margin-bottom: 0;
}
}

.tag-date {
font-size: $small-font-size;
color: $grey-color;
}

/**
* Posts
*/
.post-header {
margin-bottom: $spacing-unit;
// margin-bottom: $spacing-unit;
margin-bottom: 0;
}

.post-title {
font-size: 32px;
font-size: 26px;
letter-spacing: -1px;
line-height: 1;
float: left;
Expand All @@ -260,7 +282,7 @@ float:right;
.post-content {
float: left;
margin-bottom: $spacing-unit;
padding-left: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;

h2 {
font-size: 26px;
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: About
permalink: /about/
---

I'm currently the Director of Open Source Engineering in Microsoft's Open Source Programs Office (phew). That means I help drive open source culture, policies, processes and tools across the company. Check out [Microsoft on GitHub](http://github.com/microsoft). Of course, the opinions here are my own and I'm not a lawyer.
I'm currently the Director of Open Source Engineering in Microsoft's Open Source Programs Office (phew). That means I help drive open source culture, policies, processes and tools across the company. Check out [Microsoft on GitHub](http://github.com/microsoft). Of course, the opinions here are my own and no, I'm not a lawyer.

When not doing open source stuff, you can find me with the family or working on/driving [my Pro3 race car](http://pro3-racing.com).
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 4956fbf

Please sign in to comment.