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
/** | |
* This project's actual gulpfile contains much more than this, | |
* but these are the relevant bits. | |
*/ | |
// Node libraries | |
var fs = require('fs'); | |
var path = require('path'); | |
// Gulp + plugins |
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
// include gulp + template plugin | |
var gulp = require('gulp'); | |
var template = require('gulp-template'); | |
// include the koTemplates module locally | |
var koTemplates = require('./koTemplates'); | |
// create the 'templates' task | |
gulp.task('templates', function () { | |
// single-page app, so just pipe through index | |
gulp.src('./src/templates/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
/* | |
* Format a date using Moment. | |
* Usage: {{moment date format="MMMM YYYY"}} | |
*/ | |
var Handlebars = require('handlebars'), | |
_ = require('lodash'), | |
moment = require('moment'); | |
Handlebars.registerHelper('moment', function (context, block) { |
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
/** | |
* Iterate over a block a given number of times. | |
* | |
* Usage: | |
* <ul> | |
* {{#times 5}}<li>Item {{@index}}</li>{{/times}} | |
* </ul> | |
*/ | |
var Handlebars = require('handlebars'); |
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
.media-gallery__item-thumbnail:has(img:not([alt])) { | |
position: relative; | |
} | |
.media-gallery__item-thumbnail:has(img:not([alt]))::after { | |
align-items: center; | |
background: rgb(191, 64, 64); | |
border-radius: 4px; | |
color: #fff; | |
content: 'No alt'; |
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://cloudfour.com/thinks/video-gifs-are-forever-lets-make-them-better/ | |
class GifLike extends HTMLElement { | |
static motionQuery = window.matchMedia( | |
"(prefers-reduced-motion: no-preference)" | |
); | |
connectedCallback() { | |
this.video = this.querySelector("video"); |
OlderNewer