Cross-browser function to trigger DOM events.
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
/*! | |
* polyfill.insertAdjacentHTML.js | |
* Author: Jared Abbott | |
* Description: A Cross-browser implementation of HTMLElement.insertAdjacentHTML | |
* Copyright 2015 Jared Abbott | |
* Distributed under the MIT license | |
*/ | |
if (!("insertAdjacentHTML" in document.createElementNS("http://www.w3.org/1999/xhtml", "_"))) { | |
HTMLElement.prototype.insertAdjacentHTML = function(position, html) { |
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 { Component, OnInit } from '@angular/core'; | |
import { TitleService } from './shared/title/title.service'; | |
@Component({ | |
selector: 'ny-app', | |
templateUrl: './app.component.html', | |
styles: [], | |
}) | |
export class AppComponent implements OnInit { |
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
<?php | |
$slug = slugit("thank you for visiting"); | |
echo $slug; | |
// returns: thank-you-for-visiting | |
?> |
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
Source moved to: https://github.com/Robyer/nette-live-form-validation |
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
module.exports = function(eleventyConfig) { // This only happens once in your template! | |
// Blah blah, whatever other Eleventy stuff you need. | |
eleventyConfig.addLiquidShortcode("youtube", (youtubeId, aspectRatio) => { | |
return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe class="youtube-player video video--youtube" src="https://www.youtube.com/embed/${youtubeId}/" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`; | |
}); | |
// Blah blah, whatever other Eleventy stuff you need. | |
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
/* | |
* insertAdjacentHTML.js | |
* Cross-browser full HTMLElement.insertAdjacentHTML implementation. | |
* | |
* 2011-10-10 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
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
{ | |
"name": "project-name", | |
"description": "Template for static sites", | |
"version": "1.0.0", | |
"homepage": "http://www.project-name.com", | |
"author": { | |
"name": "Adam Reis", | |
"url": "http://adam.reis.nz" | |
}, | |
"license": "UNLICENSED", |
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
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
OlderNewer