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
{%- comment -%} Get the max amount of collections{%- endcomment -%} | |
{%- assign max_nb = collections.size -%} | |
{%- comment -%} Get a random seed based on seconds {%- endcomment -%} | |
{%- assign random_seed = "now" | date: "%S" %} | |
{%- if max_nb > 60 -%} | |
{%- comment -%} The max is MORE than 60 seconds. So we add the difference to the seed {%- endcomment -%} | |
{%- assign collection_size_difference = max_nb | minus: 60 -%} | |
{%- if random_seed > random_seed -%} |
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
Preload Bold version of font alternatives | |
- When template system uses a cache buster (say Shopify liquid) | |
<link href="{{ 'maisonneue-demi-webfont.woff2' | asset_url | split: "?" | first }}" type="font/woff2" as="font" rel="preload" /> | |
- When the above doesnt work because the a javascript initiated the download even if the file is downloaded already | |
CSS: | |
.predload-maison-bold { | |
font-weight: bold; |
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
// Where is the code going? | |
cssSel_Content = .somedialog .dialog__content; | |
$dlgContent = jQuery( cssSel_Content ); | |
// Grab the content and paste it inside its destination | |
wordpress_site_url = 'http://www.somesite.com'; | |
wordpress_page_slug = 'some-page-slug'; | |
jQuery.get( wordpress_site_url + '/wp-json/wp/v2/pages', { | |
slug: wordpress_page_slug, | |
per_page: 1 |