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 puppeteer = require('puppeteer'); | |
const imagemin = require('imagemin'); | |
const imageminPngquant = require('imagemin-pngquant'); | |
// Get the URL and the slug segment from it | |
const url = process.argv[2]; | |
const segments = url.split('/'); | |
const slug = segments[segments.length-2]; | |
(async () => { |
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
<?php | |
namespace Notist\Extensions; | |
use League\CommonMark\ElementRendererInterface; | |
use League\CommonMark\HtmlElement; | |
use League\CommonMark\Inline\Element\AbstractInline; | |
use League\CommonMark\Inline\Element\Link; | |
use League\CommonMark\Inline\Renderer\InlineRendererInterface; |
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
<perch:blocks> | |
<perch:before> | |
<div class="row"> | |
<div class="col-md-6 col-md-offset-3"> | |
</perch:before> | |
<perch:block type="text" label="Text"> | |
<perch:content id="text" type="textarea" markdown="true" editor="markitup" size="s" label="Text" /> | |
</perch: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
#eyebrow { | |
display: none; | |
} | |
#photo { | |
background-color: #333 !important; | |
} | |
body.with-eyebrow #global-nav { | |
top: 0 !important; | |
} | |
body.with-eyebrow { |
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
<?php | |
perch_blog_date_archive_months('years.html', 'months.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
<picture alt="<perch:content type="text" id="alt" label="Alt" />"> | |
<source src="<perch:content type="image" id="image" label="Image" width="800" />" media="min-width:800px"> | |
<source src="<perch:content type="image" id="image" label="Image" width="480" />" media="min-width:480px"> | |
<source src="<perch:content type="image" id="image" label="Image" width="200" />"> | |
<img src="<perch:content type="image" id="image" label="Image" width="480" />" alt="<perch:content type="text" id="alt" label="Alt" />"> | |
</picture> |
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
<?php | |
/* | |
Artificially delay the loading of images to simulate a slow connection | |
<img src="/slow_image_loader.php?img=realimage.jpg" /> | |
*/ | |
$image = $_GET['img']; | |
// delay between 1 and 3 seconds | |
usleep(rand(1000000,3000000)); |