diff --git a/_includes/scripts.html b/_includes/scripts.html index 3754475..e8c34ce 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -22,19 +22,24 @@ ga('send', 'pageview'); - {% if page.maps %} + {% for map in page.maps %} {% endfor %} {% endif %} - {% if page.graphs %} + {% for graph in page.graphs %} {% endfor %} {% endif %} + + +{% if page.scroll %} + +{% endif %} diff --git a/_posts/0001-01-01-armcortex.markdown b/_posts/0001-01-01-armcortex.markdown index 56c6d2d..83893ea 100644 --- a/_posts/0001-01-01-armcortex.markdown +++ b/_posts/0001-01-01-armcortex.markdown @@ -1,6 +1,9 @@ --- title: ARM Cortex M0+ tagline: Low power and things +linkname: armcortex +x: 51% +y: 33% --- You’ll find this post in your `_posts` directory. Go ahead and edit it diff --git a/_posts/0002-01-01-gps.markdown b/_posts/0002-01-01-gps.markdown index 6518ad8..01cf5bc 100644 --- a/_posts/0002-01-01-gps.markdown +++ b/_posts/0002-01-01-gps.markdown @@ -1,6 +1,9 @@ --- title: Global Positioning System Receiver tagline: from ublox ag. +linkname: gps +x: 20% +y: 42% --- You’ll find this post in your `_posts` directory. Go ahead and edit it diff --git a/_sass/_custom.scss b/_sass/_custom.scss index 3242af5..5cdd64a 100644 --- a/_sass/_custom.scss +++ b/_sass/_custom.scss @@ -92,15 +92,6 @@ pre { } -.fill-page > img { - display: block; - max-width: 100%; - height: auto; - border: 0px none; - -} - - /** * Old Notice */ @@ -110,3 +101,46 @@ pre { padding-right: 10px; float: right } + + + + +.fill-page > img { + display: block; + max-width: 100%; + height: auto; + border: 0px none; +} + + +/** + * A grid of interactive circles for the top image + */ +.ch-grid { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + position:absolute; +} +.ch-grid li { + position: absolute; + width: 4%; + display: block; +} +.ch-pad { + height: 0; +padding-bottom: 100%; +} +.ch-item { + margin: 10%; + overflow: hidden; + position: relative; + background-image: url(assets/circles.svg); + background-size: 100%; + + transition: all 0.2s ease-out; +} +.ch-item:hover { + margin: 0px; +} \ No newline at end of file diff --git a/assets/circles.svg b/assets/circles.svg new file mode 100644 index 0000000..43699e7 --- /dev/null +++ b/assets/circles.svg @@ -0,0 +1,76 @@ + + + + diff --git a/index.html b/index.html index 75594d2..6361e5d 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,23 @@ --- layout: default asset_path: assets/ +scroll: true --- -
{{ post.excerpt }}
+{{ post.content }}
{% endfor %} diff --git a/scroll.js b/scroll.js new file mode 100644 index 0000000..bba39fc --- /dev/null +++ b/scroll.js @@ -0,0 +1,14 @@ +$(function() { + $('a[href*=#]:not([href=#])').click(function() { + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); + if (target.length) { + $('html,body').animate({ + scrollTop: target.offset().top + }, 1000); + return false; + } + } + }); +});