-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
130 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { css, html } from "../html-css-utils.js"; | ||
|
||
class Footer extends HTMLElement { | ||
constructor() { | ||
super(); | ||
|
||
this.render(); | ||
} | ||
|
||
render() { | ||
this.attachShadow({ mode: "open" }); | ||
this.shadowRoot.innerHTML = this.createCss() + this.createHtml(); | ||
} | ||
|
||
createCss() { | ||
return css` | ||
:host { | ||
display: block; | ||
height: 400px; | ||
color: white; | ||
background-color: var(--text-900); | ||
padding: 80px 27px; | ||
@media only screen and (min-width: 768px) { | ||
padding: 180px 76px 100px 76px; | ||
} | ||
@media only screen and (min-width: 1550px) { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
} | ||
footer { | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
max-width: 1550px; | ||
@media only screen and (min-width: 1550px) { | ||
flex: 1; | ||
} | ||
} | ||
section { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 40px; | ||
@media only screen and (min-width: 768px) { | ||
flex-direction: row; | ||
justify-content: space-between; | ||
} | ||
} | ||
p { | ||
border-top: 1px solid rgba(253, 253, 255, 0.75); | ||
font-size: 14px; | ||
color: var(--bg-100); | ||
opacity: 0.75; | ||
margin-top: 26px; | ||
padding-top: 20px; | ||
@media only screen and (min-width: 768px) { | ||
margin-top: 50px; | ||
padding-top: 20px; | ||
} | ||
@media only screen and (min-width: 1024px) { | ||
padding-top: 48px; | ||
} | ||
} | ||
`; | ||
} | ||
|
||
createHtml() { | ||
return html`<footer> | ||
<section> | ||
<slot name="footer-link-list"></slot> | ||
<slot name="icon-link-list"></slot> | ||
</section> | ||
<p>ยฉ 2024 Dale Study. All rights reserved.</p> | ||
</footer>`; | ||
} | ||
} | ||
|
||
customElements.define("ds-footer", Footer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters