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 initRecaptcha () { | |
// If you want recaptcha enabled on a form, give it the data-recaptcha attribute | |
var recaptchaForms = document.querySelectorAll('form[data-recaptcha]'); | |
recaptchaForms.forEach(form => { | |
form.addEventListener('submit', e => { | |
e.preventDefault(); | |
grecaptcha.ready(function() { | |
grecaptcha.execute('PUBLICKEY', { action: 'submit' }).then(function(token) { |
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
import React from 'react' | |
const Loader = () => { | |
// This is a plain 'ol javascript object, but it could easily | |
// be parsed JSON from an API | |
const componentList = [ | |
{ | |
name: 'Test', | |
content: 'I am some text', |
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="modal-outer"> | |
<div class="modal-box"> | |
<div class="modal-content"> | |
<!-- CONTENT HERE --> | |
</div> | |
</div> | |
<button class="exit-modal">X</button> | |
</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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CSS Spacing</title> | |
<link rel="stylesheet" type="text/css" href="starter.css"> | |
</head> | |
<body> | |
<header> | |
<div class="container"> | |
<nav class="navbar"> |
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
<header class="hero"> | |
<div class="hero--backdrop backdrop"></div> <!-- This div only exists to hold background image --> | |
<div class="hero--content container"> | |
<h1>A Quirky new product</h1> | |
<p class="tagline">Our product does something <strong>slightly different</strong> than its competitors</p> | |
<button>BUY! DON'T THINK, BUY IMMEDIATELY.</button> | |
</div> <!-- /.hero--content --> | |
</header> | |
<div style="text-align: center; margin-top: 50px;"> <!-- Filler content to show scroll effect --> |
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
var CSS_COLOR_NAMES = ['DarkBlue', 'DarkCyan', 'DarkGoldenRod', | |
'DarkGreen', 'DarkKhaki', 'DarkMagenta', 'DarkOliveGreen', | |
'Darkorange', 'DarkOrchid', 'DarkRed', 'DarkSalmon', 'DarkSeaGreen', | |
'DarkSlateBlue', 'DarkSlateGray', 'DarkSlateGrey', 'DarkTurquoise', | |
'DarkViolet', 'DeepPink', 'DeepSkyBlue', 'Violet', 'Wheat', 'YellowGreen'] | |
function title () { | |
var titleTag = document.getElementsByTagName('H1')[0] | |
console.log(titleTag) |