Skip to content

Instantly share code, notes, and snippets.

View stephenhmarsh's full-sized avatar

Stephen Marsh stephenhmarsh

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>You can close the HTML, CSS, and Output panels. You will not need them since we will be working in the browser's console! :)</p>
<p>All you need is the Javascript panel!</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>You can close the HTML, CSS, and Output panels. You will not need them since we will be working in the browser's console! :)</p>
<p>All you need is the Javascript panel!</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>You can close the HTML, CSS, and Output panels. You will not need them since we will be working in the browser's console! :)</p>
<p>All you need is the Javascript panel!</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>You can close the HTML, CSS, and Output panels. You will not need them since we will be working in the browser's console! :)</p>
<p>All you need is the Javascript panel!</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>RaffleBot</title>
</head>
<body>
<div class="centered">
<h1>RaffleBot</h1>
<button id="raffle" class="alert">Raffle Time!!!</button>
</div>
<!DOCTYPE html>
<html>
<head>
<title>RaffleBot</title>
</head>
<body>
<div class="centered">
<h1>RaffleBot</h1>
<button id="raffle" class="alert">Raffle Time!!!</button>
</div>
<!DOCTYPE html>
<html>
<head>
<title>RaffleBot</title>
</head>
<body>
<div class="centered">
<h1>RaffleBot</h1>
<button id="raffle" class="alert">Raffle Time!!!</button>
</div>
<!DOCTYPE html>
<html>
<head>
<title>RaffleBot</title>
</head>
<body>
<div class="centered">
<h1>RaffleBot</h1>
<button id="raffle" class="alert">Raffle Time!!!</button>
</div>
@stephenhmarsh
stephenhmarsh / image template example.jsx
Created June 22, 2020 18:02
image template example.jsx
import React from "react";
import "./ResponsiveImage.scss";
class ResponsiveImage extends React.Component {
render() {
const responsiveImage = this.props.photo;
const baseURL = responsiveImage.fields.image.fields.file.url;
const caption = responsiveImage.fields.caption;
return (
<figure className="responsive-image" key={`${responsiveImage.sys.id}`}>
@stephenhmarsh
stephenhmarsh / image template example 2.js
Last active June 22, 2020 18:18
image template example 2.js
function pictureTemplate(photo) {
return html`
<picture class="picture lazy">
<data-src
sizes="100vw"
srcset="${photo.fields.file.url}?fm=${SETTINGS.imageType}&w=768&q=${SETTINGS.quality} 768w,
${photo.fields.file.url}?fm=${SETTINGS.imageType}&w=992&q=${SETTINGS.quality} 992w,
${photo.fields.file.url}?fm=${SETTINGS.imageType}&w=1200&q=${SETTINGS.quality} 1200w,
${photo.fields.file.url}?fm=${SETTINGS.imageType}&w=1536&q=${SETTINGS.quality} 1536w,
${photo.fields.file.url}?fm=${SETTINGS.imageType}&w=1984&q=${SETTINGS.quality} 1984w,