Skip to content

Commit cd57917

Browse files
committed
better css
1 parent 9e1585d commit cd57917

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

themes/pelican-chunk/static/css/so-simple/entry-content.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
background: #f5f5f5;
5858
}
5959

60+
/* Limit article images to 640px width on desktop */
61+
.entry-content img {
62+
max-width: 640px;
63+
width: 100%;
64+
height: auto;
65+
}
66+
6067
.entry-content a img {
6168
border: 10px solid #ddd;
6269
}

themes/pelican-chunk/static/css/so-simple/header.css

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#header {
22
padding-top: 40px !important;
33
background: var(--_body-bg);
4-
max-height: 20rem;
4+
max-height: none;
55
}
66

77
.header-banner {
88
position: relative;
99
display: block;
10-
min-height: 18rem;
10+
height: 250px;
1111
width: 100%;
1212
align-items: right;
13+
overflow: hidden;
1314
}
1415

1516
.header-banner img {
@@ -36,17 +37,10 @@
3637
:root #floppy {
3738
display: block;
3839
position: absolute;
39-
max-width: 100%;
40+
width: clamp(150px, 15%, 400px);
41+
aspect-ratio: 1 / 1;
4042
top: 20px;
4143
left: 10%;
42-
max-height: 20rem;
43-
/* left: calc(var(--_side-nav-w) + var(--_content-space-x)); */
44-
/* top: 220px; */
45-
/* transform: translate(-50%, -50%); */
46-
/* max-height: none; */
47-
/* max-width: none; */
48-
/* width: min(var(--_disc-w), 20rem); */
49-
/* bottom: auto; */
50-
/* box-shadow: 0 -20px 30px -10px #0000009c; */
44+
object-fit: contain;
5145
z-index: 11;
5246
}

themes/pelican-chunk/static/css/so-simple/mobile.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
:root #floppy {
7979
left: calc(var(--_content-space-x));
80-
max-height: 19.2rem;
80+
width: clamp(120px, 12%, 350px);
8181
}
8282

8383
/* Mobile: Smaller fork ribbon */
@@ -201,8 +201,7 @@
201201

202202
:root #floppy {
203203
transform: translate(-18%, -15%);
204-
/* bottom: 0px; */
205-
width: 23%;
204+
width: clamp(120px, 27%, 270px);
206205
}
207206

208207
/* Small mobile: smaller fork ribbon */
@@ -214,8 +213,9 @@
214213
.header-banner {
215214
position: relative;
216215
display: block;
217-
min-height: 12rem;
216+
height: 120px;
218217
width: 100%;
218+
overflow: hidden;
219219
}
220220

221221
.header-banner img {
@@ -224,7 +224,7 @@
224224
top: 0;
225225
left: 0;
226226
width: 100%;
227-
height: 50%;
227+
height: 100%;
228228
object-fit: cover;
229229
}
230230

0 commit comments

Comments
 (0)