This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
page-links.php
41 lines (41 loc) · 1.63 KB
/
page-links.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 链接
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php if (!empty($this->options->Breadcrumbs) && in_array('Pageshow', $this->options->Breadcrumbs)) : ?>
<div class="mdui-card mdr-breadcrumbs">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons"></i></span>
<span class="mdui-chip-title">
<a href="<?php $this->options->siteUrl(); ?>"><?= _t('首页') ?></a> » <?php $this->title() ?>
</span>
</div>
<?php endif; ?>
<article id="post" class="mdr-post mdui-card mdui-shadow-6" style="margin-top:20px;">
<div class="mdui-card-primary">
<div class="mdui-card-primary-title"><?php $this->title() ?></div>
<div class="mdui-card-primary-subtitle">Links</div>
</div>
<div class="mdui-card-content mdui-typo" style="padding: 0px 16px 16px 16px;">
<?php $this->content(); ?>
</div>
</article>
<div class="mdui-row-xs-1 mdui-row-sm-2 mdui-row-md-3" style="margin: -16px -8px 0;">
<?php Links(); ?>
<?php if ($this->options->RandomLinks) : ?>
<script>
var cards = document.getElementsByClassName('mdui-col');
for (var i = 0; i < cards.length; i++) {
var target1 = Math.floor(Math.random() * cards.length - 1) + 1;
var target2 = Math.floor(Math.random() * cards.length - 1) + 1;
cards[target1].before(cards[target2]);
}
</script>
<?php endif; ?>
</div>
<?php $this->need('comments.php'); ?>
<?php $this->need('footer.php'); ?>