<?php
/*!
* Copyright Anucha Puangpaka
* Contact anucha.ppk@icloud.com 062-479-9836
*/
?>
<style type="text/css" media="screen">
<?php
/*if($grayscale!=0){
?>
body {
-webkit-filter: grayscale(<?php echo $grayscale;?>);
filter: grayscale(<?php echo $grayscale;?>);
}
<?php
}*/
?>
.vh-100 {
min-height: 100vh;
}
@font-face {
font-family: "THSarabun";
src: url('fonts/THSarabun.ttf');
src: local('THSarabun'), url('fonts/THSarabun.ttf') format('truetype');
font-style: normal;
}
.font-14-bold {
font-family: "THSarabun";
font-size: 25pt;
font-weight: bold;
}
html {
position: relative;
min-height: 100%;
}
<?php
$apcolor = $header_color;
$apcolorFoot = $footer_color;
$apcolor1 = "#4f3a77";
$apcolor2 = "#F8F9F9";
if(date('D')=="Mon"){
$apcolor1 = "#FFFF66"; /*สีเหลือง*/
}
if(date('D')=="Tue"){
$apcolor1 = "#FC0280"; /*สีชมพู*/
}
if(date('D')=="Wed"){
$apcolor1 = "#08a01b"; /*สีเขียว*/
}
if(date('D')=="Thu"){
$apcolor1 = "#ec4600"; /*สีแสด*/
}
if(date('D')=="Fri"){
$apcolor1 = "#66CCFF"; /*สีฟ้า*/
}
if(date('D')=="Sat"){
$apcolor1 = "#4f3a77"; /*สีม่วง*/
}
if(date('D')=="Sun"){
$apcolor1 = "#FC0107"; /*สีแดง*/
}
if(date(Ymd)==(date(Y)."0214")){
$apcolor1 = "#ec4600"; /*สีแสด*/
}
?>
body {
<?php
if($grayscale==0 || empty($grayscale)){
$rgb = hex2rgb("$apcolor1"); /*print_r($rgb);*/
$rgb2 = hex2rgb("$apcolor2");
/*$hex = rgb2hex($rgb); print_r($hex);*/
$ap_color1 = "$rgb[0], $rgb[1], $rgb[2]";
$ap_color2 = "$rgb2[0], $rgb2[1], $rgb2[2]";
?>
/*background: linear-gradient(-90deg,<?php echo "rgba($ap_color1,0.2)" ?>, <?php echo "rgb($ap_color2)" ?>);*/
background: <?php echo "rgba($ap_color1,0.2)" ?>;
-webkit-animation-name: apbg-color-1;
-webkit-animation-duration: 5s;
animation-name: apbg-color-1;
animation-duration: 5s;
/*background-image: url('http://bestanimations.com/Nature/winter/winter-snow-nature-animated-gif-23.gif');
background-attachment: fixed;
background-size:cover;
margin: 0 auto;*/
<?php
}else{
$rgb = hex2rgb("#cccccc"); /*print_r($rgb);*/
$rgb2 = hex2rgb("#cccccc");
/*$hex = rgb2hex($rgb); print_r($hex);*/
$ap_color1 = "$rgb[0], $rgb[1], $rgb[2]";
$ap_color2 = "$rgb2[0], $rgb2[1], $rgb2[2]";
?>
background: <?php echo "rgba($ap_color1,0.2)" ?>;
-webkit-filter: grayscale(<?php echo $grayscale;?>);
filter: grayscale(<?php echo $grayscale;?>);
<?php
}
?>
}
@-webkit-keyframes apbg-color-1 {
0% {background-color:rgba(<?php echo $ap_color1; ?>, 0.8);}
25% {background-color:rgba(<?php echo $ap_color1; ?>, 0.6);}
50% {background-color:rgba(<?php echo $ap_color1; ?>, 0.4);}
75% {background-color:rgba(<?php echo $ap_color1; ?>, 0.2);}
/* 100% {background-color:rgba(<?php echo $ap_color1 ?>, 0.0);} */
}
@keyframes apbg-color-1 {
0% {background-color:rgba(<?php echo $ap_color1; ?>, 0.8);}
25% {background-color:rgba(<?php echo $ap_color1; ?>, 0.6);}
50% {background-color:rgba(<?php echo $ap_color1; ?>, 0.4);}
75% {background-color:rgba(<?php echo $ap_color1; ?>, 0.2);}
/* 100% {background-color:rgba(<?php echo $ap_color1 ?>, 0.0);} */
}
.footer {
/* background-color: <?php echo "rgba($ap_color2,0.1)" ?>; */
}
.body-main-row-head {
/*margin: 0px;*/
background-color: <?php echo $apcolor; ?>;
}
.body-main-row-body {
/*margin: 0px;*/
background-color: #ffffff;
}
.body-main-row-foot {
/*margin: 0px;*/
background-color: <?php echo $apcolorFoot; ?>;
}
/* .container {
width: 70%;
} */
.bg-primary {
background-color: #007bff !important;
}
a.bg-primary:hover, a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
background-color: #0062cc !important;
}
.bg-secondary {
background-color: #6c757d !important;
}
a.bg-secondary:hover, a.bg-secondary:focus,
button.bg-secondary:hover,
button.bg-secondary:focus {
background-color: #545b62 !important;
}
.bg-success {
background-color: #28a745 !important;
}
a.bg-success:hover, a.bg-success:focus,
button.bg-success:hover,
button.bg-success:focus {
background-color: #1e7e34 !important;
}
.bg-info {
background-color: #17a2b8 !important;
}
a.bg-info:hover, a.bg-info:focus,
button.bg-info:hover,
button.bg-info:focus {
background-color: #117a8b !important;
}
.bg-warning {
background-color: #ffc107 !important;
}
a.bg-warning:hover, a.bg-warning:focus,
button.bg-warning:hover,
button.bg-warning:focus {
background-color: #d39e00 !important;
}
.bg-danger {
background-color: #dc3545 !important;
}
a.bg-danger:hover, a.bg-danger:focus,
button.bg-danger:hover,
button.bg-danger:focus {
background-color: #bd2130 !important;
}
.bg-light {
background-color: #f8f9fa !important;
}
a.bg-light:hover, a.bg-light:focus,
button.bg-light:hover,
button.bg-light:focus {
background-color: #dae0e5 !important;
}
.bg-dark {
background-color: #343a40 !important;
}
a.bg-dark:hover, a.bg-dark:focus,
button.bg-dark:hover,
button.bg-dark:focus {
background-color: #1d2124 !important;
}
.bg-white {
background-color: #fff !important;
}
.bg-transparent {
background-color: transparent !important;
}
</style>