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 slugify(text) { | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
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
<template> | |
<div class="o-grid" :style="gridTemplate"> | |
<slot></slot> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
rows: { |
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
/** | |
* CSS Animated Repeating Gradient | |
*/ | |
body { | |
background: repeating-linear-gradient(-45deg,black,black 20px,white 20px,white 40px); | |
background-size: 56px 56px; /* This is unique for this background, need to find a pattern and develop a formula */ | |
-webkit-animation: slide 20s infinite linear forwards; | |
-moz-animation: slide 20s infinite linear forwards; | |
animation: slide 20s infinite linear forwards; | |
} |
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
import BaseForm from './FormTemplate'; | |
import { scaMixin } from '~/mixins/payments/scaMixin'; | |
export default { | |
name: 'BasePaymentForm', | |
extends: BaseForm, | |
mixins: [scaMixin], | |
methods: { | |
async onSubmit() { | |
const response = this.submitForm(); |
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
<template> | |
<div :class="stackClasses" :data-identifier="configIdentifier"> | |
<slot /> | |
</div> | |
</template> | |
<script> | |
/** | |
* Flow elements require space to physically and conceptually separate them from the elements that come before and | |
* after them. This flow space should exist solely between children elements in a container, and not between an element |
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
/** | |
* Triggers the sending of notifications for the processed form. | |
* Please refer to https://gist.github.com/keithdevon/08016bd065397c76045c | |
* for more information | |
*/ | |
private function send_notifications( $form_id, $entry_id ) { | |
$form = \RGFormsModel::get_form_meta( $form_id ); | |
$entry = \RGFormsModel::get_lead( $entry_id ); | |
$notification_ids = []; | |
foreach( $form['notifications'] as $id => $info ){ |
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
import { getPreferredSizeFallbackOrder, getThemeSizes } from '~/utilities/wordpressHelpers'; | |
export default class AcfImage { | |
constructor(imageObject) { | |
this.id = (imageObject.id ? imageObject.id : imageObject.ID) || null; | |
this.title = imageObject.title || null; | |
this.filename = imageObject.filename || null; | |
this.filesize = imageObject.filesize || null; | |
this.url = imageObject.url || null; | |
this.link = imageObject.link || null; |
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
const slashOptions = { | |
STRIP: 'strip', | |
ADD: 'add', | |
}; | |
const modifySlashes = (option, url) => { | |
if (!option) { | |
return url; | |
} |