-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
morizunzhu
committed
Jul 10, 2020
1 parent
faab5fe
commit 040fba2
Showing
3 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @link http://alomerry.com | ||
* version 1.0.0 基本特效 | ||
* version 1.1.0 新增配置单个特效 | ||
* https://api.github.com/repos/morizunzhu/skymo/releases/latest | ||
*/ | ||
class SkyMo_Plugin implements Typecho_Plugin_Interface | ||
{ | ||
|
@@ -58,6 +59,7 @@ public static function config(Typecho_Widget_Helper_Form $form) | |
'<p>此插件帮助你美化 Handsome 主题的一些细节。你可以对插件进行非商用的二次开发。</p>'. | ||
'<p>有任何问题请联系发邮件至<strong><a href="mailto:[email protected]"> [email protected] </a></strong>'. | ||
'<p>更多信息请参阅 <b><a href="https://github.com/Morizunzhu/SkyMo">详细说明</a></b> '. | ||
'<p><b><a href="https://github.com/Morizunzhu/SkyMo/releases/tag/1.1.0">最新版地址</a></b> '. | ||
'<hr />'; | ||
echo $html; | ||
|
||
|
@@ -104,6 +106,19 @@ public static function config(Typecho_Widget_Helper_Form $form) | |
"style.css" => "style.css" | ||
),"github-badge.css","样式选择","<strong style='color: #00b8ff9e'> 要切换自定义样式,请替换插件目录下 <code>/css/foot</code> 的 <code>style.css</code> 文件 </strong>"); | ||
$form->addInput($footCSS); | ||
|
||
//代码样式 | ||
$form->addInput(new ExTitle_Plugin('btnTitle', NULL, NULL, _t('代码样式'), NULL)); | ||
$codeStyle = new Typecho_Widget_Helper_Form_Element_Radio('codeStyle',array( | ||
'open' => _t('开启'), | ||
'close' => _t('关闭'), | ||
),'open','',"<img src='https://alomerry.com/usr/uploads/2020/01/2908048897.png' style='width: 30rem;'>"); | ||
$form->addInput($codeStyle); | ||
$codeCSS = new Typecho_Widget_Helper_Form_Element_Select("codeCSS",array( | ||
"github-badge.css" => "github-badge.css", | ||
"style.css" => "style.css" | ||
),"github-badge.css","样式选择","<strong style='color: #00b8ff9e'> 要切换自定义样式,请替换插件目录下 <code>/css/foot</code> 的 <code>style.css</code> 文件 </strong>"); | ||
$form->addInput($codeCSS); | ||
|
||
//背景彩带特效 | ||
$form->addInput(new ExTitle_Plugin('btnTitle', NULL, NULL, _t('背景彩带特效'), NULL)); | ||
|
@@ -176,6 +191,12 @@ public static function footer() | |
echo "<script src='" . $path . "/js/footer.js'></script>"; | ||
} | ||
|
||
//代码样式 | ||
if($SkyMo->codeStyle == 'open'){ | ||
echo "<link rel='stylesheet' type='text/css' href='" . $path . "/css/code/code.css' />"; | ||
// echo "<link rel='stylesheet' type='text/css' href='" . $path . "/css/code/" .$SkyMo->codeCSS."' />"; | ||
} | ||
|
||
//星星鼠标轨迹 | ||
if($SkyMo->starTrack == 'open'){ | ||
$tmp = $path . '/js/mouse/star/canvas.js'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* 修改 code 样式 */ | ||
|
||
#post-content pre code { | ||
margin: 0px 0px 0px 5px !important; | ||
padding: 5px 0px 0px 0px !important; | ||
} | ||
#post-content pre ::before { | ||
content: "" !important; | ||
} | ||
#post-content pre:before { | ||
background: #474949 !important; | ||
color: #ffffff !important; | ||
padding: 5px 5px 10px 15px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters