|
10 | 10 | border: none; /* Clean edges */ |
11 | 11 | } |
12 | 12 |
|
| 13 | +/* Title Container */ |
13 | 14 | .title-container { |
14 | 15 | flex: 1; /* Ensures the text container takes up available space */ |
15 | 16 | padding: 15px; /* Adds spacing around the text */ |
16 | 17 | color: #ffffff; /* White text for contrast */ |
17 | | - background-image: url('/assets/images/slugs/pixel-bg.jpg'); /* Path to your background image */ |
| 18 | + background-image: url('path-to-your-image.jpg'); /* Path to your background image */ |
18 | 19 | background-size: cover; /* Ensures the background image covers the container */ |
19 | 20 | background-repeat: no-repeat; /* Prevents tiling */ |
20 | 21 | background-position: center; /* Centers the image */ |
21 | 22 | height: 100%; /* Matches the height of the parent container */ |
22 | 23 | width: 100%; /* Spans the full width of its flex space */ |
23 | 24 | } |
24 | 25 |
|
| 26 | +/* Page Title */ |
25 | 27 | .page-title { |
26 | 28 | font-size: 1.8rem; /* Bold and large for emphasis */ |
27 | 29 | font-weight: bold; |
28 | 30 | margin: 0; |
29 | 31 | color: #ffffff; /* White for the title */ |
30 | 32 | } |
31 | 33 |
|
| 34 | +/* Page Subtitle */ |
32 | 35 | .page-subtitle { |
33 | 36 | font-size: 1rem; /* Smaller subtitle text */ |
34 | 37 | margin-top: 5px; |
35 | 38 | color: #ffffff; /* White for the subtitle */ |
36 | 39 | } |
37 | 40 |
|
| 41 | +/* Image Container */ |
38 | 42 | .image-container { |
39 | | - width: 100%; /* Full width for smaller screens */ |
40 | | - height: auto; /* Adjust height dynamically */ |
41 | | - margin: 0; /* Removes unwanted gaps */ |
42 | | - padding: 0; /* Ensures no extra space inside the container */ |
43 | | - overflow: hidden; /* Ensures no visual overflow */ |
| 43 | + flex-shrink: 0; /* Prevents the image container from shrinking */ |
| 44 | + width: 290px; /* Fixed width for consistency */ |
| 45 | + height: 160px; /* Fixed height to match the `.slug` */ |
| 46 | + overflow: hidden; /* Clips any overflowing content */ |
| 47 | + margin: 0; /* Ensures no gaps */ |
44 | 48 | } |
45 | 49 |
|
| 50 | +/* Image Styling */ |
46 | 51 | .image-container img { |
47 | | - display: block; /* Fixes inline spacing issues */ |
48 | | - width: 100%; /* Scales the image to fit the container width */ |
49 | | - height: auto; /* Maintains the aspect ratio of the image */ |
| 52 | + display: block; /* Eliminates inline-block spacing quirks */ |
| 53 | + width: 100%; /* Ensures the image fills the container width */ |
| 54 | + height: 100%; /* Matches the parent container height */ |
| 55 | + object-fit: cover; /* Ensures the image fills the container neatly */ |
50 | 56 | margin: 0; /* Removes default margins */ |
51 | 57 | } |
52 | 58 |
|
| 59 | +/* Responsive Design */ |
53 | 60 | @media (max-width: 768px) { |
54 | 61 | .slug { |
55 | 62 | flex-direction: column; /* Stacks items vertically on smaller screens */ |
|
0 commit comments