Skip to content

Commit ff53ea3

Browse files
authored
Feature/template styles (#1)
* Template styles, cleanup of boilerplate. Adding fonts and images
1 parent f6112bd commit ff53ea3

17 files changed

+536
-525
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.fixed-background {
2+
position: fixed;
3+
inset: 0;
4+
width: 100%;
5+
height: max(100%, 100vh, 100dvh);
6+
background: linear-gradient(60deg, #3574B9, #83B581, #3574B9, #AF8CD3, #3574B9, #3185DB);
7+
background-size: 500% 100%;
8+
animation: gradient 30s linear infinite;
9+
animation-direction: alternate;
10+
background-attachment: fixed;
11+
}

blocks/fixed-background/fixed-background.js

Whitespace-only changes.

blocks/footer/footer.css

Lines changed: 124 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,129 @@
11
footer {
2-
background-color: var(--light-color);
3-
font-size: var(--body-font-size-xs);
4-
}
2+
--font-paragraph: 1rem;
53

6-
footer .footer > div {
7-
margin: auto;
8-
max-width: 1200px;
9-
padding: 40px 24px 24px;
10-
}
4+
p+p {
5+
margin-top: .8rem;
6+
}
117

12-
footer .footer p {
13-
margin: 0;
14-
}
8+
.footer-content {
9+
padding-block: 60px;
10+
background-color: var(--clr-css-blue);
11+
color: var(--clr-white);
12+
13+
> div {
14+
width: min(var(--page-max-width), 100% - 2* var(--page-padding));
15+
margin-inline: auto;
16+
}
17+
18+
.columns > div {
19+
align-items: start;
20+
gap: 30px;
21+
}
22+
23+
h5 {
24+
color: var(--clr-white);
25+
font-size: 1.25rem;
26+
font-weight: 500;
27+
margin-top: 0;
28+
margin-bottom: 16px;
29+
}
30+
31+
p a {
32+
text-decoration: underline;
33+
}
34+
35+
ul li {
36+
a {
37+
position: relative;
38+
transition: opacity .2s;
39+
display: flex;
40+
gap: 8px;
41+
align-items: center;
42+
43+
&:hover {
44+
text-decoration: underline;
45+
opacity: .7;
46+
}
47+
48+
&::before {
49+
content: "";
50+
display: block;
51+
background: url("data:image/svg+xml,%3Csvg xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' data-search-ignore='yes' class='c-icon c-icon-arrow-right-circle c-icon--24' width='64' height='64'%3E%3Cdefs%3E%3Csymbol id='sprite-arrow-right-circle' viewBox='0 0 64 64'%3E%3Ctitle%3Earrow-right-circle%3C/title%3E%3Cpath d='M32 62c16.569 0 30-13.431 30-30C62 15.431 48.569 2 32 2 15.431 2 2 15.431 2 32c0 16.569 13.431 30 30 30Zm15-30H17'/%3E%3Cpath d='m35 20 12 12-12 12'/%3E%3C/symbol%3E%3C/defs%3E%3Cuse xlink:href='%23sprite-arrow-right-circle' stroke='%23FFFFFF' fill='none' stroke-width='4px'/%3E%3C/svg%3E") no-repeat center center/100% 100%;
52+
width: 25px;
53+
height: 25px;
54+
}
55+
}
56+
57+
& + li {
58+
margin-top: .8rem;
59+
}
60+
61+
&::marker {
62+
content: "";
63+
display: none;
64+
}
65+
}
66+
}
67+
68+
.footer-menu {
69+
padding-block: 40px;
70+
background: var(--clr-white);
71+
color: var(--clr-css-blue);
72+
73+
/* stylelint-disable-next-line no-descending-specificity */
74+
> div {
75+
width: min(var(--page-max-width), 100% - 2* var(--page-padding));
76+
margin-inline: auto;
77+
display: flex;
78+
justify-content: space-between;
79+
gap: 32px;
80+
81+
@media (width <= 667px) {
82+
flex-direction: column;
83+
align-items: center;
84+
}
85+
}
86+
87+
ul {
88+
display: flex;
89+
gap: 24px;
90+
align-items: center;
91+
92+
@media (width <= 667px) {
93+
&:nth-child(2) {
94+
flex-direction: column;
95+
gap: 12px;
96+
}
97+
}
98+
99+
&:nth-child(1) img {
100+
width: 24px;
101+
height: 24px;
102+
aspect-ratio: auto 1 / 1;
103+
}
104+
105+
/* stylelint-disable-next-line no-descending-specificity */
106+
&:nth-child(2) a {
107+
color: var(--clr-css-blue);
108+
}
109+
110+
/* stylelint-disable-next-line no-descending-specificity */
111+
li {
112+
list-style: none;
113+
}
114+
}
115+
116+
}
117+
118+
a.button:any-link {
119+
font-size: var(--font-xs);
120+
color: var(--clr-css-blue);
121+
text-transform: uppercase;
122+
text-decoration: none;
123+
124+
&:hover {
125+
color: var(--clr-white);
126+
}
127+
}
15128

16-
@media (width >= 900px) {
17-
footer .footer > div {
18-
padding: 40px 32px 24px;
19-
}
20129
}

blocks/footer/footer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ export default async function decorate(block) {
1616
const footer = document.createElement('div');
1717
while (fragment.firstElementChild) footer.append(fragment.firstElementChild);
1818

19+
const classes = ['content', 'menu'];
20+
classes.forEach((c, i) => {
21+
const section = footer.children[i];
22+
if (section) section.classList.add(`footer-${c}`);
23+
});
24+
1925
block.append(footer);
2026
}

0 commit comments

Comments
 (0)