Skip to content

Commit

Permalink
0.601
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Jan 16, 2020
1 parent d93f864 commit acb72a4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 15 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ Argon 使用 [GPL V3.0](https://github.com/abc2237512422/argon-theme/blob/master

# 更新日志

## 20200116 v0.601
+ 进一步适配主题色 (如滚动条颜色,a 标签下划线颜色等)

## 20200116 v0.600
+ 增加博客主题色选项,可自定义主题色
+ 增加 SEO Meta 标签
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,7 @@ function themeoptions_page(){
<th><label>页尾脚本</label></th>
<td>
<textarea type="text" rows="15" cols="100" name="argon_custom_html_foot"><?php echo htmlspecialchars(get_option('argon_custom_html_foot')); ?></textarea>
<p class="description">HTML , 支持 script 等标签</br>插入到 body 之前</p>
<p class="description">HTML , 支持 script 等标签</br>插入到 body 之后</p>
</td>
</tr>
<tr><th class="subtitle"><h2>动画</h2></th></tr>
Expand All @@ -1490,7 +1490,7 @@ function themeoptions_page(){
</td>
</tr>
<tr>
<th><label>是否启用进入文章动画(测试)</label></th>
<th><label>是否启用进入文章动画</label></th>
<td>
<select name="argon_enable_into_article_animation">
<?php $argon_enable_into_article_animation = get_option('argon_enable_into_article_animation'); ?>
Expand Down
48 changes: 38 additions & 10 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@

<style id="themecolor_css">
<?php
$themecolor_rgbstr = hex2str($themecolor);
$RGB = hex2rgb($themecolor);
$HSL = rgb2hsl($RGB['R'], $RGB['G'], $RGB['B']);

$RGB_dark0 = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.025, 0));
$themecolor_dark0 = rgb2hex($RGB_dark0['R'],$RGB_dark0['G'],$RGB_dark0['B']);

$RGB_dark = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.1, 0));
$RGB_dark = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.05, 0));
$themecolor_dark = rgb2hex($RGB_dark['R'], $RGB_dark['G'], $RGB_dark['B']);

$RGB_dark2 = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.15, 0));
$RGB_dark2 = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.1, 0));
$themecolor_dark2 = rgb2hex($RGB_dark2['R'],$RGB_dark2['G'],$RGB_dark2['B']);

$RGB_dark3 = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.22, 0));
$RGB_dark3 = hsl2rgb($HSL['h'], $HSL['s'], max($HSL['l'] - 0.15, 0));
$themecolor_dark3 = rgb2hex($RGB_dark3['R'],$RGB_dark3['G'],$RGB_dark3['B']);

$RGB_light = hsl2rgb($HSL['h'], $HSL['s'], min($HSL['l'] + 0.1, 1));
Expand All @@ -94,9 +95,17 @@
.themecolor-border{
border-color: <?php echo $themecolor; ?>;
}
.text-primary{
color: <?php echo $themecolor; ?> !important;
}
a.text-primary:focus,
a.text-primary:hover {
color: <?php echo $themecolor_dark; ?> !important;
}
a ,
html.darkmode a:hover,
.btn-neutral{
.btn-neutral,
#leftbar_catalog .index-item.current > .index-link{
color: <?php echo $themecolor; ?>;
}
a:hover{
Expand All @@ -105,26 +114,35 @@
html.darkmode a{
color: <?php echo $themecolor_light; ?>;
}
.github-info-card a{
color: <?php echo $themecolor_light; ?>;
}
.argon-timeline{
border-color: rgba(<?php echo $themecolor_rgbstr;?>,0.2);
}
.sidebar-tab-switcher > a.active,
.custom-toggle input:checked+.custom-toggle-slider{
border-color: <?php echo $themecolor; ?>;
}
.btn-primary{
.btn-primary,
.fab:hover{
border-color: <?php echo $themecolor; ?>;
background-color: <?php echo $themecolor; ?>;
}
.btn-primary:hover,
.fab:hover,
.btn-outline-primary:hover{
border-color: <?php echo $themecolor_dark; ?>;
background-color: <?php echo $themecolor_dark; ?>;
}
.btn-primary:active,
.fab:active,
.btn-outline-primary:active{
background-color: <?php echo $themecolor_dark2; ?> !important;
border-color: <?php echo $themecolor_dark2; ?> !important;
}
.fab:active{
border-color: <?php echo $themecolor_dark; ?> !important;
background-color: <?php echo $themecolor_dark; ?> !important;
}
.btn-outline-primary {
color: <?php echo $themecolor; ?>;
border-color: <?php echo $themecolor; ?>;
Expand All @@ -137,24 +155,34 @@
.custom-toggle input:checked+.custom-toggle-slider:before{
background-color: <?php echo $themecolor; ?>;
}
#navbar-main{
#navbar-main,
.loading-dot,
.argon-timeline-card:before,
article .post-content a:before{
background-color: <?php echo $themecolor; ?> !important;
}
.blog-setting-font:hover , .blog-setting-shadow:hover{
color: <?php echo $themecolor; ?>;
}
.page-item.active .page-link{
.page-item.active .page-link,
.custom-checkbox .custom-control-input:checked~.custom-control-label::before{
background-color: <?php echo $themecolor; ?>;
border-color: <?php echo $themecolor; ?>;
}
.blog_settings_opened #fab_toggle_blog_settings_popup{
background-color: <?php echo $themecolor_dark3; ?> !important;
background-color: <?php echo $themecolor_dark2; ?> !important;
}
.leftbar-banner,
#leftbar_announcement,
#footer{
background: linear-gradient(150deg,<?php echo $themecolor_light; ?> 15%,<?php echo $themecolor; ?> 70%,<?php echo $themecolor_dark0; ?> 94%);
}
::-webkit-scrollbar-thumb:hover{
background-color: rgba(<?php echo $themecolor_rgbstr;?>,0.8);
}
#wpadminbar{
background-color: <?php echo $themecolor; ?> !important;
}
</style>

<body <?php body_class(); ?>>
Expand Down
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "0.600",
"version" : "0.601",
"details_url" : "https://github.com/abc2237512422/argon-theme/releases",
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.600/argon.zip"
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.601/argon.zip"
}
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: argon
Author: abc2237512422
Author URI: https://abc233.site/
Description: 轻盈、简洁、美观的 Wordpress 主题
Version: 0.600
Version: 0.601
License: MIT License
License URI: https://opensource.org/licenses/MIT
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -1810,6 +1810,7 @@ body.noscroll:before{
transform: translateY(calc(-50% - 2px));
right: 10px;
transition: all .3s ease;
color: #fff;
}
#wpadminbar:hover:after{
opacity: 0;
Expand Down

0 comments on commit acb72a4

Please sign in to comment.