mirror of
https://github.com/jkjoy/typecho-theme-farallon.git
synced 2026-06-27 20:34:30 +00:00
0.6.2
删除了字数统计 把douban设置移到自定义页面
This commit is contained in:
+12
-6
@@ -14,12 +14,18 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
</header>
|
||||
<div class="site--main">
|
||||
<div class="db--container"></div>
|
||||
<script>
|
||||
new Douban({
|
||||
baseAPI: '<?php $this->options->doubanID() ?>', // api
|
||||
container: ".db--container", // 容器名
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
// 获取自定义字段 douban 的值,如果不存在则使用默认值
|
||||
$douban = $this->fields->douban ? $this->fields->douban : 'https://db.imsun.org/';
|
||||
// 确保URL末尾只有一个斜杠
|
||||
$douban = rtrim($douban, '/') . '/';
|
||||
?>
|
||||
<script>
|
||||
new Douban({
|
||||
baseAPI: <?php echo json_encode($douban); ?>,
|
||||
container: ".db--container",
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
Reference in New Issue
Block a user