mirror of
https://github.com/typecho/typecho.git
synced 2025-04-22 10:43:57 +02:00
fix theme classic-22
This commit is contained in:
parent
fd013a7508
commit
7415b5ba76
@ -16,3 +16,24 @@ function themeConfig($form)
|
||||
|
||||
$form->addInput($themeStyle);
|
||||
}
|
||||
|
||||
function postMeta(
|
||||
\Widget\Archive $archive,
|
||||
string $metaType = 'archive'
|
||||
)
|
||||
{
|
||||
?>
|
||||
<header class="entry-header text-center">
|
||||
<h1 class="entry-title" itemprop="name headline">
|
||||
<a href="<?php $archive->permalink() ?>" itemprop="url"><?php $archive->title() ?></a>
|
||||
</h1>
|
||||
<?php if ($metaType != 'page'): ?>
|
||||
<ul class="entry-meta list-inline text-muted">
|
||||
<li><i data-feather="calendar" class="is-sm me-2"></i><time datetime="<?php $archive->date('c'); ?>" itemprop="datePublished"><?php $archive->date(); ?></time></li>
|
||||
<li><i data-feather="folder" class="is-sm me-2"></i><?php $archive->category(', '); ?></li>
|
||||
<li><i data-feather="message-circle" class="is-sm me-2"></i><a href="<?php $archive->permalink() ?>#comments" itemprop="discussionUrl"><?php $archive->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></a></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<?php
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
<title><?php $this->archiveTitle('', '', ' - '); ?><?php $this->options->title(); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/css/style.css'); ?>">
|
||||
<link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css">
|
||||
<script src="//unpkg.com/feather-icons"></script>
|
||||
|
||||
<?php $this->header(); ?>
|
||||
|
@ -16,20 +16,18 @@ $this->need('header.php');
|
||||
<div class="container-thin">
|
||||
<?php if (!($this->is('index')) and !($this->is('post'))): ?>
|
||||
<h4 class="text-center text-muted">
|
||||
<?php $this->archiveTitle('', '', ''); ?>
|
||||
<?php $this->archiveTitle([
|
||||
'category' => _t('分类 %s 下的文章'),
|
||||
'search' => _t('包含关键字 %s 的文章'),
|
||||
'tag' => _t('标签 %s 下的文章'),
|
||||
'author' => _t('%s 发布的文章')
|
||||
], '', ''); ?>
|
||||
</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php while ($this->next()): ?>
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="entry-header text-center">
|
||||
<h1 class="entry-title" itemprop="name headline"><a href="<?php $this->permalink() ?>" itemprop="url"><?php $this->title() ?></a></h1>
|
||||
<ul class="entry-meta list-inline text-muted">
|
||||
<li><i data-feather="calendar" class="is-sm me-2"></i><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></li>
|
||||
<li><i data-feather="folder" class="is-sm me-2"></i><?php $this->category(', '); ?></li>
|
||||
<li><i data-feather="message-circle" class="is-sm me-2"></i><a href="<?php $this->permalink() ?>#comments" itemprop="discussionUrl"><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></a></li>
|
||||
</ul>
|
||||
</header>
|
||||
<?php postMeta($this); ?>
|
||||
|
||||
<div class="entry-content fmt" itemprop="articleBody">
|
||||
<?php $this->content(_t('阅读剩余部分')); ?>
|
||||
|
@ -4,11 +4,8 @@
|
||||
<main class="container">
|
||||
<div class="container-thin">
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="entry-header text-center">
|
||||
<h1 class="entry-title" itemprop="name headline"><a itemprop="url"
|
||||
href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
|
||||
</header>
|
||||
|
||||
<?php postMeta($this, 'page'); ?>
|
||||
|
||||
<div class="entry-content fmt" itemprop="articleBody">
|
||||
<?php $this->content(); ?>
|
||||
</div>
|
||||
|
@ -4,31 +4,23 @@
|
||||
<main class="container">
|
||||
<div class="container-thin">
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="entry-header text-center">
|
||||
<h1 class="entry-title" itemprop="name headline"><a itemprop="url"
|
||||
href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
|
||||
<ul class="entry-meta list-inline text-muted">
|
||||
<li><i data-feather="calendar" class="is-sm me-2"></i><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></li>
|
||||
<li><i data-feather="folder" class="is-sm me-2"></i><?php $this->category(', '); ?></li>
|
||||
<li><i data-feather="message-circle" class="is-sm me-2"></i><a href="#comments" itemprop="discussionUrl"><?php $this->commentsNum('暂无评论', '1 条评论', '%d 条评论'); ?></a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<?php postMeta($this, 'post'); ?>
|
||||
|
||||
<div class="entry-content fmt" itemprop="articleBody">
|
||||
<?php $this->content(); ?>
|
||||
<p itemprop="keywords"><?php _e('标签:'); ?><?php $this->tags(', ', true, '无'); ?></p>
|
||||
<p itemprop="keywords"><?php _e('标签'); ?>:<?php $this->tags(', ', true, _t('无')); ?></p>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="grid post-next">
|
||||
<div>
|
||||
<div class="text-muted">« 上一篇</div>
|
||||
<?php $this->thePrev('%s', '没有了'); ?>
|
||||
<div class="text-muted">« <?php _e('上一篇'); ?></div>
|
||||
<?php $this->thePrev('%s', _t('没有了')); ?>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<div class="text-muted">下一篇 »</div>
|
||||
<?php $this->theNext('%s', '没有了'); ?>
|
||||
<div class="text-muted">« <?php _e('下一篇'); ?></div>
|
||||
<?php $this->theNext('%s', _t('没有了')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user