Skip to content

Commit

Permalink
add per load random images
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmcaffer committed Jan 26, 2019
1 parent 1dfe57a commit fa6725e
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 24 deletions.
4 changes: 0 additions & 4 deletions .vscode/launch.json

This file was deleted.

6 changes: 0 additions & 6 deletions _data/banners.csv

This file was deleted.

10 changes: 10 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />

{% include googleanalytics.html %}

<script>
window.onload = () => {
var image = Math.floor(Math.random() * 6);
var header = document.querySelector(".site-header")
header.style.background = `transparent url(/images/header/${image}.jpg) no-repeat center bottom`
header.style.backgroundSize = 'cover'
}
</script>

</head>
7 changes: 1 addition & 6 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<header>

{% assign index = site.time | date: "%H" | modulo: site.data.banners.size %}
{% assign banner = site.data.banners[index]["file"] %}

<a href="{{ site.url }}" class="site-header-link">
<div class="site-header" style="background:transparent url(/images/header/{{ banner }}) no-repeat center bottom;background-size: cover ">
<div class="site-header">
<!--<div id="header-left"></div>-->
<!--<div id="header-right">Jeff McAffer</div>-->
<div class="site-header-block">
Expand Down Expand Up @@ -35,7 +31,6 @@
{% endfor %}
</div>-->
</nav>

</div>

</header>
10 changes: 7 additions & 3 deletions _includes/right-about.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<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>
<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>
8 changes: 4 additions & 4 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}

.column {
max-width: 1100px;
margin-right: auto;
margin-left: auto;
max-width: 1100px;
margin-right: auto;
margin-left: auto;
}

.site-header {
Expand All @@ -30,7 +30,7 @@
box-shadow: 0px 8px 5px #999;
-moz-box-shadow: 0px 8px 5px #999;
-webkit-box-shadow: 0px 8px 5px #999;
}
}

.site-header-block {
width: 400px;
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 no, I'm not a lawyer.
I'm currently the Director of Microsoft's Open Source Programs Office. That means I help drive open source culture, policies, processes and tools across the company. Check out [Microsoft's open source work](https://opensource.microsoft.com). 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

0 comments on commit fa6725e

Please sign in to comment.