forked from laysense/laysense.cn
Migrate Laysense to upstream LaySite 1.4.3 with external site data
This commit is contained in:
+19
-49
@@ -2,56 +2,26 @@
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
$data = $footer['payload'];
|
||||
$brand = $data['brand'] ?: $site['name'];
|
||||
?>
|
||||
<footer class="site-footer" id="contact"<?= empty($hideFooter) ? '' : ' hidden' ?>>
|
||||
<div class="wrap">
|
||||
<div class="footer-grid">
|
||||
<div class="footer-company" itemscope itemtype="https://schema.org/Organization">
|
||||
<?php if ($footer['logo'] !== ''): ?>
|
||||
<a class="footer-logo" href="/" itemprop="url" aria-label="来笙 Laysense 首页">
|
||||
<img src="<?= $e($footer['logo']) ?>" alt="<?= $e($footer['alt']) ?>" width="130" height="33" itemprop="logo" loading="lazy">
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<p itemprop="name"><?= $e($footer['name']) ?></p>
|
||||
<?php if ($footer['address']): ?><address itemprop="address"><?= $e($footer['address']) ?></address><?php endif ?>
|
||||
<?php if ($footer['email']): ?>
|
||||
<a itemprop="email" href="mailto:<?= $e($footer['email']) ?>"><?= $e($footer['email']) ?></a>
|
||||
<?php endif ?>
|
||||
<p class="footer-payment-label">支持的付款方式</p>
|
||||
<div class="payment-methods" aria-label="支持的付款方式">
|
||||
<img src="/assets/original/payment-taobao.png" alt="淘宝" width="26" height="26" loading="lazy">
|
||||
<img src="/assets/original/payment-alipay.png" alt="支付宝" width="26" height="26" loading="lazy">
|
||||
<img src="/assets/original/payment-wechat.png" alt="微信支付" width="26" height="26" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
<nav class="footer-links" aria-label="页脚导航">
|
||||
<?php foreach (['products', 'company', 'resources'] as $group): ?>
|
||||
<?php if (!$footer[$group] && $footer[$group . '_title'] === '') { continue; } ?>
|
||||
<div>
|
||||
<?php if ($footer[$group . '_title'] !== ''): ?><h2 class="footer-label"><?= $e($footer[$group . '_title']) ?></h2><?php endif ?>
|
||||
<?php if ($footer[$group]): ?>
|
||||
<ul>
|
||||
<?php foreach ($footer[$group] as [$url, $label]): ?><li><a href="<?= $e($url) ?>"><?= $e($label) ?></a></li><?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="footer-meta">
|
||||
<?php if ($footer['copyright']): ?><p><?= $e($footer['copyright']) ?></p><?php endif ?>
|
||||
<?php if ($footer['email'] || $footer['phones']): ?>
|
||||
<p>
|
||||
<?php if ($footer['email']): ?><a href="mailto:<?= $e($footer['email']) ?>"><?= $e($footer['email']) ?></a><?php endif ?>
|
||||
<?php if ($footer['phones']): ?>全球号码:
|
||||
<?php foreach ($footer['phones'] as $index => [$url, $label]): ?>
|
||||
<?= $index ? ' / ' : '' ?><a href="<?= $e($url) ?>"><?= $e($label) ?></a>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<footer class="site-footer site-footer-<?= $e($footer['preset']) ?>" id="contact"<?= $showFooter ? '' : ' hidden' ?>>
|
||||
<div class="wrap site-footer-components">
|
||||
<?php foreach ($data['components'] as $component): ?>
|
||||
<?php if ($component === 'brand'): ?>
|
||||
<a class="wordmark site-brand" href="/" aria-label="<?= $e($brand) ?>,首页">
|
||||
<?php if ($data['logo'] !== ''): ?><img src="<?= $e($data['logo']) ?>" alt="<?= $e($brand) ?>" loading="lazy"><?php else: ?><?= $e($brand) ?><?php endif ?>
|
||||
</a>
|
||||
<?php elseif ($component === 'text' && $data['text'] !== ''): ?>
|
||||
<p class="site-footer-text"><?= $e($data['text']) ?></p>
|
||||
<?php elseif ($component === 'links' && $data['links']): ?>
|
||||
<nav class="site-footer-nav" aria-label="页脚导航">
|
||||
<?php foreach ($data['links'] as [$url, $label]): ?><a href="<?= $e($url) ?>"><?= $e($label) ?></a><?php endforeach ?>
|
||||
</nav>
|
||||
<?php elseif ($component === 'legal' && $data['legal'] !== ''): ?>
|
||||
<small><?= $e($data['legal']) ?></small>
|
||||
<?php endif ?>
|
||||
<?php if ($footer['terms']): ?><p class="footer-terms"><?= $e($footer['terms']) ?></p><?php endif ?>
|
||||
<?php if ($footer['registration']): ?><p><a href="https://beian.miit.gov.cn/"><?= $e($footer['registration']) ?></a></p><?php endif ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<small class="site-footer-credit">Powered by <a href="https://laysense.cn/laysite">LaySite</a></small>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user