Skip to content

Commit 83f4d72

Browse files
feat: add style and markup for projects section
1 parent 830f665 commit 83f4d72

16 files changed

+312
-57
lines changed

src/.DS_Store

6 KB
Binary file not shown.

src/app.js

+29-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
console.log("hello world");
1+
function addAriaHiddenOnResize() {
2+
// if screen size is 1200px or greater, add aria-hidden to mobile gif
3+
// otherwise add aria-hidden to desktop gif
4+
const mobileGifs = document.getElementsByClassName('projects__gif--mobile');
5+
const desktopGifs = document.getElementsByClassName('projects__gif--desktop');
6+
const windowWidth = window.innerWidth;
7+
8+
for (var i = 0; i < mobileGifs.length; i++) {
9+
var element = mobileGifs[i];
10+
if (windowWidth >= 1200) {
11+
element.setAttribute('aria-hidden', 'true');
12+
} else {
13+
element.removeAttribute('aria-hidden');
14+
}
15+
}
16+
17+
for (var i = 0; i < desktopGifs.length; i++) {
18+
var element = desktopGifs[i];
19+
if (windowWidth >= 1200) {
20+
element.removeAttribute('aria-hidden');
21+
} else {
22+
element.setAttribute('aria-hidden', 'true');
23+
}
24+
}
25+
}
26+
27+
window.addEventListener('resize', addAriaHiddenOnResize);
28+
29+
addAriaHiddenOnResize();

src/images/colorTiles.gif

6.97 MB
Loading

src/images/passwordGenerator.gif

2.99 MB
Loading
File renamed without changes.
File renamed without changes.

src/images/tech-svgs/html5.svg

-1
This file was deleted.

src/images/tech-svgs/jest.svg

+1
Loading
File renamed without changes.

src/images/tech-svgs/parcel.png

3.2 KB
Loading
File renamed without changes.

src/images/tech-svgs/solid.svg

+1
Loading

0 commit comments

Comments
 (0)