Skip to content

Instantly share code, notes, and snippets.

View sudomaxime's full-sized avatar

Maxime Nadeau sudomaxime

View GitHub Profile
@sudomaxime
sudomaxime / wysiwyg.html
Created November 6, 2018 15:37
Gallery shortcode
<div class="wysiwyg-gallery">
<div class="row">
<div class="col-4">
<div class="wysiwyg-gallery-item">
<div class="wysiwyg-gallery-image">
<div class="wysiwyg-gallery-zoom">
<i class="zoom-icon fas fa-search-plus text-white"></i>
</div>
<a href="http://via.placeholder.com/1200x768" data-toggle="lightbox" data-gallery="gallery-name" data-type="image">
// Variables
//
// Variables should follow the `$component-state-property-size` formula for
// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
//
// Color system
//
@sudomaxime
sudomaxime / download-hack.js
Created February 26, 2018 19:53
Force a file download
function SaveToDisk(fileURL, fileName) {
// for non-IE
if (!window.ActiveXObject) {
var save = document.createElement('a');
save.href = fileURL;
save.target = '_blank';
save.download = fileName || 'unknown';
var evt = new MouseEvent('click', {
'view': window,
@sudomaxime
sudomaxime / snip-cookie-watcher.js
Last active September 12, 2017 18:14
Simple class to refresh Snipcart cookie ID after a certain amount of days, can be useful if you have order configurations that changes often.
// Margin
.m{
//Left
&-l{
&5 {margin-left: 5px}
&10 {margin-left: 10px}
&15 {margin-left: 15px}
&20 {margin-left: 20px}
&25 {margin-left: 25px}