Skip to content

Commit 46cab71

Browse files
authored
Add files via upload
1 parent 69b58b0 commit 46cab71

File tree

2 files changed

+11
-58
lines changed

2 files changed

+11
-58
lines changed

_includes/intro-header.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ <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-
<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>
103+
{% if include.short %}
104+
<div class="site-heading" id="tag-heading">
105+
{% else %}
106+
<div class="site-heading">
107+
{% endif %}
108+
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
109+
<span class="subheading">{{ page.description }}</span>
112110
</div>
113111
</div>
114112
</div>

less/hux-blog.less

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -506,39 +506,13 @@ samp {
506506
.intro-header {
507507
&.style-text {
508508
background: none;
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-
}
509+
.site-heading,
524510
.post-heading,
525511
.page-heading {
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-
512+
padding: 85px 0 20px;
513+
color: @gray-dark;
539514
.subheading {
540-
.sans-serif;
541-
margin-top: 20px; // 增加与标题的间距
515+
margin-bottom: 15px;
542516
}
543517
}
544518
.tags {
@@ -1128,22 +1102,3 @@ img::-moz-selection {
11281102
.no-scroll {
11291103
overflow-y: hidden;
11301104
}
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)