2013-08-06 21:14:36 -07:00

93 lines
4.9 KiB
PHTML

<!doctype html>
<html><?/* data-ng-app="NGApp" */?>
<head>
<title><?=$this->title ? $this->title : 'Crunchbutton'?></title>
<? /* <meta name="viewport" content="user-scalable=no, initial-scale = 1.0,maximum-scale = 1.0"> */ ?>
<meta name="fragment" content="!" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" href="/assets/images/appicon.png">
<script type="text/javascript">
<?
// Get server's date time converted to GMD
$utc_str = gmdate( 'Y/n/d/H/i/s', time() );
$utc = strtotime( $utc_str );
?>
var _gmtServer = '<?=$utc_str?>';
</script>
<? if (c::config()->bundle) : ?>
<link rel="stylesheet" type="text/css" href="/assets/css/bundle.css?v=<?=Cana_Util::gitVersion()?>">
<? else : ?>
<link rel="stylesheet" type="text/css" href="/assets/css/styles.revised.css?v=<?=Cana_Util::gitVersion()?>">
<link rel="stylesheet" type="text/css" href="/assets/css/style.css?v=<?=Cana_Util::gitVersion()?>">
<link rel="stylesheet" type="text/css" href="/assets/css/sprites.css?v=<?=Cana_Util::gitVersion()?>">
<link rel="stylesheet" type="text/css" href="/assets/css/font-awesome.css?v=<?=Cana_Util::gitVersion()?>">
<link rel="stylesheet" type="text/css" href="/assets/css/magnific-popup.css?v=<?=Cana_Util::gitVersion()?>">
<? if (strpos($_SERVER['HTTP_USER_AGENT'],'Windows') !== false) : ?>
<link rel="stylesheet" type="text/css" href="/assets/css/windows.css?v=<?=Cana_Util::gitVersion()?>">
<? endif ; ?>
<? endif ; ?>
<link rel="shortcut icon" href="/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">
<link href="/assets/images/startup-320x460.png" media="(-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<link href="/assets/images/startup-640x920.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<link href="/assets/images/startup-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<? /* TEMPLATES */ ?>
<? foreach (new DirectoryIterator(c::config()->dirs->view.'default/crunchbutton/frontend') as $fileInfo) : ?>
<? if (!$fileInfo->isDot()) : ?>
<script type="text/ng-template" id="assets/view/<?=$fileInfo->getBasename('.phtml')?>.html">
<?=file_get_contents($fileInfo->getPathname())?>
</script>
<? endif ; ?>
<? endforeach; ?>
<? /* END TEMPLATES */ ?>
<? if (strpos($_SERVER['HTTP_USER_AGENT'],'facebookexternalhit') !== false) : ?>
<? if ($this->restaurant->id_restaurant) : ?>
<meta property="og:title" content="<?=$this->restaurant->name?> on Crunchbutton">
<meta property="og:description" content="One click food ordering from <?=$this->restaurant->name?>. We find the best restaurants <?=$this->community->prep?> <?=$this->community->name?> and make ordering your favorite dishes as easy as one click.">
<? if ($this->restaurant->image()) : ?>
<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/cache/images/<?=$this->restaurant->facebook()->getFileName()?>">
<? else : ?>
<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/share.jpg">
<? endif ; ?>
<? elseif ($this->community->id_community) : ?>
<meta property="og:title" content="Crunchbutton - One click food ordering from <?=$this->community->name?>">
<meta property="og:description" content="We feature the top restaurants <?=$this->community->prep?> <?=$this->community->name?>. Order your favorite dishes with a click of one button from your computer or phone.">
<? foreach ($this->community->restaurants() as $restaurant) : ?>
<? if ($restaurant->image()) : ?>
<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/cache/images/<?=$restaurant->facebook()->getFileName()?>">
<? else : ?>
<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/share.jpg">
<? endif ; ?>
<? break;?>
<? endforeach; ?>
<? else : ?>
<meta property="og:title" content="Crunchbutton - One click food ordering">
<meta property="og:description" content="We feature the top restaurants in your neighborhood. Order your favorite dishes with a click of one button from your computer or phone.">
<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/share.jpg">
<? endif ; ?>
<meta property="og:type" content="company">
<meta property="og:url" content="https://<?=$_SERVER['HTTP_HOST']?><?=$_SERVER['REQUEST_URI']?>">
<meta property="og:site_name" content="Crunchbutton">
<meta property="fb:app_id" content="***REMOVED***">
<? endif ; ?>