Skip to content

Commit 738e4c8

Browse files
committed
bug-fixes and mobile-1
1 parent 2b31db7 commit 738e4c8

File tree

4 files changed

+38
-9
lines changed

4 files changed

+38
-9
lines changed

images/SpaceJoy-mobile.jpg

905 KB
Loading

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,23 +271,23 @@ <h3>Contact Us</h3>
271271
<ul class="horizontal-items">
272272
<li>
273273
<img
274-
id="facebook"
274+
id="fb"
275275
src="images/svg/facebook-svgrepo-com.svg"
276276
alt="Facebook"
277277
width="45px"
278278
/>
279279
</li>
280280
<li>
281281
<img
282-
id="twitter"
282+
id="tw"
283283
src="images/svg/twitter-svgrepo-com.svg"
284284
alt="Twitter"
285285
width="45px"
286286
/>
287287
</li>
288288
<li>
289289
<img
290-
id="instagram"
290+
id="ig"
291291
src="images/svg/instagram-svgrepo-com.svg"
292292
alt="Instagram"
293293
width="45px"

script.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const floatingButton = document.querySelector("#floating-button");
22

3-
const facebook = document.querySelector("#facebook");
4-
const twitter = document.querySelector("#twitter");
5-
const instagram = document.querySelector("#instagram");
3+
const facebookTop = document.querySelector("#facebook");
4+
const twitterTop = document.querySelector("#twitter");
5+
const instagramTop = document.querySelector("#instagram");
66

77
const allServices = document.querySelector("#view-services");
88
const allProjects1 = document.querySelector("#view-projects");
@@ -12,22 +12,26 @@ const address = document.querySelector("#address");
1212
const email = document.querySelector("#email");
1313
const phone = document.querySelector("#phone");
1414

15+
const facebookBottom = document.querySelector("#fb");
16+
const twitterBottom = document.querySelector("#tw");
17+
const instagramBottom = document.querySelector("#ig");
18+
1519
const submit = document.querySelector("#submit");
1620

1721
floatingButton.addEventListener("click", () => {
1822
const name = document.querySelector("#name");
1923
name.focus();
2024
});
2125

22-
facebook.addEventListener("click", () => {
26+
facebookTop.addEventListener("click", () => {
2327
window.open("https://www.facebook.com", "_blank");
2428
});
2529

26-
twitter.addEventListener("click", () => {
30+
twitterTop.addEventListener("click", () => {
2731
window.open("https://www.twitter.com", "_blank");
2832
});
2933

30-
instagram.addEventListener("click", () => {
34+
instagramTop.addEventListener("click", () => {
3135
window.open("https://www.instagram.com", "_blank");
3236
});
3337

@@ -55,6 +59,18 @@ phone.addEventListener("click", () => {
5559
window.open("tel:+1-888-405-8908", "_blank");
5660
});
5761

62+
facebookBottom.addEventListener("click", () => {
63+
window.open("https://www.facebook.com", "_blank");
64+
});
65+
66+
twitterBottom.addEventListener("click", () => {
67+
window.open("https://www.twitter.com", "_blank");
68+
});
69+
70+
instagramBottom.addEventListener("click", () => {
71+
window.open("https://www.instagram.com", "_blank");
72+
});
73+
5874
submit.addEventListener("click", () => {
5975
const name = document.querySelector("#name");
6076
const email = document.querySelector("#email");

style.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
color: white;
1313
min-width: 680px;
1414
}
15+
16+
#floating-button {
17+
right: 1.25rem;
18+
}
19+
20+
.background {
21+
background-image: url(images/SpaceJoy-mobile.jpg);
22+
}
23+
24+
.header {
25+
padding-top: 1.5rem;
26+
background-color: #121212;
27+
}
1528
}
1629

1730
body {

0 commit comments

Comments
 (0)