-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
44 lines (39 loc) · 1.18 KB
/
functions.php
File metadata and controls
44 lines (39 loc) · 1.18 KB
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
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form)
{
$logoUrl = new \Typecho\Widget\Helper\Form\Element\Text(
'logoUrl',
null,
null,
'网站 Logo',
'在这里填写图片 URL,网站将显示 Logo'
);
$form->addInput($logoUrl->addRule('url', _t('请填写正确的 URL 地址')));
$gudianFont = new \Typecho\Widget\Helper\Form\Element\Select(
'gudianFont',
array(
'gudian' => '繁体',
'standard' => '简体'
),
'standard',
_t('文字风格'),
_t('如果选择了繁体,将会使用 文悦古典明朝体')
);
$form->addInput($gudianFont);
}
function postMeta(\Widget\Archive $archive)
{
?>
<div class="post-meta">
<div class="post-title">
<a class="post-title-text" href="<?php $archive->permalink() ?>"><?php $archive->title() ?></a>
<?php if(!empty($archive->tags)): ?>
<span class="post-tags">(<?php $archive->tags('、', false); ?>)</span>
<?php endif; ?>
</div>
<div class="post-author"><?php $archive->author(); ?></div>
</div>
<?php
}
?>