wip factor out sidebar.php into more manageable partials
add helper function to determine if a sidebar is needed based on post template settings, refactor sidebar.php to use said helper function, other minor tweaks