Skip to content

Commit 18b4914

Browse files
jesseabordenJesse Borden
andauthored
UI Style Tweaks (#1004)
* Add misc mobile and desktop component styles. * Update hero animation logo speed. --------- Co-authored-by: Jesse Borden <[email protected]>
1 parent 864d6af commit 18b4914

File tree

5 files changed

+164
-59
lines changed

5 files changed

+164
-59
lines changed

assets/javascripts/new-javascripts/hero.js

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const heroAnimation = async () => {
2-
const isReduceMotionEnabled = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
2+
const isReduceMotionEnabled = window.matchMedia(
3+
'(prefers-reduced-motion: reduce)',
4+
).matches
35
const urlParams = new URLSearchParams(location.search)
46
const hasDebugParam = urlParams.has('debug')
57

@@ -118,7 +120,12 @@ const heroAnimation = async () => {
118120
return { ctx, pathInstance }
119121
}
120122

121-
const initLogo = ({ canvas, image, positionStart: [posX, posY], positionEnd: [endX, endY] }) => {
123+
const initLogo = ({
124+
canvas,
125+
image,
126+
positionStart: [posX, posY],
127+
positionEnd: [endX, endY],
128+
}) => {
122129
const ctx = canvas.getContext('2d')
123130
// Same reason for conversion as initSwoops
124131
ctx.translate(posX - image.naturalWidth / 2, posY - image.naturalHeight / 2)
@@ -128,9 +135,9 @@ const heroAnimation = async () => {
128135
ctx.drawImage(image, 0, 0)
129136
} else {
130137
ctx.globalAlpha = 1
131-
const deltaX = endX - posX;
132-
const deltaY = endY - posY;
133-
ctx.drawImage(image, deltaX, deltaY);
138+
const deltaX = endX - posX
139+
const deltaY = endY - posY
140+
ctx.drawImage(image, deltaX, deltaY)
134141
}
135142

136143
return ctx
@@ -147,11 +154,11 @@ const heroAnimation = async () => {
147154
logo.image = logoImage
148155
// init canvas for each swoop layer
149156
heroSwoops.forEach((swoop, i) => {
150-
swoop.image = swoopImages[i];
151-
const canvasData = initSwoops(swoop);
152-
swoop.ctx = canvasData.ctx;
153-
swoop.pathInstance = canvasData.pathInstance;
154-
});
157+
swoop.image = swoopImages[i]
158+
const canvasData = initSwoops(swoop)
159+
swoop.ctx = canvasData.ctx
160+
swoop.pathInstance = canvasData.pathInstance
161+
})
155162
// init logo canvas
156163
logo.ctx = initLogo(logo)
157164
} catch (error) {
@@ -160,7 +167,7 @@ const heroAnimation = async () => {
160167
}
161168

162169
if (isReduceMotionEnabled) {
163-
return;
170+
return
164171
}
165172

166173
const DURATION = 1000
@@ -271,7 +278,7 @@ const heroAnimation = async () => {
271278
logo.state,
272279
{
273280
ease: 'out(1.1)',
274-
duration: 250,
281+
duration: 200,
275282
delay: 750,
276283
progress: 1,
277284
// ease: 'inOutQuad',

assets/stylesheets/new-stylesheets/includes/footer/_base.scss

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
}
1313

1414
footer.global-footer {
15-
background-color: #1E162E;
15+
background-color: #1e162e;
1616
padding: 20px;
1717
text-align: center;
1818
padding: 6rem 3rem 3rem 3.5em;
1919
color: rgb(235, 236, 240);
20+
position: relative;
2021
z-index: 10;
2122

2223
.container {
@@ -31,23 +32,23 @@ footer.global-footer {
3132
margin-bottom: 5em;
3233

3334
.logo {
34-
display: flex;
35-
height: 36px;
36-
margin-bottom: 15px;
35+
display: flex;
36+
height: 36px;
37+
margin-bottom: 15px;
3738

38-
svg {
39-
height: 100%;
40-
}
39+
svg {
40+
height: 100%;
41+
}
4142

42-
#logotype {
43-
fill: #ebecf0;
44-
}
43+
#logotype {
44+
fill: #ebecf0;
45+
}
4546
}
4647

4748
h3 {
4849
height: 36px;
4950
margin-bottom: 15px;
50-
color: #FCA76C;
51+
color: #fca76c;
5152
font-size: 1.17em;
5253
line-height: 1.2;
5354
font-weight: bold;
@@ -130,7 +131,7 @@ footer.global-footer {
130131
}
131132

132133
input:checked + .color-scheme-toggle-label {
133-
background: #FCA76C;
134+
background: #fca76c;
134135
color: #1e162e;
135136
}
136137
}
@@ -144,20 +145,19 @@ footer.global-footer {
144145
align-items: flex-end;
145146
color: #d1d2d4;
146147

147-
148148
nav {
149149
display: inline-block;
150150

151-
ul {
152-
list-style: none;
153-
padding: 0;
154-
margin: 0;
155-
display: inline-flex;
151+
ul {
152+
list-style: none;
153+
padding: 0;
154+
margin: 0;
155+
display: inline-flex;
156156

157-
a {
158-
color: #d1d2d4;
159-
}
157+
a {
158+
color: #d1d2d4;
160159
}
160+
}
161161
}
162162

163163
.legals {
@@ -168,7 +168,9 @@ footer.global-footer {
168168
margin-bottom: 1.5em;
169169
line-height: 1.5em;
170170

171-
p { margin: 0; }
171+
p {
172+
margin: 0;
173+
}
172174

173175
a {
174176
color: #d1d2d4;
@@ -180,7 +182,7 @@ footer.global-footer {
180182
margin-right: 1.75em;
181183

182184
a {
183-
padding: .35em 0;
185+
padding: 0.35em 0;
184186
border-bottom: 1px solid transparent;
185187

186188
&:hover {
@@ -205,24 +207,24 @@ footer.global-footer {
205207
&.github {
206208
@include icon-style($icon-github);
207209
}
208-
210+
209211
&.bluesky {
210212
@include icon-style($icon-bluesky);
211213
}
212-
214+
213215
&.feed {
214216
@include icon-style($icon-feed);
215217
}
216-
218+
217219
&.mastodon {
218220
@include icon-style($icon-mastodon);
219221
}
220-
222+
221223
&.x {
222224
@include icon-style($icon-x);
223225
}
224226
}
225227
}
226228
}
227229
}
228-
}
230+
}

0 commit comments

Comments
 (0)