Skip to content

Commit 30395c8

Browse files
committed
Add banner image to page
With avif versions for modern browsers. Make the font a little heavier and bigger.
1 parent a7e6b1d commit 30395c8

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed
227 KB
Binary file not shown.
148 KB
Binary file not shown.
177 KB
Binary file not shown.

index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<meta name="description" content="A group of Python and data enthusiasts in Helsinki, Finland.">
7-
<link rel="stylesheet" href="style.css?v=3">
7+
<link rel="stylesheet" href="style.css?v=4">
88
<body>
9+
<div class="banner">
10+
<picture>
11+
<source type="image/avif" media="(min-width: 768px)" srcset="assets/pydata-helsinki-banner-16x9.avif">
12+
<source type="image/avif" media="(min-width: 480px)" srcset="assets/pydata-helsinki-banner-4x3.avif">
13+
<source type="image/avif" srcset="assets/pydata-helsinki-banner-1x1.avif">
14+
<source media="(min-width: 768px)" srcset="assets/pydata-helsinki-banner-16x9.png">
15+
<source media="(min-width: 480px)" srcset="assets/pydata-helsinki-banner-4x3.png">
16+
<img
17+
src="assets/pydata-helsinki-banner-1x1.png"
18+
alt="Helsinki Cathedral at Nightfall, photo by Tapio Haaja, overlaid with 'PyData Helsinki'"
19+
class="banner-image"
20+
>
21+
</picture>
22+
</div>
923
<hgroup>
1024
<h1>PyData Helsinki</h1>
1125
<p>A group of Python and data enthusiasts in Helsinki, Finland</p>

style.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ img, picture, video, canvas, svg {
3232

3333
body {
3434
font-family: var(--font-family);
35-
font-size: 1rem;
35+
font-weight: 450;
36+
font-size: 1.1rem;
3637
color: var(--text-color);
3738
background-color: var(--background-color);
3839
padding: 2rem 1rem;
@@ -86,6 +87,21 @@ a:hover {
8687
text-decoration: underline;
8788
}
8889

90+
.banner {
91+
width: 100vw;
92+
margin-left: calc(-50vw + 50%);
93+
margin-top: -2rem;
94+
margin-bottom: 2rem;
95+
overflow: hidden;
96+
}
97+
98+
.banner-image {
99+
width: 100%;
100+
height: auto;
101+
display: block;
102+
border-radius: 0;
103+
}
104+
89105
footer {
90106
margin-top: 3rem;
91107
padding-top: 1.5rem;

0 commit comments

Comments
 (0)