Skip to content

Commit 69b58b0

Browse files
authored
Add files via upload
1 parent 04f6ab3 commit 69b58b0

File tree

2 files changed

+44
-10
lines changed

2 files changed

+44
-10
lines changed

_includes/intro-header.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
100100
<div class="container">
101101
<div class="row">
102102
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
103-
{% if include.short %}
104-
<div class="site-heading" id="tag-heading">
105-
{% else %}
106-
<div class="site-heading">
107-
{% endif %}
108-
<h1 class="title-center">{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
109-
<span class="subheading">{{ page.description }}</span>
103+
<div class="title-wrapper"> <!-- 新增包装容器 -->
104+
{% if include.short %}
105+
<div class="site-heading" id="tag-heading">
106+
{% else %}
107+
<div class="site-heading">
108+
{% endif %}
109+
<h1>{{ page.title }}</h1>
110+
<span class="subheading">{{ page.description }}</span>
111+
</div>
110112
</div>
111113
</div>
112114
</div>

less/hux-blog.less

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,22 @@ samp {
523523
}
524524
.post-heading,
525525
.page-heading {
526-
padding: 20vh 0 10vh; /* 调整垂直间距 */
527-
@media only screen and (min-width: 768px) {
528-
padding: 22vh 0; /* 桌面端间距 */
526+
text-align: center;
527+
display: flex;
528+
flex-direction: column;
529+
justify-content: center;
530+
height: 100%; // 新增高度设置
531+
min-height: 100vh; // 确保容器高度
532+
533+
h1 {
534+
margin-top: 0;
535+
font-size: 50px;
536+
transform: translateY(-20%); // 微调垂直位置
537+
}
538+
539+
.subheading {
540+
.sans-serif;
541+
margin-top: 20px; // 增加与标题的间距
529542
}
530543
}
531544
.tags {
@@ -1115,3 +1128,22 @@ img::-moz-selection {
11151128
.no-scroll {
11161129
overflow-y: hidden;
11171130
}
1131+
1132+
.title-wrapper {
1133+
position: relative;
1134+
height: 100vh;
1135+
display: flex;
1136+
align-items: center;
1137+
justify-content: center;
1138+
1139+
.site-heading {
1140+
position: relative;
1141+
z-index: 2;
1142+
padding: 0 !important;
1143+
1144+
h1 {
1145+
text-shadow: 2px 2px 4px rgba(150, 150, 150, 0.3);
1146+
line-height: 1.2;
1147+
}
1148+
}
1149+
}

0 commit comments

Comments
 (0)