Skip to content

Instantly share code, notes, and snippets.

View influxweb's full-sized avatar
Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...

Matt Zimmermann influxweb

Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...
View GitHub Profile
@influxweb
influxweb / debug-scroll.md
Created March 24, 2023 19:15 — forked from cuth/debug-scroll.md
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right > w || b.left < 0) {
<!--
================================
<URI_Add />
Description:
Adds a new URI to a page, category, product, or feed.
Rules:
Requires `uri` attribute with a value starting with "/"
For canonical URIs, add `canonical="yes"` attribute and ommit the `status` attribute.
@influxweb
influxweb / bask-basket.html
Last active June 6, 2022 20:39
Luxe: 10.04 Basket Contents Update
<mvt:if expr="g.Action EQ 'RGRP'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Params" value="miva_variable_value('Restore_Params' $ g.Restore_Counter)" />
<div class="message message--info h-nm">
<strong>&mvte:global:Restore_Name;</strong> has been removed from your cart. <a href="&mvte:urls:BASK:auto_sep;&mvte:global:Restore_Params;">Undo?</a>
</div>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:if>
<mvt:item name="customfields" param="Read_Basket('continue_url', l.settings:continue_url)" />
@influxweb
influxweb / bask-basket.html
Created June 3, 2022 16:02
Levels: 10.04 Basket Contents Update
<mvt:if expr="g.Action EQ 'RGRP'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Params" value="miva_variable_value('Restore_Params' $ g.Restore_Counter)" />
<div class="message message-info">
<strong>&mvte:global:Restore_Name;</strong> has been removed from your cart. <a href="&mvte:urls:BASK:auto_sep;&mvte:global:Restore_Params;">Undo?</a>
</div>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:if>
<mvt:if expr="l.settings:basket:empty">
@influxweb
influxweb / bask-basket.html
Last active April 29, 2022 21:23
BASK: Edit Basket Attributes [UPDATED: 04/29/2022]
<script>
function continueShopping(link) {
if (sessionStorage.getItem('continue_url')) {
link.href = sessionStorage.getItem('continue_url');
}
}
</script>
<mvt:if expr="g.Action EQ 'RGRP' AND g.quote_item NE '1'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
@influxweb
influxweb / input.scss
Created March 18, 2022 22:59
Generated by SassMeister.com.
@use "sass:meta";
/**
* Use this mixin to declare a set of CSS Custom Properties.
* The variables in $css_variables will be properly prefixed.
* The use of this mixin is encouraged to keep a good scalability.
*/
@mixin cssvars($css_variables, $prefix: rt) {
:root {
@each $name, $value in $css_variables {
@influxweb
influxweb / quantify.js
Created February 7, 2022 18:46
Quantify: Updated for initializations and min/max/step settings
/**
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|q|u|a|n|t|i|f|y|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* This extension allows for the use of buttons to increase/decrease item
* quantities on the product and basket pages. When used on the basket page,
* the decrease button becomes a remove button if the quantity is 1.
*/
@influxweb
influxweb / ctgy-page.html
Created January 31, 2022 17:20
Colossus: Page Details Code
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="&mvt:global:basehref;">
<mvt:if expr="NOT ISNULL l.settings:category:page_title">
<title>&mvt:category:page_title;</title>
<mvt:elseif expr="NOT ISNULL l.settings:page:title">
<title>&mvt:page:title;</title>
@influxweb
influxweb / afed-affiliate.html
Last active November 10, 2021 22:34
AFED: Current Password Field Added
<section class="o-layout o-layout--justify-center">
<div class="o-layout__item u-width-12 u-width-9--m">
<p class="u-text-right"><a class="c-button c-button--hollow c-button--small u-color-red" href="&mvte:urls:SFNT:secure_sep;Action=ALOG" title="Log Out">Log Out</a></p>
<form method="post" action="&mvte:urls:AFAE:secure;">
<fieldset>
<legend>&mvt:page:name;</legend>
<input type="hidden" name="Action" value="UAFL" />
<p class="c-heading-delta">Log In Info</p>
<div class="c-form-list o-layout">
@influxweb
influxweb / opay.html
Created October 20, 2021 19:47
Shadows v2: Default OPAY
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="&mvt:global:basehref;">
<mvt:if expr="NOT ISNULL l.settings:page:title">
<title>&mvt:page:title;</title>
<mvt:else>
<title>&mvt:store:name;: &mvt:page:name;</title>
</mvt:if>