Skip to content

Commit 0cc7b72

Browse files
committed
v0.4.4.3
1 parent 64b932e commit 0cc7b72

6 files changed

Lines changed: 51 additions & 3 deletions

File tree

_includes/nav.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
<a class="nav-link <?php echo $this->is('page', $pages->slug)?'active':''; ?>"
5555
href="<?php $pages->permalink(); ?>"><?php $pages->title(); ?></a>
5656
<?php endwhile; ?>
57+
<?php if(array_key_exists('MorechoCore', Typecho_Plugin::export()['activated'])): ?>
58+
<?php if($this->options->linkAbout != '0'): ?>
59+
<a class="nav-link <?php echo $this->is('author', $this->options->linkAbout)?'active':''; ?>"
60+
href="/author/<?php echo $this->options->linkAbout; ?>">关于</a>
61+
<?php endif; ?>
62+
<?php if($this->options->linkFriends != '0'): ?>
63+
<a class="nav-link <?php echo $this->is('Morecho_link_page')?'active':''; ?>"
64+
href="/link/"><?php echo $this->options->linkFriends; ?></a>
65+
<?php endif; ?>
66+
<?php endif; ?>
5767
</nav>
5868
</div>
5969
<div data-tab="folder">

asserts/js/article.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ window.article = function ($){
6969
toast('复制失败');
7070
e.clearSelection();
7171
});
72-
}catch{}
72+
}catch(e){}
7373
$('article img').each(function(){
7474
if($(this).attr('alt') === undefined || $(this).attr('alt').length === 0) return 0;
7575
var $imgalt = $('<div/>').addClass('alt').text($(this).attr('alt'));
@@ -131,7 +131,7 @@ window.article = function ($){
131131
var sizescale = image.width > image.height ? 1 : image.width/image.height;
132132
$(this).parent().css('max-width', parseInt(sizescale*30)+'%');
133133
})
134-
}catch{}
134+
}catch(e){}
135135
try{
136136
tocbot.init({
137137
tocSelector: '.js-toc',

docs/Q&A.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@
1212

1313
目前主要支持 Chrome Firefox Safari,其他浏览器bug随缘修复,IE浏览器bug不予修复(懒
1414

15+
### 初步的浏览器兼容性排查
16+
17+
*除了特殊标注的皆为 win10最新正式版 + 浏览器最新正式版 + 所谓的极速模式*
18+
体验基本一致的浏览器:
19+
- Chrome
20+
- Firefox
21+
- Safari
22+
- QQ
23+
- 2345
24+
其他的浏览器:
25+
- Sogou 对DPI缩放支持不好
26+
- 猎豹 对DPI缩放支持不好
27+
- 360 对DPI缩放支持不好,默认使用宋体(丢掉
28+
- 360急速 对DPI缩放支持不好,默认使用宋体,默认字号字重混乱(丢掉
29+
- 傲游 默认使用宋体,默认字重较小(宋体即原罪
30+
31+
### 某些浏览器评论报错
32+
33+
Typecho的锅,某些浏览器的ua太长超过了数据库限制,找到数据库中的`comments`表,将`agent`字段的长度修改为`512`,或者执行SQL指令,将指令中的`typecho`前缀更改成你的前缀
34+
```
35+
ALTER TABLE `typecho_comments` CHANGE `agent` `agent` VARCHAR(512)
36+
```
37+
1538
## 如何更换头像源
1639

1740
在Typecho根目录下的config.inc.php文件中添加下面内容。你会在文件中发现类似于下面这行的内容,添加到它们前后就可以了

docs/_sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
* 起步
2-
* [开始使用](/start.md)
2+
* [快速开始](/start.md)
33
* 配置
44
* [主题配置](/theme.md)
55
* [插件配置](/plugins.md)

docs/theme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
1. 首行缩进
88
建议在长文本文章中启用,无脑将所有行首行缩进两个全角字符,实现方式比较粗暴
99

10+
## 评论
11+
12+
评论区按照常见的从第二层开始不再缩进的排列方式展示,如果你有更好的排列方式可以提出建议。
13+
Typecho 默认评论区层数限制是2-7,如果你想修改这个限制可以打开Typecho的文件,在`/var/Widget/Options/Discussion.php``206`
14+
```
15+
206| $settings['commentsMaxNestingLevels'] = min(7, max(2, intval($settings['commentsMaxNestingLevels'])));
16+
```
17+
修改其中的7和2即可修改限制
18+
1019
## 额外页面
1120

1221
### 全部文章归档

functions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ function themeConfig($form)
2424
// 自定义名称
2525
$owner = new Typecho_Widget_Helper_Form_Element_Text('owner', NULL, NULL, _t('博主名称'), _t('在这里填入侧栏要显示的博主名称'));
2626
$form->addInput($owner->addRule('xssCheck', _t('请不要使用特殊字符')));
27+
// 关于链接
28+
$linkAbout = new Typecho_Widget_Helper_Form_Element_Text('linkAbout', NULL, NULL, _t('添加“关于”链接'), _t('仅在启用MorechoFriends插件时生效,填入你的用户id(一般为1)即显示地址为<code>/author/ID</code>名为“关于”的链接,填入0不显示链接'));
29+
$form->addInput($linkAbout->addRule('xssCheck', _t('请不要使用特殊字符')));
30+
// 友链链接
31+
$linkFriends = new Typecho_Widget_Helper_Form_Element_Text('linkFriends', NULL, NULL, _t('添加“友链”链接'), _t('仅在启用MorechoFriends插件时生效,链接地址为<code>/link/</code>,在此填入链接名称,填0即不显示链接'));
32+
$form->addInput($linkFriends->addRule('xssCheck', _t('请不要使用特殊字符')));
2733
// 自定义音乐名称
2834
$musicName = new Typecho_Widget_Helper_Form_Element_Text('musicName', NULL, NULL, _t('音乐播放器显示的标题'), _t(''));
2935
$form->addInput($musicName->addRule('xssCheck', _t('请不要使用特殊字符')));

0 commit comments

Comments
 (0)