Skip to content

Commit 04f6ab3

Browse files
authored
Add files via upload
1 parent 9d312ba commit 04f6ab3

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

_includes/intro-header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
105105
{% else %}
106106
<div class="site-heading">
107107
{% endif %}
108-
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
108+
<h1 class="title-center">{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
109109
<span class="subheading">{{ page.description }}</span>
110110
</div>
111111
</div>

less/hux-blog.less

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,26 @@ samp {
506506
.intro-header {
507507
&.style-text {
508508
background: none;
509-
.site-heading,
509+
.site-heading {
510+
display: flex;
511+
flex-direction: column;
512+
justify-content: center;
513+
height: 100%;
514+
515+
.title-center {
516+
text-align: center;
517+
width: 100%;
518+
transform: translateY(-50%);
519+
position: absolute;
520+
top: 50%;
521+
left: 0;
522+
}
523+
}
510524
.post-heading,
511525
.page-heading {
512-
padding: 85px 0 20px;
513-
color: @gray-dark;
514-
.subheading {
515-
margin-bottom: 15px;
526+
padding: 20vh 0 10vh; /* 调整垂直间距 */
527+
@media only screen and (min-width: 768px) {
528+
padding: 22vh 0; /* 桌面端间距 */
516529
}
517530
}
518531
.tags {

0 commit comments

Comments
 (0)