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
@mixin scrollbars( | |
$size: 10px, | |
$foreground-color: white, | |
$background-color: black | |
) { | |
// For Chrome & Safari | |
&::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} |
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 namespace ProcessWire; | |
// Taken from https://processwire.com/talk/topic/22369-hide-uneditable-pages-in-admin-treeprocesspagelist/?tab=comments#comment-191963 | |
$this->addHookAfter('ProcessPageList::find', function(HookEvent $event) { | |
$pages = $event->return; | |
$excludePagesByTemplate = array('admin', 'basic-page'); | |
$pages->each(function($p) use($pages, $excludePagesByTemplate) { | |
if(!in_array($p->template, $excludePagesByTemplate)) return; |
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
<!DOCTYPE html> | |
<html {{ HTML_ATTRS }}> | |
<head {{ HEAD_ATTRS }}> | |
{{ HEAD }} | |
<link rel="stylesheet" href="https://cdn.snipcart.com/themes/v3.0.1/default/snipcart.css" /> | |
</head> | |
<body {{ BODY_ATTRS }}> | |
{{ APP }} | |
<div id="snipcart" data-api-key="" hidden> | |
<item-line> |
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
function contain(element, container) { | |
const scale = Math.min( | |
container.offsetWidth / element.offsetWidth, | |
container.offsetHeight / element.offsetHeight | |
) | |
return scale | |
} |
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
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC,OR] | |
RewriteCond %{REQUEST_URI} !dist/ | |
RewriteRule (.*) /dist/$1 [L] |
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
ul { | |
position: relative; | |
margin-left: 0; | |
padding-left: 1em; | |
list-style-type: none; | |
li { | |
&:before { | |
content: "?"; |
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
.cursor { | |
cursor: url("cursor.png") 0 0, pointer; /* Legacy */ | |
cursor: url("cursor.svg") 0 0, pointer; /* FF */ | |
cursor: -webkit-image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 0 0, pointer; /* Webkit */ | |
} |