Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
7667e19d
Y
yanglr2010
项目概览
大白技术控
/
yanglr2010
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yanglr2010
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7667e19d
编写于
7月 15, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add mask effect of top image & remove blur effect
上级
6a164766
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
47 deletion
+19
-47
_config.yml
_config.yml
+4
-4
source/css/_common/header.styl
source/css/_common/header.styl
+10
-31
source/css/_common/responsive.styl
source/css/_common/responsive.styl
+5
-12
未找到文件。
_config.yml
浏览文件 @
7667e19d
...
...
@@ -46,11 +46,11 @@ header:
# In site directory (source/uploads): /uploads/avatar.png
# You can also use a link of image.
url
:
#
Blur filter effect of the header background
.
blur_effect
:
#
Mask effect of the top background image
.
mask
:
enable
:
false
#
Degree of blur
.
level
:
15px
#
Opacity of mask (value: 0 ~ 1)
.
opacity
:
0.5
# Creative Commons 4.0 International License.
creative_commons
:
...
...
source/css/_common/header.styl
浏览文件 @
7667e19d
...
...
@@ -18,6 +18,7 @@ if (hexo-config('header.height'))
background-position: center
background-size: cover
flex-direction: column
transition: height .5s
$header-nav-color
.header-nav-menu a,
...
...
@@ -108,39 +109,15 @@ $header-nav-item
&:hover
cursor: pointer
$site-info-blur-level = convert(
hexo-config('header.blur_effect.level') || '0')
.header-info
display: flex
text-align: center
flex: 1
flex-direction: column
// enable blur effect for site info
if (hexo-config('header.blur_effect.enable'))
z-index: $z-index-1
overflow: hidden
position: absolute
top: 0
left: 0
width: 100%
height: 100%
background: inherit
// blur effect
&::before
content: ''
position: absolute
top: 0
right: 0
bottom: 0
left: 0
z-index: $z-index-0
margin: 0 - $site-info-blur-level * 2
background: inherit
background-attachment: fixed
filter: blur($site-info-blur-level)
if (hexo-config('header.mask.enable'))
background-color: alpha(#000,
hexo-config('header.mask.opacity'))
.header-info-inner
display: flex
...
...
@@ -150,11 +127,13 @@ $site-info-blur-level = convert(
justify-content: center
.site-info-title
font-size:
2.5
rem
font-size:
4
rem
font-weight: $font-weight-bolder
color: #f9f9f9
transition: font-size .3s
.site-info-subtitle
font-size: 2rem
font-weight: $font-weight-
bold
font-size:
1.
2rem
font-weight: $font-weight-
normal
color: #f9f9f9
transition: font-size .3s
source/css/_common/responsive.styl
浏览文件 @
7667e19d
...
...
@@ -14,13 +14,6 @@
.header-nav-inner
width: 100%
.header-info-inner
.site-info-title
font-size: 2rem
.site-info-subtitle
font-size: 1.75rem
#sidebar
display: none
...
...
@@ -53,7 +46,7 @@
background-attachment: local
#header
height:
300px
height:
50vh
#header,
#main
...
...
@@ -105,10 +98,10 @@
.header-info-inner
.site-info-title
font-size:
2
rem
font-size:
3
rem
.site-info-subtitle
font-size: 1
.5
rem
font-size: 1rem
div.algolia-popup
left: 0
...
...
@@ -127,10 +120,10 @@
.header-info-inner
.site-info-title
font-size:
1.7
5rem
font-size:
2.
5rem
.site-info-subtitle
font-size:
1.25
rem
font-size:
.8
rem
.header-nav-search
span
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录