This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
page-bangumi.php
65 lines (60 loc) · 2.74 KB
/
page-bangumi.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* 追番页
*
* @package custom
*/
/**
* Castle Bangumi Page
* Last Update: 2021/04/13
* Author: SatoSouta
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
if (@$_SERVER['HTTP_X_PJAX'] == true) {
header('HTTP/1.1 200 OK');
echo '<title>' . Castle_Header::title($this, '', ' - ', true, false) . '</title>';
echo '<div id="moe-pjax-content"' . Castle_Header::cardTransparent() . '>';
} else {
$this->need('core/inc/header.php');
}
?>
<meta name="referrer" content="same-origin">
<div class="mdui-card moe-post-card moe-bangumi-page-card" <?php if (Helper::options()->TocSwitch == '1') { ?> data-toc="<?php echo ($this->fields->showToc) ? 'true' : 'false'; ?>" <?php } ?>>
<div class="mdui-card-media">
<div class="moe-card-cover-image lazyload" data-src="<?php
$cover = $this->fields->cover;
if (!empty($cover)) {
echo $cover;
} else {
Castle_Libs::randCover(true);
}
?>" style="background-image:url('');"></div>
<div class="mdui-card-media-covered">
<div class="mdui-card-primary">
<div class="mdui-card-primary-title mdui-text-truncate"><?php $this->title() ?></div>
<div class="mdui-card-primary-subtitle"><?php echo sprintf($GLOBALS['CastleLang']['page']['view'], Castle_Contents::PostView($this)); ?> | <?php echo sprintf($GLOBALS['CastleLang']['page']['comment'], $this->commentsNum); ?></div>
</div>
</div>
</div>
<div class="moe-card-content">
<?php if (Castle_Libs::hasPlugin('Castle')) : ?>
<div class="mdui-row" id="bangumi-box" data-auth="<?php echo (Castle_Libs::hasPlugin('Castle')) ? Castle_Plugin::getAuth('bangumi') : 'false'; ?>" data-offset="0">
</div>
<div class="moe-bangumi-load-more">
<button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent" disabled>加载更多</button>
</div>
<?php else : ?>
<div class="bangumi-plugin-disable">
<span>配套插件未启用!</span>
</div>
<?php endif; ?>
</div>
</div>
<?php $this->need('core/inc/comments.php'); ?>
<?php
if (@$_SERVER['HTTP_X_PJAX'] == true) {
echo '</div>';
} else {
$this->need('core/inc/footer.php');
}
?>