Skip to content

Commit

Permalink
0.610
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Jan 20, 2020
1 parent acb72a4 commit 303e7f1
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 442 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ Argon 使用 [GPL V3.0](https://github.com/abc2237512422/argon-theme/blob/master

# 更新日志

## 20200121 v0.610
+ 重构切换主题功能
+ 修复 CSS 的一堆问题
+ 修复 Pjax 带 `target="blank"` 属性的 `a` 标签在本页打开的问题
+ 一些小改进

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

## 20200116 v0.600
+ 增加博客主题色选项,可自定义主题色
Expand Down
8 changes: 6 additions & 2 deletions argontheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ function pjaxLoadUrl(url , pushstate){

let scripts = $("#content script:not([no-pjax]):not(.no-pjax)" , $vdom);
for (let script of scripts){
eval(script.innerHTML);
if (script.innerHTML.indexOf("\/*NO-PJAX*\/") == -1){
eval(script.innerHTML);
}
}

NProgress.done();
Expand All @@ -579,6 +581,7 @@ function pjaxLoadUrl(url , pushstate){
window.pjaxLoaded();
}
}catch (err){
console.log(err);
NProgress.done();
if (pjaxUrlChanged){
pjaxLoading = false;
Expand All @@ -598,6 +601,7 @@ function pjaxLoadUrl(url , pushstate){
}
});
}catch(err){
console.log(err);
NProgress.done();
pjaxLoading = false;
pjaxUrlChanged = true;
Expand All @@ -606,7 +610,7 @@ function pjaxLoadUrl(url , pushstate){
}
}
$(document).ready(function(){
$(document).on("click" , "a[href]:not([no-pjax]):not(.no-pjax):not([href^='#']):not([target='_blink'])" , function(){
$(document).on("click" , "a[href]:not([no-pjax]):not(.no-pjax):not([href^='#']):not([target='_blank'])" , function(){
//对文章预览卡片使用过渡动画
if ($(this).is("#main article.post-preview a.post-title")){
let $card = $($(this).parents("article.post-preview")[0]);
Expand Down
110 changes: 12 additions & 98 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,102 +86,16 @@
$RGB_light = hsl2rgb($HSL['h'], $HSL['s'], min($HSL['l'] + 0.1, 1));
$themecolor_light = rgb2hex($RGB_light['R'],$RGB_light['G'],$RGB_light['B']);
?>
.themecolor-color{
color: <?php echo $themecolor; ?>;
}
.themecolor-background{
background-color: <?php echo $themecolor; ?>;
}
.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,
#leftbar_catalog .index-item.current > .index-link{
color: <?php echo $themecolor; ?>;
}
a:hover{
color: <?php echo $themecolor_dark; ?>;
}
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,
.fab:hover{
border-color: <?php echo $themecolor; ?>;
background-color: <?php echo $themecolor; ?>;
}
.btn-primary:hover,
.btn-outline-primary:hover{
border-color: <?php echo $themecolor_dark; ?>;
background-color: <?php echo $themecolor_dark; ?>;
}
.btn-primary: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; ?>;
}
#fab_reading_progress_bar,
html:not(.use-serif) #blog_setting_font_sans_serif,
html.use-serif #blog_setting_font_serif,
html:not(.use-big-shadow) #blog_setting_shadow_small,
html.use-big-shadow #blog_setting_shadow_big,
.custom-toggle input:checked+.custom-toggle-slider:before{
background-color: <?php echo $themecolor; ?>;
}
#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,
.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_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;
:root{
--themecolor: <?php echo $themecolor; ?>;
--themecolor-dark0: <?php echo $themecolor_dark0; ?>;
--themecolor-dark: <?php echo $themecolor_dark; ?>;
--themecolor-dark2: <?php echo $themecolor_dark2; ?>;
--themecolor-dark3: <?php echo $themecolor_dark3; ?>;
--themecolor-light: <?php echo $themecolor_light; ?>;
--themecolor-rgbstr: <?php echo $themecolor_rgbstr; ?>;
--themecolor-gradient: linear-gradient(150deg,<?php echo $themecolor_light; ?> 15%,<?php echo $themecolor; ?> 70%,<?php echo $themecolor_dark0; ?> 94%);

}
</style>

Expand Down Expand Up @@ -351,13 +265,13 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
<div class="blog-setting-item mt-3">
<div style="flex: 1;">字体</div>
<div>
<button id="blog_setting_font_sans_serif" type="button" class="blog-setting-font btn btn-outline-primary">Sans Serif</button><button id="blog_setting_font_serif" type="button" class="blog-setting-font btn btn-outline-primary">Serif</button>
<button id="blog_setting_font_sans_serif" type="button" class="blog-setting-font btn btn-outline-primary blog-setting-selector-left">Sans Serif</button><button id="blog_setting_font_serif" type="button" class="blog-setting-font btn btn-outline-primary blog-setting-selector-right">Serif</button>
</div>
</div>
<div class="blog-setting-item mt-3">
<div style="flex: 1;">阴影</div>
<div>
<button id="blog_setting_shadow_small" type="button" class="blog-setting-shadow btn btn-outline-primary">浅阴影</button><button id="blog_setting_shadow_big" type="button" class="blog-setting-shadow btn btn-outline-primary">深阴影</button>
<button id="blog_setting_shadow_small" type="button" class="blog-setting-shadow btn btn-outline-primary blog-setting-selector-left">浅阴影</button><button id="blog_setting_shadow_big" type="button" class="blog-setting-shadow btn btn-outline-primary blog-setting-selector-right">深阴影</button>
</div>
</div>
<div class="blog-setting-item mt-3 mb-3">
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.601",
"version" : "0.610",
"details_url" : "https://github.com/abc2237512422/argon-theme/releases",
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.601/argon.zip"
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.610/argon.zip"
}
Loading

0 comments on commit 303e7f1

Please sign in to comment.