-
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
Jan 16, 2020
0 parents
commit 1dd399f
Showing
11 changed files
with
1,104 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?php | ||
/** | ||
* Handsome主题美化插件 | ||
* | ||
* @package Sky.Mo | ||
* @author morizunzhu | ||
* @version 1.0.0 | ||
* @link http://typecho.org | ||
*/ | ||
class SkyMo_Plugin implements Typecho_Plugin_Interface | ||
{ | ||
/** | ||
* 激活插件方法,如果激活失败,直接抛出异常 | ||
* | ||
* @access public | ||
* @return void | ||
* @throws Typecho_Plugin_Exception | ||
*/ | ||
public static function activate() | ||
{ | ||
Typecho_Plugin::factory('Widget_Archive')->header = array(__CLASS__, 'header'); | ||
Typecho_Plugin::factory('Widget_Archive')->footer = array(__CLASS__, 'footer'); | ||
return "插件启动成功"; | ||
} | ||
|
||
/** | ||
* 禁用插件方法,如果禁用失败,直接抛出异常 | ||
* | ||
* @static | ||
* @access public | ||
* @return void | ||
* @throws Typecho_Plugin_Exception | ||
*/ | ||
public static function deactivate(){ | ||
return "插件禁用成功"; | ||
} | ||
|
||
/** | ||
* 获取插件配置面板 | ||
* | ||
* @access public | ||
* @param Typecho_Widget_Helper_Form $form 配置面板 | ||
* @return void | ||
*/ | ||
public static function config(Typecho_Widget_Helper_Form $form) | ||
{ | ||
if (isset($_GET['action']) && $_GET['action'] == 'buildSearchIndex') { | ||
self::buildSearchIndex(); | ||
} | ||
|
||
$click_themes = new Typecho_Widget_Helper_Form_Element_Radio( | ||
'click_themes', | ||
array( | ||
'1' => _t('开启'), | ||
'2' => _t('关闭'), | ||
), | ||
'1', | ||
_t('是否启用炫光鼠标特效'), | ||
_t('') | ||
); | ||
$form->addInput($click_themes); | ||
} | ||
|
||
/** | ||
* 个人用户的配置面板 | ||
* | ||
* @access public | ||
* @param Typecho_Widget_Helper_Form $form | ||
* @return void | ||
*/ | ||
public static function personalConfig(Typecho_Widget_Helper_Form $form){} | ||
|
||
/** | ||
* 插件实现方法 | ||
* | ||
* @access public | ||
* @return void | ||
*/ | ||
public static function footer() | ||
{ | ||
// 获取用户配置 | ||
$options = Helper::options(); | ||
$path = $options->pluginUrl . '/SkyMo/'; | ||
echo '<link rel="stylesheet" type="text/css" href="' . $path . 'css/github-badge.css" />'; | ||
// 输出js文件 | ||
$src = $options->pluginUrl . '/SkyMo/js/script.js'; | ||
echo "<script src='$src'></script>"; | ||
//鼠标点击特效 | ||
$click = $options->pluginUrl . '/SkyMo/js/mouse/click.js'; | ||
echo "<script src='$click'></script>"; | ||
|
||
//背景彩带特效 | ||
$bgband = $options->pluginUrl . '/SkyMo/js/background/ribbon.js'; | ||
echo "<script src='$bgband'></script>"; | ||
|
||
//星星鼠标轨迹 | ||
$mouseStar = $options->pluginUrl . '/SkyMo/js/mouse/star/canvas.js'; | ||
echo "<script src='$mouseStar'></script>"; | ||
} | ||
|
||
/** | ||
* 插件实现方法 | ||
* | ||
* @access public | ||
* @return void | ||
*/ | ||
public static function header() | ||
{ | ||
// 获取用户配置 | ||
$options = Helper::options(); | ||
$path = $options->pluginUrl . '/SkyMo/'; | ||
echo '<link rel="stylesheet" type="text/css" href="' . $path . 'css/style.css" />'; | ||
} | ||
} |
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,57 @@ | ||
.github-badge { | ||
display: inline-block; | ||
border-radius: 4px; | ||
|
||
text-shadow: none; | ||
font-size: 12px; | ||
color: #fff; | ||
line-height: 15px; | ||
|
||
background-color: #4D4D4D; | ||
|
||
margin-bottom: 5px; | ||
} | ||
|
||
.github-badge .badge-subject { | ||
display: inline-block; | ||
background-color: #4D4D4D; | ||
padding: 4px 2px 4px 6px; | ||
border-top-left-radius: 4px; | ||
border-bottom-left-radius: 4px; | ||
} | ||
|
||
.github-badge .badge-value { | ||
display: inline-block; | ||
padding: 4px 6px 4px 4px; | ||
border-top-right-radius: 4px; | ||
border-bottom-right-radius: 4px; | ||
} | ||
|
||
.github-badge .bg-brightgreen { | ||
background-color: #4c1 !important; | ||
} | ||
.github-badge .bg-green { | ||
background-color: #97CA00 !important; | ||
} | ||
.github-badge .bg-yellow { | ||
background-color: #dfb317 !important; | ||
} | ||
.github-badge .bg-yellowgreen { | ||
background-color: #a4a61d !important; | ||
} | ||
.github-badge .bg-orange { | ||
background-color: #fe7d37 !important; | ||
} | ||
.github-badge .bg-red { | ||
background-color: #ff2900 !important; | ||
} | ||
.github-badge .bg-blue { | ||
/* background-color: #007ec6 !important; */ | ||
background-color: #39f !important; | ||
} | ||
.github-badge .bg-grey, .github-badge .bg-gray { | ||
background-color: #555 !important; | ||
} | ||
.github-badge .bg-lightgrey, .github-badge .bg-lightgray { | ||
background-color: #9f9f9f !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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/*首页头像自动旋转*/ | ||
.thumb-lg{ | ||
width:130px; | ||
} | ||
|
||
.avatar{ | ||
-webkit-transition: 0.4s; | ||
-webkit-transition: -webkit-transform 0.4s ease-out; | ||
transition: transform 0.4s ease-out; | ||
-moz-transition: -moz-transform 0.4s ease-out; | ||
} | ||
|
||
.avatar:hover{ | ||
transform: rotateZ(360deg); | ||
-webkit-transform: rotateZ(360deg); | ||
-moz-transform: rotateZ(360deg); | ||
} | ||
|
||
#aside-user span.avatar{ | ||
animation-timing-function:cubic-bezier(0,0,.07,1)!important; | ||
border:0 solid | ||
} | ||
|
||
#aside-user span.avatar:hover{ | ||
transform:rotate(360deg) scale(1.2); | ||
border-width:5px; | ||
animation:avatar .5s | ||
} | ||
|
||
/* 左上角文字大小 */ | ||
.navbar-brand>span.hidden-folded{ | ||
font-size: 16px; | ||
} | ||
|
||
/*首页文章图片获取焦点放大*/ | ||
.item-thumb{ | ||
cursor: pointer; | ||
transition: all 0.6s; | ||
} | ||
|
||
.item-thumb:hover{ | ||
transform: scale(1.05); | ||
} | ||
|
||
.item-thumb-small{ | ||
cursor: pointer; | ||
transition: all 0.6s; | ||
} | ||
|
||
.item-thumb-small:hover{ | ||
transform: scale(1.05); | ||
} | ||
|
||
/* 去除头像阴影 */ | ||
.normal-shadow{ | ||
box-shadow:0 0 0 0 ; | ||
} | ||
|
||
/* 大图圆角 */ | ||
.item-thumb { | ||
border-radius: 6px 6px 6px 6px; | ||
} | ||
|
||
/* 赞赏按钮跳动 */ | ||
@keyframes drop { | ||
0% { | ||
transform: scale(1); | ||
} | ||
|
||
50% { | ||
transform: scale(1.2); | ||
} | ||
|
||
to { | ||
transform: scale(1); | ||
} | ||
} | ||
div.support-author>button.btn-pay { | ||
animation: drop 1s infinite; | ||
} | ||
|
||
/* Tag颜色 */ | ||
.tags a:nth-child(1) | ||
{ | ||
background:#3399ffc9; | ||
} | ||
.tags a:nth-child(2) | ||
{ | ||
background:#ff3300b8; | ||
} | ||
.tags a:nth-child(3) | ||
{ | ||
background:#f90; | ||
} | ||
|
||
/* 博客信息颜色 */ | ||
|
||
#blog_info>ul>li:nth-child(1)>span.badge{ | ||
background-color: #0043ff; | ||
} | ||
#blog_info>ul>li:nth-child(2)>span.badge{ | ||
background-color: #cc00ff; | ||
} | ||
#blog_info>ul>li:nth-child(3)>span.badge{ | ||
background-color: #ffb100; | ||
} | ||
#blog_info>ul>li:nth-child(4)>span.badge{ | ||
background-color: #ff0076; | ||
} |
Oops, something went wrong.