Skip to content

Commit 18309fb

Browse files
adopt Netlify OSS policy plan
1 parent db2fe32 commit 18309fb

3 files changed

Lines changed: 80 additions & 34 deletions

File tree

src/components/footer/footer.js

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,38 @@ export default class Footer extends HTMLElement {
88
connectedCallback() {
99
this.innerHTML = `
1010
<footer class="${styles.footer}">
11-
<div class="${styles.logo}">
12-
${greenwoodLogo}
13-
</div>
14-
<ul class="${styles.socialTray}">
15-
<li class="${styles.socialIcon}">
16-
<a href="https://github.com/ProjectEvergreen/greenwood" title="GitHub">
17-
${githubIcon}
18-
</a>
19-
</li>
11+
<div class="${styles.flexContainer}">
12+
<div class="${styles.logo}">
13+
${greenwoodLogo}
14+
</div>
15+
<div class="${styles.netlifyBanner}">
16+
<a href="https://www.netlify.com/">This site is powered by Netlify</a>
17+
</div>
18+
<div class="${styles.socialTray}">
19+
<ul>
20+
<li class="${styles.socialIcon}">
21+
<a href="https://github.com/ProjectEvergreen/greenwood" title="GitHub">
22+
${githubIcon}
23+
</a>
24+
</li>
2025
21-
<li class="${styles.socialIcon}">
22-
<a href="https://discord.gg/dmDmjFCKuH" title="Discord">
23-
${discordIcon}
24-
</a>
25-
</li>
26+
<li class="${styles.socialIcon}">
27+
<a href="https://discord.gg/dmDmjFCKuH" title="Discord">
28+
${discordIcon}
29+
</a>
30+
</li>
2631
27-
<li class="${styles.socialIcon}">
28-
<a href="https://twitter.com/PrjEvergreen" title="Twitter">
29-
${twitterIcon}
30-
</a>
31-
</li>
32-
</ul>
32+
<li class="${styles.socialIcon}">
33+
<a href="https://twitter.com/PrjEvergreen" title="Twitter">
34+
${twitterIcon}
35+
</a>
36+
</li>
37+
</ul>
38+
</div>
39+
</div>
40+
<div class="${styles.netlifyBannerMobile}">
41+
<a href="https://www.netlify.com/">This site is powered by Netlify</a>
42+
</div>
3343
</footer>
3444
`;
3545
}
Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
.footer {
22
background-color: var(--color-tertiary);
33
padding: var(--size-fluid-1) var(--size-fluid-3);
4+
}
5+
6+
.flexContainer {
47
display: flex;
5-
flex-direction: row;
6-
flex-wrap: wrap;
8+
align-items: center;
79
}
810

911
.logo {
1012
padding-left: var(--size-fluid-1);
1113
display: flex;
1214
flex-direction: column;
13-
flex: 1;
15+
flex: 1 1 30%;
1416
justify-content: center;
1517
color: var(--color-gray);
1618
}
@@ -23,24 +25,58 @@
2325
fill: var(--color-white);
2426
}
2527

28+
.netlifyBanner {
29+
display: none;
30+
flex: 1 1 30%;
31+
justify-content: center;
32+
text-align: center;
33+
34+
& a {
35+
color: var(--color-white);
36+
font-size: var(--font-size-1);
37+
}
38+
}
39+
40+
.netlifyBannerMobile {
41+
text-align: center;
42+
43+
& a {
44+
color: var(--color-white);
45+
font-size: var(--font-size-1);
46+
}
47+
}
48+
2649
.socialTray {
50+
flex: 1 1 30%;
2751
display: flex;
28-
gap: var(--size-2);
29-
list-style-type: none;
30-
background-color: var(--color-secondary);
31-
border: var(--border-size-1) solid var(--color-black);
32-
border-radius: var(--radius-6);
33-
padding: var(--size-2) var(--size-3);
34-
align-items: center;
35-
justify-content: center;
36-
cursor: pointer;
52+
justify-content: end;
53+
54+
& ul {
55+
display: inline-flex;
56+
gap: var(--size-3);
57+
list-style-type: none;
58+
background-color: var(--color-secondary);
59+
border: var(--border-size-1) solid var(--color-black);
60+
border-radius: var(--radius-6);
61+
padding: var(--size-2) var(--size-3);
62+
cursor: pointer;
63+
}
3764
}
3865

3966
.socialIcon {
40-
display: flex;
4167
align-items: center;
4268
}
4369

4470
.socialIcon svg {
4571
fill: var(--color-gray);
4672
}
73+
74+
@media (min-width: 768px) {
75+
.netlifyBanner {
76+
display: flex;
77+
}
78+
79+
.netlifyBannerMobile {
80+
display: none;
81+
}
82+
}

src/components/footer/footer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe("Components/Footer", () => {
3333
});
3434

3535
it("should have the Greenwood logo", () => {
36-
const logo = footer.querySelectorAll("div svg");
36+
const logo = footer.querySelectorAll("div > svg");
3737

3838
expect(logo.length).equal(1);
3939
expect(logo[0]).not.equal(undefined);

0 commit comments

Comments
 (0)