- When you are ready to play a video, insert the markup into the DOM with
autoplay=auto preload
on the tag. Don’t add the markup early and load() or play() it later. If you have the markup in there when the Vue component compiles, it will trigger multiple video loads - When listening when to show the video (like fade it in), listen for the
timeupdate
event, notcanplaythrough
. This ensures that the video will already be playing when you show it. In Safari, thecanplaythrough
plays too soon and will pause on the first frame for a bit (edited) - When you animate the video in, never have it
display:none
or in Safari it will pause on the first frame. Set theopacity
to 0 and then fade it in when ready, for instance - Make sure webm is before mp4, it helps FF out a lot
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 | |
Route::get('guidelines/{slug}/{page}', ['as' => 'guideline-page', function($slug, $page) { | |
$guideline = Guideline::findBySlugOrFail($slug); | |
$page = $guideline->guidelineBlocks()->where('slug', $page)->firstOrFail(); | |
// previous pages | |
$previous = $guideline->guidelineBlocks() | |
->where('guideline_blocks.position', '<', $page->position) | |
->orderBy('guideline_blocks.position', 'desc') |
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
# Run an npm script | |
alias run="npm run" | |
# Create a deduped and prined shrinkwrap file | |
alias shrink="npm dedupe && npm prune && npm shrinkwrap" | |
# Update npm deps and shrinkwrap | |
alias npmup="npm update && shrink" |
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 root = this; | |
(function( jQuery ) { | |
if ( root.XDomainRequest ) { | |
jQuery.ajaxTransport(function( s ) { | |
if ( s.crossDomain && s.async ) { | |
if ( s.timeout ) { | |
s.xdrTimeout = s.timeout; | |
delete s.timeout; | |
} |
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
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed and saved. | |
* | |
* Add your own CSS or Less to fully customize Atom. | |
* If you are unfamiliar with Less, you can read more about it here: | |
* http://lesscss.org | |
*/ |
- Install studio globally.
- Tweak the generated autoload stuff in
vendor/autoload.php
to put higher-level consumers at the start:
// @generated by Composer Studio (https://github.com/franzliedke/studio)
require_once __DIR__ . '/../workbench/decoy/vendor/autoload.php';
require_once __DIR__ . '/../workbench/upchuck/vendor/autoload.php';
require_once __DIR__ . '/../workbench/cloner/vendor/autoload.php';
require_once __DIR__ . '/../workbench/library/vendor/autoload.php';
Here is a summary of different options that Shopify offers for managing content inclduing managing externally.
The config/settings_schema.json
file lives in your theme and lets you define fields that are editable in the Storefront editor. These values can be used in css and js as well as the liquid files.
You can create a number of different field types:
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 | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class ProductImagesTable extends Migration { | |
/** | |
* Run the migrations. | |
* |
- Another module, a mediator, would call
query({types:"one,two"})
to intiate a search. - The
query()
method is debounced to prevent a bunch of successive calls if the person is actively using the UI. But, it has theleading
andtrailing
attributes so that the first clicks is immediately handled and so that a final GET is made once the user is done being spastic, responding to the final search terms. - We save the
xhr
response so that we can use it to abort a still running request. Thus, if the request still hasn't finished by the time the trailing execution happens, thedone()
callback won't be fired for the previous query.