Guest User

Untitled

a guest
Sep 19th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. <?hh //strict
  2. /**
  3. * <document:base pagetitle={$some_var} sitetitle="a site title"><p>children</p></document>;
  4. */
  5. class :document:base extends :x:element
  6. {
  7.     attribute string sitetitle @required;
  8.     attribute string pagetitle ="";
  9.    
  10.     protected function render(): \XHPRoot
  11.     {
  12.         return
  13.         <x:doctype>
  14.         <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
  15.         <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
  16.         <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
  17.         <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
  18.         <head>         
  19.             <meta charset="utf-8" />
  20.             <title>{$this->:pagetitle}</title>
  21.             <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  22.             <link rel="stylesheet" type="text/css" href="/css/normalize.css" />
  23.             <link rel="stylesheet" type="text/css" href="/css/skeleton.css" />
  24.         </head>
  25.         <body>
  26.  
  27.             <nav class="row topnav">
  28.                 <span class="sitetitle">
  29.                     <a href="/">{$this->:sitetitle}</a>
  30.             </nav>
  31.  
  32.             <section class="row maincontent">
  33.             {$this->getChildren()}
  34.             </section>
  35.  
  36.             <footer class="row">
  37.             </footer>
  38.  
  39.         </body>
  40.         </html>
  41.         </x:doctype>;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment