Skip to content

Commit f1d6939

Browse files
authored
Merge pull request #299 from tjklint/refactor(1page)
docs: commented footer.scss for better code readabliity.
2 parents 4ef85e2 + 04fcec5 commit f1d6939

File tree

1 file changed

+78
-74
lines changed

1 file changed

+78
-74
lines changed

src/components/footer/footer.scss

Lines changed: 78 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,89 @@
11
.footer-container {
2-
background-color: #1e1e1e;
3-
color: #fff;
4-
padding: 20px 40px;
5-
text-align: center;
6-
font-family: 'RobotoMono', sans-serif;
7-
display: grid;
8-
grid-template-columns: repeat(3, 1fr); /* Three equal columns */
9-
align-items: center;
10-
2+
background-color: #1e1e1e; /* Dark background for the footer */
3+
color: #fff; /* White text color */
4+
padding: 20px 40px; /* Padding around the content */
5+
text-align: center; /* Center text by default */
6+
font-family: 'RobotoMono', sans-serif;
7+
display: grid;
8+
grid-template-columns: repeat(3, 1fr); /* Three equal-width columns */
9+
align-items: center; /* Vertically align items in the grid */
10+
11+
/* Stack the footer elements vertically on smaller screens */
12+
@media (max-width: 768px) {
13+
display: flex;
14+
flex-direction: column; /* Stack items vertically */
15+
text-align: center; /* Ensure text remains centered */
16+
gap: 10px; /* Add spacing between stacked items */
17+
}
18+
19+
.footer-content {
20+
display: flex;
21+
flex-direction: column;
22+
align-items: center; /* Center align content in each column */
23+
24+
/* Ensure alignment stays centered on smaller screens */
1125
@media (max-width: 768px) {
12-
display: flex;
13-
flex-direction: column; /* Stack items vertically */
14-
text-align: center;
15-
gap: 10px;
16-
}
17-
18-
.footer-content {
19-
display: flex;
20-
flex-direction: column;
2126
align-items: center;
22-
23-
@media (max-width: 768px) {
24-
align-items: center;
25-
text-align: center;
26-
}
27-
}
28-
29-
.purple-heart {
30-
color: #8a2be2;
31-
}
32-
33-
.footer-link {
34-
color: #8a2be2;
35-
text-decoration: underline;
36-
margin-left: 5px;
37-
}
38-
39-
.social-icons {
40-
display: flex;
41-
justify-content: flex-end;
42-
gap: 20px;
43-
44-
@media (max-width: 768px) {
45-
justify-content: center;
46-
}
47-
48-
a {
49-
color: #d3d3d3;
50-
font-size: 1.5em;
51-
transition: color 0.3s;
52-
53-
&:hover {
54-
color: #8a2be2;
55-
}
56-
}
27+
text-align: center;
5728
}
58-
59-
p {
60-
margin: 0;
29+
}
30+
31+
.purple-heart {
32+
color: #8a2be2; /* Purple color for the heart icon */
33+
}
34+
35+
.footer-link {
36+
color: #8a2be2; /* Purple color for footer links */
37+
text-decoration: underline; /* Underline links */
38+
margin-left: 5px; /* Small left margin to separate from text */
39+
}
40+
41+
.social-icons {
42+
display: flex;
43+
justify-content: flex-end; /* Align social icons to the right */
44+
gap: 20px; /* Add space between icons */
45+
46+
/* Center the social icons on smaller screens */
47+
@media (max-width: 768px) {
48+
justify-content: center;
6149
}
62-
63-
.left-align {
64-
text-align: left;
65-
66-
@media (max-width: 768px) {
67-
text-align: center; /* Center-align on mobile */
68-
padding-down: 5px;
50+
51+
a {
52+
color: #d3d3d3; /* Light grey for social icons */
53+
font-size: 1.5em; /* Size of social icons */
54+
transition: color 0.3s; /* Smooth transition for hover effect */
55+
56+
&:hover {
57+
color: #8a2be2; /* Change icon color to purple on hover */
6958
}
7059
}
71-
72-
.center-align {
60+
}
61+
62+
p {
63+
margin: 0; /* Remove default paragraph margin */
64+
}
65+
66+
.left-align {
67+
text-align: left; /* Align text to the left */
68+
69+
/* Center-align on mobile */
70+
@media (max-width: 768px) {
7371
text-align: center;
72+
padding-bottom: 5px; /* Add space below the text */
7473
}
75-
76-
.right-align {
77-
text-align: right;
78-
79-
@media (max-width: 768px) {
80-
text-align: center; /* Center-align on mobile */
81-
padding-top: 5px;
82-
}
74+
}
75+
76+
.center-align {
77+
text-align: center; /* Center text */
78+
}
79+
80+
.right-align {
81+
text-align: right; /* Align text to the right */
82+
83+
/* Center-align on mobile */
84+
@media (max-width: 768px) {
85+
text-align: center;
86+
padding-top: 5px; /* Add space above the text */
8387
}
8488
}
85-
89+
}

0 commit comments

Comments
 (0)