Rental Bicycle App: Three Main Parts of Template

នៅ​ក្នុង​ការបង្កើត template សំរាប់​ទំព័រ HTML នៃ​កម្មវិធី Rental Bicycle App យើង​អាច​បង្កើត​ផ្នែក​សំខាន់​ៗ​មួយ​ចំនួន​នៃ template មាន​ដូច​ជា header, sidebar, និង footer ជាដើម​ រួច​យក​ផ្នែក​ទាំងនោះ​មក​ផ្គុំ​គ្នា​ជាមួយ​នឹង​ផ្នែក​ផ្សេង​ទៀត បង្កើត​បាន​ជា​ប្រភេទ​នៃ template ដែល​យើង​ចង់​បាន​។ ពិនិត្យ​កម្មវិធី​ខាងក្រោម​នេះ៖

<!--\views\partials\header.tpl-->
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>{{data['site_title']}}</title>
    <script src="/static/scripts/main.js"></script>
    <link href="/static/styles/main.css" rel="stylesheet"></link>
    <link href="/static/images/site_logo.png" rel="icon" ></link>
    <link href="/static/fonts/setup.css" rel="stylesheet"></link>
  </head>
    
  <body>
    <div class="site" id="site">
      <header class="site-header" id="site-header">
        header
      </header>


<!--\views\partials\footer.tpl-->
      <footer>
        footer
      </footer>

    </div><!--site-->
  </body>
</html>


%include("./partials/header.tpl")
    
content
%include("./partials/sidebar.tpl")
%include("./partials/footer")