Skip to content

Commit 88e1657

Browse files
committed
chore: adaptive for home page
1 parent e4b69ec commit 88e1657

3 files changed

Lines changed: 51 additions & 3 deletions

File tree

css/home.css

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,35 @@
262262
}
263263

264264
@media (max-width: 768px) {
265-
h1 { font-size: 2.5rem; }
265+
h1 {
266+
font-size: 2.5rem !important;
267+
line-height: 1.2;
268+
word-wrap: break-word;
269+
hyphens: auto;
270+
}
271+
celestine-header::part(nav), nav {
272+
display: flex;
273+
flex-wrap: wrap;
274+
justify-content: center;
275+
gap: 15px;
276+
width: 100%;
277+
margin-top: 10px;
278+
}
279+
280+
.tech-stack {
281+
width: 100% !important;
282+
box-sizing: border-box;
283+
padding: 20px 10px !important;
284+
margin-left: 0 !important;
285+
margin-right: 0 !important;
286+
overflow-x: hidden;
287+
}
288+
289+
.container {
290+
overflow-x: hidden;
291+
width: 100%;
292+
box-sizing: border-box;
293+
}
266294
.btn-group { flex-direction: column; }
267295
.btn { width: 100%; justify-content: center; box-sizing: border-box; }
268296
}

css/main.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,23 @@ p {
146146
.btn-secondary:hover {
147147
background: rgba(255, 255, 255, 0.15);
148148
}
149+
150+
@media (max-width: 768px) {
151+
header {
152+
flex-direction: column;
153+
gap: 15px;
154+
padding-bottom: 20px;
155+
text-align: center;
156+
}
157+
nav {
158+
display: flex;
159+
flex-wrap: wrap;
160+
justify-content: center;
161+
gap: 20px;
162+
width: 100%;
163+
}
164+
nav a {
165+
margin: 0;
166+
font-size: 0.9rem;
167+
}
168+
}

js/header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class CelestineHeader extends HTMLElement {
5353
<a href="${rootPath}/index.html" class="cel-nav-link ${activePage === 'home' ? 'active' : ''}">Home</a>
5454
<a href="${rootPath}/features.html" class="cel-nav-link ${activePage === 'features' ? 'active' : ''}">Features</a>
5555
<a href="${rootPath}/pricing.html" class="cel-nav-link ${activePage === 'pricing' ? 'active' : ''}">Pricing</a>
56-
<a href="${rootPath}/about.html" class="cel-nav-link ${activePage === 'about' ? 'active' : ''}">About Us</a>
57-
<a href="${rootPath}/contact.html" class="cel-nav-link ${activePage === 'contact' ? 'active' : ''}">Contact Us</a>
56+
<a href="${rootPath}/about.html" class="cel-nav-link ${activePage === 'about' ? 'active' : ''}">About</a>
57+
<a href="${rootPath}/contact.html" class="cel-nav-link ${activePage === 'contact' ? 'active' : ''}">Contact</a>
5858
5959
<a href="https://github.com/vero-code/celestine" target="_blank" class="cel-social-link github"><i class="fab fa-github"></i></a>
6060
<a href="https://x.com/veron_code" target="_blank" class="cel-social-link twitter"><i class="fab fa-twitter"></i></a>

0 commit comments

Comments
 (0)