Enable inverting homepage section styling

Add invert Param to the config file. Add the 'odd' class to the
post-holders and the 'even' class to the post-afters using Hugo if
statements instead of using JS. Marking invert = true in the config file
flips which sections are marked odd and even.
This commit is contained in:
Ian Cook 2023-03-20 19:45:44 -05:00
parent 67434f0a8f
commit 390ad61694
No known key found for this signature in database
GPG key ID: AC42F59CF2D8F367
3 changed files with 5 additions and 10 deletions

View file

@ -28,17 +28,9 @@ var $sitehead = $("#site-head");
}
}
$(document).ready(function () {
$postholder.each(function (e) {
if (e % 2 != 0) $(this).addClass("odd");
});
$postafter.each(function (e) {
var bg = $(this).parent().css("background-color");
$(this).css("border-top-color", bg);
if (e % 2 == 0) {
$(this).addClass("even");
}
});
$("a.btn.site-menu").click(function (e) {