<?php
//controllers/home.php

function index($kw){
    require_once __DIR__.'/../tool.php';
    require_once __DIR__.'/../setting.php';
	
	$_tool = new Tool();
	date_default_timezone_set("Asia/Phnom_Penh");
	$date = $_tool->getKhDate(date('Y/m/d'));

    $kw->mset(['appName'=>$setting['siteTitle'], 'title'=>'ទំព័រ​ដើម', 'date'=>$date]);

    $view=new View;
    echo $view->render('views/index.php');
}    

 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <title> <?php echo $appName." / ".$title; ?></title>
        <script src="public/scripts/jQuery.js"></script>
        <link href="public/fonts/setup.css" rel="stylesheet" ></link>
        <link href="public/images/site_logo.png" rel="icon" ></link>
        <link href="public/styles/global.css" rel="stylesheet"></link>
        <link href="public/styles/partials/header.css" rel="stylesheet"></link>
    </head>
    <body>
    <section class='Header'>
        <div class='wrapper region'>
            <div class='datetime'>
                <div class='date'><?php echo $date ?></div>
                <div class='time' id='kh-clock'>ពេល​ម៉ោង</div>
            </div>
            <div class='title'>
                <a href="./"><?php echo $appName ?></a>
                <div class='description'>ព័ត៌មាន ចំណេះ​ដឹង វប្បធម៌ កំសាន្ត</div>
            </div>
            <form class='search'>
                <input type='text' name='q' placeholder='Search' />
                <input type='submit' value='ស្វែង​រក' />
            </form>
        </div>
    </section>
    
    <script src='public/scripts/partials/header.js'></script>

    <?php require('menu.php') ?>

    <div class='site region'>

 

.Header{
    background: var(--background-dark);
    padding: 15px 0;
}

.Header .wrapper{
    display: grid;
    grid-template-columns: 25% auto 25%;
    text-align: center;
    align-items: center;
}

.Header .title a{
    font: 50px/1.5 Anton, Moul;
    color: white;
    text-shadow: 0 0 0 #e7e7e7, 1px 1px 0 #d8d8d8, 2px 2px 0 #cacaca, 3px 3px 0 #bbb, 4px 4px 0 #adadad, 5px 5px 0 #9e9e9e, 6px 6px 0 #909090, 7px 7px 6px rgb(0 0 0 / 60%), 7px 7px 1px rgb(0 0 0 / 50%), 0 0 6px rgb(0 0 0 / 20%);
}

.Header .title .description{
    margin-top: 15px;
    font: 22px/1.5 Nokora;
}

.Header .search{
    display: grid;
    grid-template-columns: auto 25%;
}

.Header .search input{
    padding: 0 10px;
    font: var(--body-font);
}

.Header .datetime .date{
    font: 20px/1.75 Anton, Bayon;
}

@media only screen and (max-width: 600px){
    .Header .wrapper{
        grid-template-columns: 100%;
    }
}

 

Epizy: http://khmerweb.epizy.com