Skip to content

Commit 1c153f9

Browse files
committed
Redesign hero section and avoid text overflow.
1 parent 86607d2 commit 1c153f9

4 files changed

Lines changed: 24 additions & 17 deletions

File tree

.changeset/shy-carrots-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hexo-theme-cupertino': minor
3+
---
4+
5+
Redesign hero section and avoid text overflow.

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# path to your blog's icon
22
favicon: /favicon.png
33

4+
# hero area content
5+
hero:
6+
title: Welcome to Theme Cupertino
7+
description: |
8+
Aliquip voluptate ea velit consequat deserunt officia do aliqua est do consequat aute.
9+
410
# path to manifest.json
511
manifest: /manifest.json
612

layout/index.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="container">
22
<% if (page.path == "index.html") { %>
33
<div class="hero<% if (theme.hero_exit_while_scrolling.enabled) { %> exit-while-scroll<% if (theme.hero_exit_while_scrolling.blur_filter) { %> with-blur<% } %><% } %>">
4-
<h2 class="sub"><%- config.subtitle %></h2>
5-
<h2 class="large"><%- config.description %></h2>
4+
<h2 class="title"><%- theme.hero.title %></h2>
5+
<h2 class="description"><%- theme.hero.description %></h2>
66
</div>
77
88
<h2 class="section-title"><%- __('latest_posts') %></h2>

source/css/index.scss

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
.hero {
2-
height: calc(100vh - 56px);
32
display: flex;
43
flex-direction: column;
54
justify-content: center;
5+
gap: 6px;
6+
$paddingY: 160px;
7+
padding-top: $paddingY;
8+
padding-bottom: $paddingY;
9+
white-space: pre-wrap;
610

711
@supports (animation-timeline: scroll()) {
812
&.exit-while-scroll {
@@ -48,26 +52,18 @@
4852
}
4953
}
5054

51-
.sub {
52-
text-transform: uppercase;
53-
font-size: 24px;
55+
.title {
56+
font-size: 22px;
5457
color: var(--color-text-secondary);
55-
font-weight: 100;
58+
font-weight: 200;
5659
margin: 0;
5760
transition: font-size 0.5s;
58-
59-
@media (max-width: 800px) {
60-
font-size: 16px;
61-
}
6261
}
6362

64-
.large {
65-
font-size: 128px;
63+
.description {
64+
font-size: 20px;
65+
font-weight: normal;
6666
margin: 0;
6767
transition: font-size 0.5s;
68-
69-
@media (max-width: 800px) {
70-
font-size: 84px;
71-
}
7268
}
7369
}

0 commit comments

Comments
 (0)