Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
20050f3c
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,发现更多精彩内容 >>
提交
20050f3c
编写于
9月 17, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add mask layer to footer
上级
37a1e691
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
52 addition
and
34 deletion
+52
-34
_config.yml
_config.yml
+6
-1
layout/_partials/header/header.pug
layout/_partials/header/header.pug
+2
-4
source/css/_common/components/footer/index.styl
source/css/_common/components/footer/index.styl
+17
-1
source/css/_common/components/header/index.styl
source/css/_common/components/header/index.styl
+27
-28
未找到文件。
_config.yml
浏览文件 @
20050f3c
...
@@ -99,7 +99,7 @@ header:
...
@@ -99,7 +99,7 @@ header:
# In site directory (source/uploads): /uploads/avatar.png
# In site directory (source/uploads): /uploads/avatar.png
# You can also use a link of image.
# You can also use a link of image.
url
:
url
:
# Mask effect of the
top
background image.
# Mask effect of the background image.
mask
:
mask
:
enable
:
true
enable
:
true
# Opacity of mask (value: 0 ~ 1).
# Opacity of mask (value: 0 ~ 1).
...
@@ -143,6 +143,11 @@ footer:
...
@@ -143,6 +143,11 @@ footer:
# In site directory (source/uploads): /uploads/avatar.png
# In site directory (source/uploads): /uploads/avatar.png
# You can also use a link of image.
# You can also use a link of image.
url
:
url
:
# Mask effect of the background image.
mask
:
enable
:
false
# Opacity of mask (value: 0 ~ 1).
opacity
:
0.5
# Copyright information.
# Copyright information.
copyright
:
copyright
:
enable
:
true
enable
:
true
...
...
layout/_partials/header/header.pug
浏览文件 @
20050f3c
...
@@ -20,7 +20,5 @@ div.header-info(style=`${
...
@@ -20,7 +20,5 @@ div.header-info(style=`${
theme.header.bg_image.enable &&
theme.header.bg_image.enable &&
page.top_image ? 'background: url(' + page.top_image + ') no-repeat center/cover;' : ''
page.top_image ? 'background: url(' + page.top_image + ') no-repeat center/cover;' : ''
}`)
}`)
div.header-info-mask
div.header-info-title= config.title
div.header-info-inner
div.header-info-subtitle= config.subtitle
div.header-info-title= config.title
div.header-info-subtitle= config.subtitle
source/css/_common/components/footer/index.styl
浏览文件 @
20050f3c
...
@@ -12,17 +12,33 @@
...
@@ -12,17 +12,33 @@
}
}
&-inner {
&-inner {
position: relative;
padding: 1rem;
padding: 1rem;
font-size: $font-size-footer;
font-size: $font-size-footer;
text-align: center;
text-align: center;
color: $footer-text-color;
color: $footer-text-color;
background-color: $footer-bg-color;
background-color: $footer-bg-color;
if (hexo-config('footer.bg_image.enable')) {
if (hexo-config('footer.bg_image.enable') && hexo-config('footer.bg_image.url')) {
z-index: $z-index-2;
background: url(hexo-config('footer.bg_image.url')) no-repeat center center;
background: url(hexo-config('footer.bg_image.url')) no-repeat center center;
background-size: cover;
background-size: cover;
}
}
if (hexo-config('footer.mask.enable')) {
&::before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
z-index: $z-index-1;
width: 100%;
height: 100%;
background-color: alpha(#000, hexo-config('footer.mask.opacity'));
}
}
a {
a {
color: $footer-link-color;
color: $footer-link-color;
transition-property: color;
transition-property: color;
...
...
source/css/_common/components/header/index.styl
浏览文件 @
20050f3c
.header {
.header {
&-inner {
&-inner {
position: relative;
width: 100%;
width: 100%;
font-size: $font-size-header;
font-size: $font-size-header;
background-color: $header-nav-bg-color;
background-color: $header-nav-bg-color;
...
@@ -9,6 +10,25 @@
...
@@ -9,6 +10,25 @@
} else {
} else {
height: convert(hexo-config('header.height') || '80vh');
height: convert(hexo-config('header.height') || '80vh');
}
}
if (hexo-config('header.bg_image.enable') && hexo-config('header.bg_image.url')) {
background: url(hexo-config('header.bg_image.url')) no-repeat center center;
background-size: cover;
}
if (hexo-config('header.mask.enable')) {
&::before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
z-index: $z-index0;
width: 100%;
height: 100%;
background-color: alpha(#000, hexo-config('header.mask.opacity'));
}
}
}
}
if (hexo-config('header.nav_height') && match('%', hexo-config('header.nav_height'))) {
if (hexo-config('header.nav_height') && match('%', hexo-config('header.nav_height'))) {
...
@@ -141,35 +161,14 @@
...
@@ -141,35 +161,14 @@
}
}
&-info {
&-info {
position: relative;
position: absolute;
top: 50%;
left: 0;
z-index: $z-index0;
padding: 0 .5rem;
width: 100%;
width: 100%;
height: 100%;
text-align: center;
transform: translateY(-50%);
if (hexo-config('header.bg_image.enable')) {
background: url(hexo-config('header.bg_image.url')) no-repeat center center;
background-size: cover;
}
&-inner {
position: absolute;
top: 50%;
right: 0;
left: 0;
padding: 0 .5rem;
text-align: center;
transform: translateY(-50%);
}
if (hexo-config('header.mask.enable')) {
&-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: alpha(#000, hexo-config('header.mask.opacity'));
}
}
&-title {
&-title {
margin-bottom: .5rem;
margin-bottom: .5rem;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录