forked from PGATOUR/franklin-the-players
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
7f61cfd
commit d0823c0
Showing
20 changed files
with
838 additions
and
659 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,53 @@ | ||
.cards > ul { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); | ||
grid-gap: 16px; | ||
main .section.cards-horizontal-container { | ||
background-color: #00386b; | ||
color: white; | ||
padding: 16px; | ||
} | ||
|
||
.cards > ul > li { | ||
border: 1px solid var(--highlight-background-color); | ||
background-color: var(--background-color) | ||
.cards > div { | ||
display: flex; | ||
flex-direction: column; | ||
font-size: var(--body-font-size-s); | ||
margin: 16px 0; | ||
background-color: white; | ||
padding: 16px; | ||
color: var(--text-color); | ||
} | ||
|
||
.cards .cards-card-body { | ||
margin: 16px; | ||
.cards h2 { | ||
font-size: var(--heading-font-size-m); | ||
} | ||
|
||
.cards .cards-card-image { | ||
line-height: 0; | ||
.cards h3 { | ||
font-size: var(--heading-font-size-s); | ||
} | ||
|
||
.cards .cards-card-body > *:first-child { | ||
margin-top: 0; | ||
main .section.cards-horizontal-container h3 { | ||
font-size: var(--heading-font-size-s); | ||
margin-bottom: 64px; | ||
} | ||
|
||
.cards > ul > li img { | ||
width: 100%; | ||
aspect-ratio: 4 / 3; | ||
|
||
.cards img { | ||
width: 150px; | ||
height: 150px; | ||
border-radius: 75px; | ||
object-fit: cover; | ||
} | ||
|
||
@media (min-width: 600px) { | ||
.cards > div { | ||
flex-direction: unset; | ||
} | ||
|
||
.cards > div > div { | ||
flex: 0 0 1fr; | ||
} | ||
|
||
.cards > div > div.cards-contains-image { | ||
flex: 0 0 150px; | ||
margin-right: 32px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,18 +1,5 @@ | ||
import { createOptimizedPicture } from '../../scripts/scripts.js'; | ||
|
||
export default function decorate(block) { | ||
/* change to ul, li */ | ||
const ul = document.createElement('ul'); | ||
[...block.children].forEach((row) => { | ||
const li = document.createElement('li'); | ||
li.innerHTML = row.innerHTML; | ||
[...li.children].forEach((div) => { | ||
if (div.children.length === 1 && div.querySelector('picture')) div.className = 'cards-card-image'; | ||
else div.className = 'cards-card-body'; | ||
}); | ||
ul.append(li); | ||
block.querySelectorAll('img').forEach((img) => { | ||
img.closest('div').classList.add('cards-contains-image'); | ||
}); | ||
ul.querySelectorAll('img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]))); | ||
block.textContent = ''; | ||
block.append(ul); | ||
} |
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 |
---|---|---|
@@ -1,25 +1,32 @@ | ||
.columns > div { | ||
display: flex; | ||
flex-direction: column; | ||
.columns { | ||
font-size: var(--body-font-size-s); | ||
} | ||
|
||
.columns img { | ||
width: 100%; | ||
.columns > div > div { | ||
background-color: white; | ||
} | ||
|
||
@media (min-width: 900px) { | ||
.columns h2 { | ||
font-size: var(--heading-font-size-m); | ||
text-transform: uppercase; | ||
} | ||
|
||
.columns div div > * { | ||
margin-left: 32px; | ||
margin-right: 32px; | ||
} | ||
|
||
.columns div div > p.columns-contains-image { | ||
margin: 0; | ||
} | ||
|
||
@media (min-width: 600px) { | ||
.columns > div { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: unset; | ||
} | ||
|
||
.columns > div > div { | ||
flex: 1; | ||
margin-left: 32px; | ||
} | ||
|
||
.columns > div > div:first-of-type { | ||
margin-left: unset; | ||
margin: 16px; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export default function decorate(block) { | ||
const cols = [...block.firstElementChild.children]; | ||
block.classList.add(`columns-${cols.length}-cols`); | ||
block.querySelectorAll('img').forEach((img) => { | ||
img.closest('p').classList.add('columns-contains-image'); | ||
}); | ||
} |
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,5 @@ | ||
/* block specific CSS goes here */ | ||
main .example { | ||
background-color: var(--overlay-background-color); | ||
padding: 1em; | ||
} |
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,13 @@ | ||
export default function decorate(block) { | ||
// turn links into buttons | ||
block.querySelectorAll(':scope a').forEach((a) => { | ||
const button = document.createElement('button'); | ||
button.title = a.title || a.textContent; | ||
button.textContent = a.textContent; | ||
button.addEventListener('click', () => { | ||
block.dataset.buttonClicked = a.href; | ||
window.open(a.href); | ||
}); | ||
a.replaceWith(button); | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,14 +1,24 @@ | ||
footer { | ||
padding: 2rem; | ||
background-color: var(--overlay-background-color); | ||
background-color: white; | ||
font-size: var(--body-font-size-s); | ||
} | ||
|
||
footer .footer { | ||
max-width: 1200px; | ||
max-width: 768px; | ||
margin: auto; | ||
} | ||
|
||
footer .footer .footer-logos > div { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
} | ||
|
||
footer .footer .footer-logos img { | ||
height: 45px; | ||
} | ||
|
||
footer .footer p { | ||
margin: 0; | ||
} |
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
mountpoints: | ||
/: https://drive.google.com/drive/u/0/folders/1MGzOt7ubUh3gu7zhZIPb7R7dyRzG371j | ||
/: https://adobe.sharepoint.com/:f:/r/sites/HelixProjects/Shared%20Documents/sites/pga-tour/theplayers-com |
Oops, something went wrong.