custom front page template working

This commit is contained in:
Adam Piontek 2021-07-06 14:57:45 -04:00
parent 5592ee43e4
commit 0584537f99
13 changed files with 269 additions and 82 deletions

View file

@ -18,6 +18,21 @@ function svg_icon_use($icon_name, $div_class) {
return $output . "</svg></div>";
};
/**
* Social helpers
*/
require_once( WP_73k_DIR . '/socials.php' );
function socials_str($socials) {
$out_str = '<div id="social-icons" class="mt-1">';
foreach ($socials as $i=>$social) {
$pad = $i == 0 ? 'pe-1' : ($i == (count($socials) - 1) ? 'ps-1' : 'px-1');
$out_str .= '<a href="' . $social['url'] . '" rel="noreferrer" target="' . $social['target'];
$out_str .= '" class="fs-3 link-light text-decoration-none ' . $pad . '">';
$out_str .= svg_icon_use($social['icon'], "icon baseline") . "</a>";
}
return $out_str . '</div>';
}
/**
* Autoloader for browersync
*/