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
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/index" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/placeholders.json" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/.helix/headers.json" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/docs/library/library.json" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/metadata.json" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/fragments/gnav" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/fragments/footer" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/fragments/demo" && | |
curl -X POST "https://admin.hlx.page/preview/adobecom/milo-college/main/fragments/404" && | |
curl -X POST "https://admin.hlx.page/live/adobecom/milo-college/main/index" && |
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
/* | |
* A Cloudflare Worker to accept `.html` requests | |
* and forward to Franklin. | |
* | |
* This is helpful for any site that wishes to continue | |
* using `.html` for legacy reasons. | |
* | |
*/ | |
const removeHtml = (path) => { | |
const pathSplit = path.split('/'); |
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
## Re-sync all github code to Helix Code Bus | |
curl -X POST "https://admin.hlx3.page/code/{{github-user}}/{{repo}}/{{branch}}/*" | |
## Re-sync github file to Helix Code Bus | |
curl -X POST "https://admin.hlx3.page/code/{{github-user}}/{{repo}}/{{branch}}/scripts.js" | |
## "Preview" a page | |
curl -X POST "https://admin.hlx3.page/preview/{{github-user}}/{{repo}}/{{branch}}/path/to/page" | |
## "Publish" a page |
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
.accordion { | |
background: #EFEFEF; | |
border: 1px solid #dddddd; | |
border-radius: 6px; | |
} | |
.accordion .item-title { | |
cursor: pointer; | |
padding: 12px; | |
border-bottom: 1px solid #dddddd; |
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
function decorateAccordion(el) { | |
const titles = el.querySelectorAll(':scope > div:nth-child(odd)'); | |
titles.forEach((title) => { | |
// Add a class to the title container | |
title.classList.add('item-title'); | |
// Remove the empty div | |
title.querySelector(':scope > div:last-of-type').remove(); | |
// Add a class to the content | |
title.nextElementSibling.classList.add('item-content'); | |
// Add a click handler to open the content |
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
<div class="accordion"> | |
<div> | |
<div>Guatemala Huehuetenango Finca Rosma</div> | |
<div></div> | |
</div> | |
<div> | |
<div> | |
<picture> | |
<source media="(max-width: 400px)" srcset="./media_1.jpeg?width=750"> | |
<img src="./media_1.jpeg?width=2000" loading="lazy"> |
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
<div class="accordion"></div> |
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
<div></div> |
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
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<script src="/scripts.js" type="module"></script> | |
<link rel="stylesheet" href="/styles.css"/> |
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
const hero = document.querySelector('.hero'); | |
console.log(hero); |
NewerOlder