Skip to content

Commit f10a682

Browse files
giacomocavalierilpil
authored andcommitted
add waves and happy Lucy
1 parent 0ac5dec commit f10a682

File tree

1 file changed

+61
-6
lines changed

1 file changed

+61
-6
lines changed

src/survey.gleam

+61-6
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,20 @@ const html_head = "
119119
<> "</style>
120120
</head>
121121
<body>
122-
<img src='https://gleam.run/images/lucy/lucy.svg'>
123-
<h1>Gleam Developer Survey 2024</h1>
122+
<header>
123+
<div class='hero'>
124+
<div class='lucy-container'>
125+
<img class='lucy' src='https://gleam.run/images/lucy/lucy.svg'>
126+
</div>
127+
<h1>Gleam Developer Survey 2024</h1>
128+
</div>
129+
<img class='waves' src='https://gleam.run/images/waves.svg'>
130+
</header>
131+
<main>
124132
"
125133

126134
const html_foot = "
135+
</main>
127136
<footer>
128137
This website is written in Gleam.
129138
<a href='https://github.com/gleam-lang/developer-survey'>View the source
@@ -755,9 +764,18 @@ const css = "
755764
--font-family-normal: 'Outfit', sans-serif;
756765
--font-family-title: 'Lexend', sans-serif;
757766
--color-underwater-blue: #292d3e;
767+
--color-aged-plastic-yellow: #fffbe8;
758768
--color-white: #fefefc;
759769
--color-faff-pink: #ffaff3;
770+
--color-blacker: #151515;
760771
--width-content: 640px;
772+
773+
--waves-height: 100px;
774+
--waves-width: 1200px;
775+
776+
--font-weight-normal: 400;
777+
--font-weight-title-bold: 700;
778+
761779
--font-size-normal: 18px;
762780
--gap-1: 10px;
763781
--gap-2: calc(var(--gap-1) * 2);
@@ -778,9 +796,17 @@ body {
778796
-webkit-font-smoothing: antialiased;
779797
}
780798
799+
header {
800+
width: 100%;
801+
padding-top: var(--gap-2);
802+
background-color: var(--color-aged-plastic-yellow);
803+
color: var(--color-blacker);
804+
text-align: center;
805+
overflow: hidden;
806+
}
807+
781808
img, picture, video, canvas, svg {
782809
display: block;
783-
max-width: 100%;
784810
}
785811
786812
input, button, textarea, select {
@@ -812,13 +838,29 @@ body {
812838
color: var(--color-white);
813839
font-family: var(--font-family-normal);
814840
font-size: var(--font-size-normal);
841+
}
842+
843+
main {
815844
max-width: 100%;
816845
width: var(--width-content);
817846
margin: 0 auto;
818847
padding: var(--gap-2);
819848
}
820849
821-
h1,
850+
.waves {
851+
position: relative;
852+
--overlap: 5px;
853+
bottom: calc(var(--overlap) * -1);
854+
height: var(--waves-height);
855+
width: calc(max(100%, var(--waves-width)) + calc(var(--overlap) * 2));
856+
left: min(0px, calc(calc(100vw - var(--waves-width)) * 0.2));
857+
}
858+
859+
h1 {
860+
font-family: var(--font-family-title);
861+
font-weight: var(--font-weight-title-bold);
862+
}
863+
822864
h2,
823865
h3,
824866
h4,
@@ -886,8 +928,21 @@ footer {
886928
font-size: 80%;
887929
}
888930
889-
img {
890-
margin: 0 auto;
931+
.hero {
932+
display: flex;
933+
flex-direction: column;
934+
justify-content: space-between;
935+
align-items: center;
936+
}
937+
938+
.lucy {
939+
margin: 0;
891940
max-width: 200px;
941+
transition: transform 0.2s ease;
942+
}
943+
944+
.lucy-container:hover .lucy {
945+
content: url('https://gleam.run/images/lucy/lucyhappy.svg');
946+
transform: rotate(23deg);
892947
}
893948
"

0 commit comments

Comments
 (0)