This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>color-scheme and prefers-color-scheme</title> | |
<meta name="color-scheme" content="light dark" /> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>color-scheme and prefers-color-scheme</title> | |
<meta name="color-scheme" content="light dark" /> |
const APP = { | |
SW: null, | |
init() { | |
//called after DOMContentLoaded | |
//register our service worker | |
APP.registerSW(); | |
document | |
.getElementById('colorForm') | |
.addEventListener('submit', APP.saveColor); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Backgrounds</title> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="main.css" /> | |
<!-- | |
MDN background reference | |
https://developer.mozilla.org/en-US/docs/Web/CSS/background |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Backgrounds</title> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="main.css" /> | |
<!-- | |
MDN background reference | |
https://developer.mozilla.org/en-US/docs/Web/CSS/background |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Using FormData to ParseForms</title> | |
<link | |
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;300;600&display=swap" | |
rel="stylesheet" | |
/> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
<!-- | |
Combining async await with fetch | |
--> |
/*** | |
* Dynamic Object properties using square brackets | |
*/ | |
let beverage = 'Beer'; | |
const myObj = { | |
a: 1, | |
b: 2, | |
c: 3, | |
food: 'cheese', |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Grid & grid-auto-flow</title> | |
<style> | |
*{ | |
box-sizing: border-box; | |
} | |
.box{ |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).