Add headPic & notification
This commit is contained in:
parent
f805b7c69c
commit
1624653cc0
|
@ -1,8 +1,8 @@
|
|||
# Sky
|
||||
|
||||
敬我们对生活的热爱。
|
||||
> 敬我们对生活的热爱。
|
||||
|
||||
简约·多彩·响应式 Typecho 主题。基于 Argon 框架。
|
||||
Sky 是一个简洁的 Typecho 主题,基于 Argon 框架。
|
||||
|
||||
demo:[skywt.cn](https://skywt.cn/)
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ function themeConfig($form) {
|
|||
$nisInfo = new Typecho_Widget_Helper_Form_Element_Text('nisInfo', NULL, NULL, _t('网安备案号'), _t('显示在底部,留空则不显示'));
|
||||
$form->addInput($nisInfo->addRule('xssCheck', _t('请不要使用特殊字符')));
|
||||
|
||||
$notification = new Typecho_Widget_Helper_Form_Element_Text('notification', NULL, NULL, _t('网站公告'), _t('显示在首页,留空则不显示'));
|
||||
$form->addInput($notification);
|
||||
|
||||
$travelling = new Typecho_Widget_Helper_Form_Element_Radio('travelling',
|
||||
array('able' => _t('启用'),
|
||||
'disable' => _t('禁止'),
|
||||
|
|
10
index.php
10
index.php
|
@ -13,15 +13,20 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
|||
?>
|
||||
|
||||
<div class="col mt-5" id="main" role="main">
|
||||
<div class="alert alert-primary alert-dismissible fade show" role="alert">
|
||||
Hi! 这是一个正在开发中的网站。原网站:<a class="text-secondary" href="https://skywt.cn/">skywt.cn</a>
|
||||
<?php if ($this->options->notification !='') { ?>
|
||||
<div class="alert alert-primary alert-dismissible fade show shadow" role="alert">
|
||||
<?php $this->options->notification(); ?>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php while($this->next()): ?>
|
||||
<article class="mt-5 mb-5" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<?php if ($this->fields->headPic !='') { ?>
|
||||
<img src=<?php $this->fields->headPic(); ?> class="img-fluid mx-auto d-block shadow rounded mb-3" alt="<?php $this->title(); ?>">
|
||||
<?php } ?>
|
||||
<h1 class="font-weight-bold post-title" itemprop="name headline">
|
||||
<a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
|
||||
</h1>
|
||||
|
@ -38,6 +43,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
|||
<?php $this->content('More...'); ?>
|
||||
</div>
|
||||
</article>
|
||||
<hr>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<!-- 210720 pageNav 的实现方式,有待改进 -->
|
||||
|
|
Loading…
Reference in New Issue