This commit is contained in:
杜恒 2021-02-05 18:27:44 +08:00
parent 08c9f2fdd4
commit 0425121f77
12 changed files with 225 additions and 47 deletions

File diff suppressed because one or more lines are too long

View File

@ -1292,8 +1292,6 @@ html[data-night='night'] {
p { p {
color: var(--routine); color: var(--routine);
line-height: 26px; line-height: 26px;
white-space: pre-wrap;
word-spacing: 5px;
letter-spacing: 1px; letter-spacing: 1px;
word-break: break-all; word-break: break-all;
margin-bottom: 15px; margin-bottom: 15px;
@ -1301,8 +1299,6 @@ html[data-night='night'] {
blockquote { blockquote {
color: var(--routine); color: var(--routine);
line-height: 26px; line-height: 26px;
white-space: pre-wrap;
word-spacing: 5px;
letter-spacing: 1px; letter-spacing: 1px;
word-break: break-all; word-break: break-all;
margin-bottom: 15px; margin-bottom: 15px;
@ -1535,6 +1531,100 @@ html[data-night='night'] {
} }
} }
} }
&-card {
margin: 0 auto 15px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: var(--radius-inner);
border: 1px solid var(--classC);
background: var(--background);
.title {
padding: 8px 10px;
border-bottom: 1px solid var(--classC);
color: var(--main);
user-select: none;
}
.content {
padding: 10px;
color: var(--routine);
}
}
&-message {
position: relative;
border-left-width: 4px;
border-left-style: solid;
padding: 10px 15px;
border-radius: 0 4px 4px 0;
&:hover {
.icon {
transform: rotate(360deg);
}
}
.icon {
position: absolute;
top: -9px;
left: -11px;
width: 18px;
height: 18px;
border-radius: 50%;
transition: transform 0.85s;
&::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
fill: #fff;
background-repeat: no-repeat;
background-size: 100% 100%;
}
}
&.success {
border-left-color: #2bde3f;
background: #2bde3f20;
color: #2bde3f;
.icon {
background: #2bde3f;
&::before {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MDE1ODgxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQxMTU3IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik00MTMuMjU1IDY5MS40MzZjMTguNTQ2LTE3LjQ1IDMzLjE4Ni0zMC41NTIgNDcuMDc2LTQ0LjQyNyAxMzMuMDQtMTMyLjgxIDI2Ni4xODItMjY1LjUxMyAzOTguNzI0LTM5OC44MzcgMzIuMDc0LTMyLjI0NCA2NS42NjYtNDguNDUyIDEwNC45OTctMTQuNzUyIDMyLjk4MyAyOC4yNDEgMjguMDQ5IDY3LjQ2NS0xMi45MiAxMDguNTc0LTE1Ny4xNzUgMTU3LjcxLTMxNC41ODcgMzE1LjE4NC00NzIuMjkyIDQ3Mi4zOC00OS4zODkgNDkuMjI1LTc2LjMwOCA0OS41NDYtMTI0LjcxNiAxLjYwNy04NS41OS04NC43NjUtMTcwLjEzNS0xNzAuNTc5LTI1NS44LTI1NS4yNTctMzIuMjkyLTMxLjkyMy00OC42OC02NS41MTYtMTQuOTk3LTEwNC45NzYgMjguMTctMzIuOTk1IDY3LjU1Ny0yOC4xNTUgMTA4LjU1OCAxMi42NzUgNzMuNDI3IDczLjE2IDE0Ni4wNzkgMTQ3LjA5IDIyMS4zNyAyMjMuMDEzeiIgcC1pZD0iNDExNTgiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48L3N2Zz4=);
}
}
}
&.info {
border-left-color: #1d72f3;
background: #1d72f320;
color: #1d72f3;
.icon {
background: #1d72f3;
&::before {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MzM4MjIxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjYxNjg0IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik03NjcuOTczOTc1IDExNi4zNDYwODZjMCA2NC4yNTI3MzQtNDEuNjgzMjE0IDExNi4zODg3NS05My4wOTM5MzUgMTE2LjM4ODc1UzU4MS43ODYxMDYgMTgwLjU5ODgyIDU4MS43ODYxMDYgMTE2LjM0NjA4NkM1ODEuNzg2MTA2IDUyLjA5MzM1MiA2MjMuNDY5MzIgMCA2NzQuODgwMDQgMFM3NjcuOTczOTc1IDUyLjA5MzM1MiA3NjcuOTczOTc1IDExNi4zNDYwODZ6TTI1NiA1MDQuMjk0MzY1czcwLjgyMzA2Ni0yODQuNzg1NTIzIDI4Ni43NDgwOS0yNzEuMDQ3NTU1YzIxNS45MjUwMjQgMTMuNjk1MzA0IDY3LjIzOTI0OSAyNjEuNDQ4MDQzLTEzLjI2ODY1OSA1MDEuNjQ5MTY2LTgwLjUwNzkwOCAyNDAuMjAxMTIzIDEwMC4yNjE1NyA3MS40MjAzNjkgMTQ1LjQwMDYwOS03LjU1MTYxNiAwIDAtOTMuMTM2NTk5IDQwNi43NjMzMjMtMzY3LjM0MTMyNyAyNjcuNjc3MDYtMTI4LjU0ODEzMi02NS4yMzQwMTcgMzIuMjU0MzYtMzk4LjA1OTc2NSAxMDMuMTIwMDkyLTU0NS41OTM1OTlDNDgxLjU2NzIgMzAxLjgwODY1OCAzMzYuNjM1OTAxIDM4Ny42MDY5NjMgMjU2IDUwNC4yNTE3MDF6IiBmaWxsPSIjZmZmZmZmIiBwLWlkPSI2MTY4NSI+PC9wYXRoPjwvc3ZnPg==);
}
}
}
&.warning {
border-left-color: #ffc007;
background: #ffc00720;
color: #ffc007;
.icon {
background: #ffc007;
&::before {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MTI5NTE1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ3NDkyIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik00NzkuODE3MTQzIDY2NS42YzEwLjI0IDMwLjcyIDMwLjcyIDUxLjIgNjEuNDQgNTEuMnM1MS4yLTIwLjQ4IDYxLjQ0LTUxLjJsNDAuOTYtNTYzLjJDNjQzLjY1NzE0MyA0MC45NiA1OTIuNDU3MTQzIDAgNTQxLjI1NzE0MyAwIDQ3OS44MTcxNDMgMCA0MzguODU3MTQzIDUxLjIgNDM4Ljg1NzE0MyAxMTIuNjRsNDAuOTYgNTUyLjk2eiBtNjEuNDQgMTUzLjZjLTYxLjQ0IDAtMTAyLjQgNDAuOTYtMTAyLjQgMTAyLjQgMCA2MS40NCA0MC45NiAxMDIuNCAxMDIuNCAxMDIuNCA2MS40NCAwIDEwMi40LTQwLjk2IDEwMi40LTEwMi40IDAtNjEuNDQtNDAuOTYtMTAyLjQtMTAyLjQtMTAyLjR6IiBwLWlkPSI0NzQ5MyIgZmlsbD0iI2ZmZmZmZiI+PC9wYXRoPjwvc3ZnPg==);
}
}
}
&.error {
border-left-color: #f56c6c;
background: #f56c6c20;
color: #f56c6c;
.icon {
background: #f56c6c;
&::before {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MjAyNDk4IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ4OTE1IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik0xOTMuOCA4MzAuMmMtMTkuNC0xOS40LTE5LjQtNTEuMyAwLTcwLjdsNTY1LjctNTY1LjdjMTkuNC0xOS40IDUxLjMtMTkuNCA3MC43IDAgMTkuNCAxOS40IDE5LjQgNTEuMyAwIDcwLjdMMjY0LjUgODMwLjJjLTE5LjQgMTkuNC01MS4zIDE5LjQtNzAuNyAweiIgZmlsbD0iI2ZmZmZmZiIgcC1pZD0iNDg5MTYiPjwvcGF0aD48cGF0aCBkPSJNODMwLjIgODMwLjJjLTE5LjQgMTkuNC01MS4zIDE5LjQtNzAuNyAwTDE5My44IDI2NC41Yy0xOS40LTE5LjQtMTkuNC01MS4zIDAtNzAuNyAxOS40LTE5LjQgNTEuMy0xOS40IDcwLjcgMGw1NjUuNyA1NjUuN2MxOS40IDE5LjQgMTkuNCA1MS4zIDAgNzAuN3oiIGZpbGw9IiNmZmZmZmYiIHAtaWQ9IjQ4OTE3Ij48L3BhdGg+PC9zdmc+);
}
}
}
}
} }
&__agree { &__agree {
display: flex; display: flex;

File diff suppressed because one or more lines are too long

View File

@ -92,7 +92,7 @@
display: block; display: block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: var(--radius-wrap);
.thumb { .thumb {
position: relative; position: relative;
width: 100%; width: 100%;

View File

@ -83,17 +83,48 @@ function themeFields($layout)
'off' => '关闭' 'off' => '关闭'
), ),
'on', 'on',
'是否开启当前页面的侧边栏', '是否开启当前页侧边栏',
'介绍:用于单独设置当前页侧边栏的开启状态 <br /> '介绍:用于单独设置当前页侧边栏的开启状态 <br />
注意:只有在外观设置侧边栏开启状态下生效' 注意:只有在外观设置侧边栏开启状态下生效'
); );
$layout->addItem($aside); $layout->addItem($aside);
$keywords = new Typecho_Widget_Helper_Form_Element_Text(
'keywords',
NULL,
NULL,
'SEO关键词非常重要',
'介绍用于设置当前页SEO关键词 <br />
注意:多个关键词使用英文逗号进行隔开 <br />
例如Typecho,Typecho主题,Typecho模板'
);
$layout->addItem($keywords);
$description = new Typecho_Widget_Helper_Form_Element_Textarea(
'description',
NULL,
NULL,
'SEO描述语非常重要',
'介绍用于设置当前页SEO描述语 <br />
注意SEO描述语不应当过长也不应当过少'
);
$layout->addItem($description);
$abstract = new Typecho_Widget_Helper_Form_Element_Textarea(
'abstract',
NULL,
NULL,
'自定义摘要(非必填)',
'填写时:将会显示填写的摘要 <br>
不填写时:默认取文章里的内容'
);
$layout->addItem($abstract);
$thumb = new Typecho_Widget_Helper_Form_Element_Textarea( $thumb = new Typecho_Widget_Helper_Form_Element_Textarea(
'thumb', 'thumb',
NULL, NULL,
NULL, NULL,
'自定义文章缩略图', '自定义缩略图(非必填)',
'填写时:将会显示填写的文章缩略图 <br> '填写时:将会显示填写的文章缩略图 <br>
不填写时:<br> 不填写时:<br>
1、若文章有图片则取文章内图片 <br> 1、若文章有图片则取文章内图片 <br>
@ -101,14 +132,4 @@ function themeFields($layout)
3、若文章无图片,并且外观设置里填写了·自定义缩略图·选项,则取自定义缩略图图片' 3、若文章无图片,并且外观设置里填写了·自定义缩略图·选项,则取自定义缩略图图片'
); );
$layout->addItem($thumb); $layout->addItem($thumb);
$abstract = new Typecho_Widget_Helper_Form_Element_Textarea(
'abstract',
NULL,
NULL,
'自定义文章摘要',
'填写时:将会显示填写的摘要 <br>
不填写时:默认取文章里的内容'
);
$layout->addItem($abstract);
} }

View File

@ -8,13 +8,13 @@ function _parseContent($post, $login)
{ {
/* 优先判断文章内是否有回复可见的内容 */ /* 优先判断文章内是否有回复可见的内容 */
$content = $post->content; $content = $post->content;
if (preg_match('/\[hide\].{0,}\[\/hide\]/s', $content)) { if (preg_match('/\[hide\].{0,}\[\/hide\]/sSU', $content)) {
$db = Typecho_Db::get(); $db = Typecho_Db::get();
$hasComment = $db->fetchAll($db->select()->from('table.comments')->where('cid = ?', $post->cid)->where('mail = ?', $post->remember('mail', true))->limit(1)); $hasComment = $db->fetchAll($db->select()->from('table.comments')->where('cid = ?', $post->cid)->where('mail = ?', $post->remember('mail', true))->limit(1));
if ($hasComment || $login) { if ($hasComment || $login) {
$content = preg_replace('/\[hide\](.{0,})\[\/hide\]/s', '$1', $content); $content = preg_replace('/\[hide\](.{0,})\[\/hide\]/sSU', '$1', $content);
} else { } else {
$content = preg_replace('/\[hide\](.{0,})\[\/hide\]/s', '<span class="joe_detail__article-hide block">此处内容作者设置了 <i>回复</i> 可见</span>', $content); $content = preg_replace('/\[hide\](.{0,})\[\/hide\]/sSU', '<span class="joe_detail__article-hide block">此处内容作者设置了 <i>回复</i> 可见</span>', $content);
} }
} }
$content = _parseShortCode($content); $content = _parseShortCode($content);

View File

@ -3,53 +3,76 @@
function _parseShortCode($content) function _parseShortCode($content)
{ {
/* 过滤网易云音乐歌单 */ /* 过滤网易云音乐歌单 */
if (preg_match('/\[music-list\s{0,}id="\d{0,}"\s{0,}\/\]/', $content)) { if (preg_match('/\[music-list\s{0,}id="\d{0,}"\s{0,}\/\]/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\[music-list\s{0,}id="(\d{0,})"\s{0,}\/]/', '/\[music-list\s{0,}id="(\d{0,})"\s{0,}\/]/SU',
'<iframe width="330" height="450" src="//music.163.com/outchain/player?type=0&id=$1&auto=0&height=430"></iframe>', '<iframe width="330" height="450" src="//music.163.com/outchain/player?type=0&id=$1&auto=0&height=430"></iframe>',
$content $content
); );
} }
/* 过滤网易云音乐单首歌 */ /* 过滤网易云音乐单首歌 */
if (preg_match('/\[music\s{0,}id="\d{0,}"\s{0,}\/\]/', $content)) { if (preg_match('/\[music\s{0,}id="\d{0,}"\s{0,}\/\]/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\[music\s{0,}id="(\d{0,})"\s{0,}\/\]/', '/\[music\s{0,}id="(\d{0,})"\s{0,}\/\]/SU',
'<iframe width="330" height="86" src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66"></iframe>', '<iframe width="330" height="86" src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66"></iframe>',
$content $content
); );
} }
/* 过滤bilibili播放器 */
if (preg_match('/\[bilibili\s{0,}bvid="\w{0,}"\s{0,}\/\]/', $content)) {
$content = preg_replace(
'/\[bilibili\s{0,}bvid="(\w{0,})"\s{0,}\/\]/',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="//player.bilibili.com/player.html?bvid=$1"></iframe>',
$content
);
}
/* 过滤dplayer播放器 */ /* 过滤dplayer播放器 */
if (preg_match('/\[dplayer\s{0,}src=".{0,}"\s{0,}\/\]/', $content)) { if (preg_match('/\[dplayer\s{0,}src=".{0,}"\s{0,}\/\]/SU', $content)) {
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url='; $player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=';
$content = preg_replace( $content = preg_replace(
'/\[dplayer\s{0,}src="(.{0,})"\s{0,}\/\]/', '/\[dplayer\s{0,}src="(.{0,})"\s{0,}\/\]/SU',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="' . $player . '$1"></iframe>', '<iframe class="joe_detail__article-player block" allowfullscreen="true" src="' . $player . '$1"></iframe>',
$content $content
); );
} }
/* 过滤完成任务勾选 */ /* 过滤bilibili播放器 */
if (preg_match('/\[x\]/', $content)) { if (preg_match('/\[bilibili\s{0,}bvid="\w{0,}"\s{0,}\/\]/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\[x\]/', '/\[bilibili\s{0,}bvid="(\w{0,})"\s{0,}\/\]/SU',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="//player.bilibili.com/player.html?bvid=$1"></iframe>',
$content
);
}
/* 过滤完成任务勾选 */
if (preg_match('/\[x\]/SU', $content)) {
$content = preg_replace(
'/\[x\]/SU',
'<input type="checkbox" class="joe_detail__article-checkbox" checked disabled></input>', '<input type="checkbox" class="joe_detail__article-checkbox" checked disabled></input>',
$content $content
); );
} }
/* 过滤未完成任务勾选 */ /* 过滤未完成任务勾选 */
if (preg_match('/\[\s{1}\]/', $content)) { if (preg_match('/\[\s{1}\]/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\[\s{1}\]/', '/\[\s{1}\]/SU',
'<input type="checkbox" class="joe_detail__article-checkbox" disabled></input>', '<input type="checkbox" class="joe_detail__article-checkbox" disabled></input>',
$content $content
); );
} }
/* 过滤默认卡片 */
if (preg_match('/\[card-default\s{0,}width=".{0,}"\s{0,}label=".{0,}"\].{0,}\[\/card-default\]/sSU', $content)) {
$content = preg_replace(
'/\[card-default\s{0,}width="(.{0,})"\s{0,}label="(.{0,})"\](.{0,})\[\/card-default\]/sSU',
'<span class="joe_detail__article-card block" style="width: $1">
<span class="title block">$2</span>
<span class="content block">$3</span>
</span>',
$content
);
}
/* 过滤消息提示 */
if (preg_match('/\[message\s{0,}type="success|info|warning|error"\s{0,}\].{0,}\[\/message\]/sSU', $content)) {
$content = preg_replace(
'/\[message\s{0,}type="(success|info|warning|error)"\s{0,}\](.{0,})\[\/message\]/sSU',
'<span class="joe_detail__article-message block $1">
<span class="icon"></span>
<span class="content">$2</span>
</span>',
$content
);
}
return $content; return $content;
} }

View File

@ -253,6 +253,22 @@ function themeConfig($form)
$JDocumentTitle->setAttribute('class', 'joe_content joe_global'); $JDocumentTitle->setAttribute('class', 'joe_content joe_global');
$form->addInput($JDocumentTitle); $form->addInput($JDocumentTitle);
$JCursorEffects = new Typecho_Widget_Helper_Form_Element_Select(
'JCursorEffects',
array(
'off' => '关闭(默认)',
'cursor1.js' => '效果1',
'cursor2.js' => '效果2',
'cursor3.js' => '效果3',
'cursor4.js' => '效果4'
),
'off',
'选择页面点击特效',
'介绍:用于开启炫酷的页面点击特效'
);
$JCursorEffects->setAttribute('class', 'joe_content joe_global');
$form->addInput($JCursorEffects->multiMode());
$JAside = new Typecho_Widget_Helper_Form_Element_Checkbox( $JAside = new Typecho_Widget_Helper_Form_Element_Checkbox(
'JAside', 'JAside',
array( array(

View File

@ -50,7 +50,13 @@
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
<link rel="shortcut icon" href="<?php $this->options->JFavicon() ?>" /> <link rel="shortcut icon" href="<?php $this->options->JFavicon() ?>" />
<title><?php $this->archiveTitle(array('category' => '分类 %s 下的文章', 'search' => '包含关键字 %s 的文章', 'tag' => '标签 %s 下的文章', 'author' => '%s 发布的文章'), '', ' - '); ?><?php $this->options->title(); ?></title> <title><?php $this->archiveTitle(array('category' => '分类 %s 下的文章', 'search' => '包含关键字 %s 的文章', 'tag' => '标签 %s 下的文章', 'author' => '%s 发布的文章'), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php $this->header(); ?> <?php if ($this->is('single')) : ?>
<meta name="description" content="<?php $this->fields->description(); ?>" />
<meta name="keywords" content="<?php $this->fields->keywords(); ?>" />
<?php $this->header('keywords=&description='); ?>
<?php else : ?>
<?php $this->header(); ?>
<?php endif; ?>
<!-- 全局公用CSS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 --> <!-- 全局公用CSS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 -->
<link rel="stylesheet" href="https://apip.weatherdt.com/standard/static/css/weather-standard.css"> <link rel="stylesheet" href="https://apip.weatherdt.com/standard/static/css/weather-standard.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
@ -68,4 +74,6 @@
<!-- 异步加载的JS --> <!-- 异步加载的JS -->
<script async src="https://apip.weatherdt.com/standard/static/js/weather-standard.js?v=2.0"></script> <script async src="https://apip.weatherdt.com/standard/static/js/weather-standard.js?v=2.0"></script>
<script async src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/smooth/joe.smooth.js"></script> <script async src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/smooth/joe.smooth.js"></script>
<script async src="<?php $this->options->themeUrl('assets/cursor/cursor3.js'); ?>"></script> <?php if ($this->options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?>
<script async src="<?php $this->options->themeUrl('assets/cursor/' . $this->options->JCursorEffects); ?>"></script>
<?php endif; ?>

View File

@ -1 +1 @@
table.typecho-list-table textarea[name='fields[thumb]'],table.typecho-list-table textarea[name='fields[abstract]']{width:100%;height:80px}#wmd-button-row{height:auto}#wmd-button-row .wmd-button .icon{width:20px;height:20px;vertical-align:middle;fill:#9b9b9b} table.typecho-list-table textarea[name='fields[thumb]'],table.typecho-list-table textarea[name='fields[abstract]'],table.typecho-list-table textarea[name='fields[description]']{width:100%;height:80px}table.typecho-list-table input[name='fields[keywords]']{width:100%}#wmd-button-row{height:auto}#wmd-button-row .wmd-button .icon{width:20px;height:20px;vertical-align:middle;fill:#9b9b9b}

View File

@ -65,7 +65,17 @@ $(function () {
title: '任务列表', title: '任务列表',
id: 'wmd-task-button', id: 'wmd-task-button',
svg: '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M593.92 215.04c112.64 0 204.8 92.16 204.8 204.8v204.8c0 112.64-92.16 204.8-204.8 204.8h-204.8c-112.64 0-204.8-92.16-204.8-204.8v-204.8c0-112.64 92.16-204.8 204.8-204.8h204.8m0-51.2h-204.8c-143.36 0-256 112.64-256 256v204.8c0 143.36 112.64 256 256 256h204.8c143.36 0 256-112.64 256-256v-204.8c0-138.24-112.64-256-256-256z" fill="#9b9b9b" p-id="3001"></path><path d="M527.36 762.88L230.4 460.8 307.2 399.36l174.08 133.12c71.68-81.92 230.4-250.88 445.44-384l20.48 40.96c-199.68 184.32-363.52 445.44-419.84 573.44m0 0" fill="#9b9b9b" p-id="3002"></path></svg>' svg: '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M593.92 215.04c112.64 0 204.8 92.16 204.8 204.8v204.8c0 112.64-92.16 204.8-204.8 204.8h-204.8c-112.64 0-204.8-92.16-204.8-204.8v-204.8c0-112.64 92.16-204.8 204.8-204.8h204.8m0-51.2h-204.8c-143.36 0-256 112.64-256 256v204.8c0 143.36 112.64 256 256 256h204.8c143.36 0 256-112.64 256-256v-204.8c0-138.24-112.64-256-256-256z" fill="#9b9b9b" p-id="3001"></path><path d="M527.36 762.88L230.4 460.8 307.2 399.36l174.08 133.12c71.68-81.92 230.4-250.88 445.44-384l20.48 40.96c-199.68 184.32-363.52 445.44-419.84 573.44m0 0" fill="#9b9b9b" p-id="3002"></path></svg>'
} },
{
title: '默认卡片',
id: 'wmd-card-button',
svg: '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M928.775 187.554H94.113c-15.364 0-27.822 12.49-27.822 27.895v585.79c0 15.405 12.458 27.895 27.822 27.895h834.662c15.363 0 27.821-12.49 27.821-27.895v-585.79c0-15.405-12.458-27.895-27.821-27.895z m-35.77 577.428H129.882V251.706h763.123v513.276z" p-id="8891" fill="#9b9b9b"></path><path d="M808.546 380.025H214.352c-11.532 0-20.865 9.37-20.865 20.922v22.323c0 11.55 9.333 20.922 20.865 20.922h594.194c11.522 0 20.867-9.372 20.867-20.922v-22.323c-0.001-11.55-9.345-20.922-20.867-20.922zM363.38 636.662H214.352c-11.532 0-20.865 9.356-20.865 20.92v22.312c0 11.564 9.333 20.921 20.865 20.921H363.38c11.534 0 20.866-9.358 20.866-20.921v-22.311c0-11.565-9.332-20.92-20.866-20.92z" p-id="8892" fill="#9b9b9b"></path></svg>'
},
{
title: '消息提示',
id: 'wmd-message-button',
svg: '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M669.1328 281.6a307.456 307.456 0 0 0-428.0832 0 295.68 295.68 0 0 0 31.744 445.44v27.0848a29.6448 29.6448 0 0 0 59.2896 0v-40.3968a30.72 30.72 0 0 0-1.0752-7.5264 30.1568 30.1568 0 0 0-12.4416-18.8928 236.4928 236.4928 0 0 1-104.3456-196.4032c0-130.56 110.7456-236.8 241.3056-236.8s241.3056 106.24 241.3056 236.8c0 6.1952 0 12.6464-0.6656 19.0976a235.52 235.52 0 0 1-104.96 178.176 30.3616 30.3616 0 0 0-12.6464 32.2048v33.9456a29.6448 29.6448 0 0 0 59.2896 0v-26.8288a299.2128 299.2128 0 0 0 76.1856-84.8384 291.2768 291.2768 0 0 0 40.96-128c0.6656-7.936 0.8704-15.872 0.8704-23.808A295.1168 295.1168 0 0 0 669.1328 281.6zM513.4848 880.3328l-118.9376 0.8704a29.7472 29.7472 0 1 0 0.6144 59.4432l118.9376-0.8704a29.7472 29.7472 0 1 0-0.6144-59.4432zM603.4432 804.352H305.2032a29.6448 29.6448 0 0 0 0 59.2384h298.24a29.6448 29.6448 0 0 0 0-59.2384z" fill="#666666" p-id="36814"></path><path d="M485.3248 342.1184A29.5424 29.5424 0 0 0 455.68 312.32a178.688 178.688 0 0 0-178.3808 178.5856 29.6448 29.6448 0 0 0 59.2896 0A118.9376 118.9376 0 0 1 455.68 371.968a29.7472 29.7472 0 0 0 29.6448-29.8496z" fill="#9b9b9b" p-id="36815"></path></svg>'
},
]; ];
/* 用于设置插入到文章的短代码内容 */ /* 用于设置插入到文章的短代码内容 */
@ -108,6 +118,12 @@ $(function () {
case 'wmd-task-button': case 'wmd-task-button':
str = `[x] 任务已完成\n[ ] 任务未完成`; str = `[x] 任务已完成\n[ ] 任务未完成`;
break; break;
case 'wmd-card-button':
str = `\n\n[card-default width="100%" label="卡片标题"]${$('#text').selectionRange() ? $('#text').selectionRange() : '卡片内容'}[/card-default]\n\n`;
break;
case 'wmd-message-button':
str = `\n\n[message type="success|info|warning|error"]${$('#text').selectionRange() ? $('#text').selectionRange() : '提示内容'}[/message]\n\n`;
break;
} }
return str; return str;
} }

View File

@ -1,9 +1,13 @@
table.typecho-list-table { table.typecho-list-table {
textarea[name='fields[thumb]'], textarea[name='fields[thumb]'],
textarea[name='fields[abstract]'] { textarea[name='fields[abstract]'],
textarea[name='fields[description]'] {
width: 100%; width: 100%;
height: 80px; height: 80px;
} }
input[name='fields[keywords]'] {
width: 100%;
}
} }
#wmd-button-row { #wmd-button-row {
height: auto; height: auto;
@ -15,4 +19,4 @@ table.typecho-list-table {
fill: #9b9b9b; fill: #9b9b9b;
} }
} }
} }