Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #79 from devopsdays/highlight-current-month#78
Browse files Browse the repository at this point in the history
Highlight current month in left nav
  • Loading branch information
mattstratton authored Jan 7, 2017
2 parents 6b6874d + 8822b91 commit e781aea
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
31 changes: 31 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,37 @@ <h3 class="footer-nav">@DEVOPSDAYS</h3>
s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- stuff to highlight current month -->
<script>
var now = new Date;

$('.left-nav-months').text(function (i, v) {

if (getMonth(now) == v) {
$(this).addClass('current');
}

});

function getMonth(d) {
var dt = new Date(d);
var dtm = dt.getMonth();
var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
month[7] = "August";
month[8] = "September";
month[9] = "October";
month[10] = "November";
month[11] = "December";
return month[dtm]
}
</script>
</body>

</html>
6 changes: 2 additions & 4 deletions static/css/site.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/css/site.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions static/site.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@
text-transform: uppercase;
color: #000000;
}

.left-nav-current-month {
font-family: 'Roboto', sans-serif;
/* set the current month style */
.left-nav-months.current {
font-weight: 900;
font-size: 9pt;
text-transform: uppercase;
color: #0082AB;
}

Expand Down

0 comments on commit e781aea

Please sign in to comment.