mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Template/Update (Part 2)
* convert landing (home) page
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
<?php namespace Aowow; ?>
|
||||
<?php
|
||||
namespace Aowow\Template;
|
||||
|
||||
use \Aowow\Lang;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php $this->brick('head'); ?>
|
||||
|
||||
</head>
|
||||
<body class="home<?=(User::isPremium() ? ' premium-logo' : null); ?>">
|
||||
<body class="home<?=($this->user::isPremium() ? ' premium-logo' : ''); ?>">
|
||||
<div id="layers"></div>
|
||||
<?php
|
||||
if ($this->homeTitle):
|
||||
echo " <script>document.title = '".$this->homeTitle."';</script>\n";
|
||||
endif;
|
||||
|
||||
if (!empty($this->featuredBox['altHomeLogo'])):
|
||||
if ($this->altHomeLogo):
|
||||
?>
|
||||
<style type="text/css">
|
||||
.home-logo {
|
||||
background: url(<?=$this->featuredBox['altHomeLogo'];?>) no-repeat center 0 !important;
|
||||
margin-bottom: 1px !important;
|
||||
background: url(<?=$this->altHomeLogo; ?>) no-repeat center 0 !important;
|
||||
margin-bottom: 1px !important;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
<div class="home-wrapper">
|
||||
<h1>Aowow</h1>
|
||||
<h1><?=$this->concat('title'); ?></h1>
|
||||
<div class="home-logo" id="home-logo"></div>
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
@@ -37,11 +40,11 @@ if (!empty($this->featuredBox['altHomeLogo'])):
|
||||
<div class="home-menu" id="home-menu"></div>
|
||||
|
||||
<?php if ($this->oneliner): ?>
|
||||
<p class="home-oneliner text" id="home-oneliner"></p>
|
||||
<p class="home-oneliner text" id="home-oneliner"></p>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?=$this->oneliner; ?>
|
||||
//]]></script>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
Markup.printHtml('<?=$this->oneliner;?>', 'home-oneliner');
|
||||
//]]></script>
|
||||
<?php elseif ($this->featuredBox): ?>
|
||||
<div class="pad"></div>
|
||||
<?php
|
||||
@@ -49,13 +52,13 @@ endif;
|
||||
|
||||
if ($this->featuredBox):
|
||||
?>
|
||||
<div class="home-featuredbox<?=(empty($this->featuredBox['extraWide']) ? null : ' home-featuredbox-extended'); ?>" style="background-image: url(<?=$this->featuredBox['boxBG']; ?>);" id="home-featuredbox">
|
||||
<div class="home-featuredbox<?=$this->featuredBox['extended'] ? ' home-featuredbox-extended' : ''; ?>" style="background-image: url(<?=$this->featuredBox['boxBG']; ?>);" id="home-featuredbox">
|
||||
<?php if ($this->featuredBox['overlays']): ?>
|
||||
<div class="home-featuredbox-links">
|
||||
<?php
|
||||
foreach ($this->featuredBox['overlays'] as $o):
|
||||
echo ' <a href="'.$o['url'].'" title="'.$o['title'].'" style="left: '.$o['left'].'px; top: 18px; width:'.$o['width'].'px; height: 160px"></a>'."\n";
|
||||
echo ' <var style="left: '.$o['left'].'px; top: 18px; width:'.$o['width'].'px; height: 160px"></var>'."\n";
|
||||
foreach ($this->featuredBox['overlays'] as ['url' => $u, 'title' => $t, 'left' => $l, 'width' => $w]):
|
||||
echo ' <a href="'.$u.'" title="'.$t.'" style="left: '.$l.'px; top: 18px; width:'.$w.'px; height: 160px"></a>'."\n";
|
||||
echo ' <var style="left: '.$l.'px; top: 18px; width:'.$w.'px; height: 160px"></var>'."\n";
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
@@ -68,13 +71,13 @@ endif;
|
||||
?>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
if (Lang::getLocale()->value):
|
||||
echo " Locale.set(".Lang::getLocale()->value.");\n";
|
||||
if ($this->locale->value):
|
||||
echo " Locale.set(".$this->locale->value.");\n";
|
||||
endif;
|
||||
echo $this->writeGlobalVars();
|
||||
echo $this->renderGlobalVars(12);
|
||||
|
||||
if ($this->featuredBox):
|
||||
echo " Markup.printHtml(".Util::toJSON($this->featuredBox['text']).", 'news-generic', { allow: Markup.CLASS_ADMIN });\n";
|
||||
echo " ".$this->featuredBox['markup'];
|
||||
endif;
|
||||
?>
|
||||
//]]></script>
|
||||
@@ -93,6 +96,8 @@ endif;
|
||||
|
||||
<?php $this->brick('pageTemplate'); ?>
|
||||
|
||||
<?php $this->localizedBrickIf($this->consentFooter, 'consent'); ?>
|
||||
|
||||
<noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?=Lang::main('jsError'); ?></b></div></noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user