Files
nodejs-website/pages/helpers/banner.php
T

40 lines
1.3 KiB
PHP
Executable File

#!/usr/bin/php
<?php
// Dynamic testing of whether new images around the banner is wanted.
if (!isset($GLOBALS["SHOW_BANNER_PICS"])) {
$GLOBALS["SHOW_BANNER_PICS"] = true;
}
$show_pics = $GLOBALS["SHOW_BANNER_PICS"];
$banner_width_desktop = $show_pics ? 6 : 12;
$banner_width_mobile = $show_pics ? 8 : 12;
?>
<a href='/'>
<div class="row banner-desktop">
<?php if ($show_pics) echo '
<div class="col-3 header center banner-image banner-image01"></div>
';?>
<div class="col-<?php echo "$banner_width_desktop"; ?> header">
<div class="banner-top">Peace</div>
<div class="banner-middle">Love</div>
<div class="banner-bottom">Happiness</div>
</div>
<?php if ($show_pics) echo '
<div class="col-3 header center banner-image banner-image02"></div>
';?>
</div>
<div class="row banner-mobile">
<?php if ($show_pics) echo '
<div class="col-2 header center banner-image banner-image01"></div>
';?>
<div class="col-<?php echo "$banner_width_mobile"; ?> header">
<div class="banner-top">Peace</div>
<div class="banner-middle">Love</div>
<div class="banner-bottom">Happiness</div>
</div>
<?php if ($show_pics) echo '
<div class="col-2 header center banner-image banner-image02"></div>
';?>
</div>
</a>