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:
parent
67434f0a8f
commit
390ad61694
3 changed files with 5 additions and 10 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue