Skip to content

Commit 5441843

Browse files
committed
fix mobile layout
1 parent 9046b81 commit 5441843

File tree

5 files changed

+71
-6
lines changed

5 files changed

+71
-6
lines changed

src/layouts/BaseLayout.astro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
5454
<ul class="menu__dropdown">
5555
<li><a href={`${base}about/`}>About</a></li>
5656
<li><a href={`${base}posts/showcase/`}>Showcase</a></li>
57+
<li><a href={`${base}posts/`}>Posts</a></li>
58+
<li><a href={`${base}tags/`}>Tags</a></li>
59+
<li><a href={`${base}posts/rich-content/`}>Rich Content</a></li>
60+
<li><a href={`${base}posts/code-blocks-examples/`}>Code Examples</a></li>
5761
</ul>
5862
</li>
5963
</ul>
@@ -87,7 +91,11 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
8791
<footer class="footer">
8892
<div class="footer__inner">
8993
<div class="copyright">
90-
<span>© 2025 Powered by <a href="https://astro.build">Astro</a> :: Theme made by <a href="https://github.com/panr/hugo-theme-terminal">panr</a> :: Ported by <a href="https://github.com/dennisklappe">Dennis Klappe</a></span>
94+
<span>© 2025 Powered by <a href="https://astro.build">Astro</a></span>
95+
<span class="separator">::</span>
96+
<span>Theme made by <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">panr</a></span>
97+
<span class="separator">::</span>
98+
<span>Ported by <a href="https://github.com/dennisklappe">Dennis Klappe</a></span>
9199
</div>
92100
</div>
93101
</footer>

src/styles/footer.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,52 @@
3838
white-space: nowrap;
3939
}
4040

41+
.footer .copyright span:not(:last-child) {
42+
margin-right: 5px;
43+
}
44+
4145
/* Responsive */
4246
@media (max-width: 900px) {
4347
.footer__inner {
4448
flex-direction: column;
4549
}
50+
}
51+
52+
@media (max-width: 684px) {
53+
.footer {
54+
padding: 20px 0;
55+
}
56+
57+
.footer__inner {
58+
padding: 0 10px;
59+
}
60+
61+
.copyright {
62+
flex-wrap: wrap;
63+
text-align: center;
64+
gap: 5px;
65+
}
66+
67+
.copyright span {
68+
font-size: 14px;
69+
line-height: 1.6;
70+
white-space: normal;
71+
}
72+
73+
/* Hide separators on mobile for cleaner layout */
74+
.copyright .separator {
75+
display: none;
76+
}
77+
78+
/* Each text span on its own line on mobile */
79+
.copyright span:not(.separator) {
80+
display: block;
81+
width: 100%;
82+
}
83+
84+
/* Make links more touch-friendly on mobile */
85+
.footer a {
86+
padding: 2px 4px;
87+
display: inline-block;
88+
}
4689
}

src/styles/header.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,22 @@
4545
/* Responsive */
4646
@media (max-width: 684px) {
4747
.header__inner {
48-
flex-direction: column;
49-
align-items: flex-start;
48+
flex-direction: row;
49+
align-items: center;
50+
justify-content: space-between;
51+
width: 100%;
5052
}
5153

5254
.header__logo {
53-
margin-bottom: 10px;
55+
margin-bottom: 0;
56+
flex: 1;
5457
}
5558

5659
.header__logo::after {
57-
display: none;
60+
display: block;
61+
width: auto;
62+
flex: 1;
63+
margin-left: 10px;
64+
margin-right: 10px;
5865
}
5966
}

src/styles/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ article h1::after {
105105
.container {
106106
padding: 20px;
107107
}
108+
109+
.content {
110+
margin-top: 20px;
111+
}
108112
}
109113

110114
/* Print styles */

src/styles/menu.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@
9595
list-style: none;
9696
margin: 0;
9797
padding: 0;
98+
flex: 0 0 auto;
9899
}
99100

100101
.menu--mobile .menu__trigger {
101102
color: var(--accent);
102103
border: 2px solid;
103-
margin-left: 10px;
104+
margin-left: 0;
104105
height: 100%;
105106
padding: 3px 8px;
106107
margin-bottom: 0 !important;
@@ -133,6 +134,8 @@
133134
.menu--mobile .menu__dropdown {
134135
left: auto;
135136
right: 0;
137+
top: 100%;
138+
margin-top: 5px;
136139
}
137140

138141
.menu--language-selector .menu__dropdown {

0 commit comments

Comments
 (0)