This file contains hidden or 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
# if host contains www - skip redirect to www | |
RewriteCond %{HTTP_HOST} ^www\. [NC] | |
RewriteRule .? - [S=1] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# redirect all to https | |
RewriteCond %{HTTPS} off | |
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains hidden or 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
// renames to gulpfile.esm.js to use the esm package support of es6 module 'import' syntax | |
import gulp from 'gulp'; | |
import sass from 'gulp-sass'; | |
import browserSync from 'browser-sync'; | |
const myGlobs = { | |
scssSource: './app/scss/**/*.scss', // includes .scss files in any subfolders of ./scss also | |
cssDest: './app/css', | |
htmlSource: './app/*.html', |
This file contains hidden or 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 fs = require('fs'); | |
const targetPath = './src/pages/' | |
// *.html files | |
let fileNamesArray = fs.readdirSync(targetPath).filter( (file) => { | |
return file.includes('.html') | |
}) | |
// 'all-comps.html', 'c090.html', 'c100.html', 'c101.html', 'c102.html', 'index.html' ] |
This file contains hidden or 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
<link rel="icon" href="data:;base64,iVBORw0KGgo="> | |
<!-- credit: https://vsparrow.com/2017/05/01/favicon-ico-failed-to-load-resource-the-server-responded-with-a-status-of-404-not-found/ --> |
This file contains hidden or 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 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> | |
</head> | |
<body> | |
This file contains hidden or 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
<script> | |
// Let the document know when the mouse is being used | |
document.body.addEventListener('mousedown', function() { | |
document.body.classList.add('using-mouse'); | |
}); | |
document.body.addEventListener('keydown', function() { | |
document.body.classList.remove('using-mouse'); | |
}); | |
</script> |
This file contains hidden or 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 colors = { | |
ALICEBLUE: '#F0F8FF', | |
ANTIQUEWHITE: '#FAEBD7', | |
AQUA: '#00FFFF', | |
AQUAMARINE: '#7FFFD4', | |
AZURE: '#F0FFFF', | |
BEIGE: '#F5F5DC', | |
BISQUE: '#FFE4C4', | |
BLACK: '#000000', | |
BLANCHEDALMOND: '#FFEBCD', |
This file contains hidden or 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
Array.from(document.querySelectorAll(".HTMLCS-issue-detail-list li")).map((el) => { return { detail: el.querySelector(".HTMLCS-issue-title").textContent, code: el.querySelector(".HTMLCS-issue-source-inner strong").textContent } }) |
This file contains hidden or 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
document.addEventListener('DOMContentLoaded', function () { | |
const targetNode = document.body; | |
const callback = function (mutationsList) { | |
for (let mutation of mutationsList) { | |
if (mutation.type == 'childList') { | |
mutation.addedNodes.forEach((node) => { | |
if (node && node.src && node.src.match(/.*pages02.net.*/).length > | |
0) { | |
observer.disconnect(); | |
node.setAttribute("aria-hidden", true); |
This file contains hidden or 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
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil | |
// https://stackoverflow.com/questions/42109818/reliable-js-rounding-numbers-with-tofixed2-of-a-3-decimal-number | |
// Closure | |
(function() { | |
/** | |
* Decimal adjustment of a number. | |
* | |
* @param {String} type The type of adjustment. | |
* @param {Number} value The number. | |
* @param {Integer} exp The exponent (the 10 logarithm of the adjustment base). |