Skip to content

Instantly share code, notes, and snippets.

View AdamSoucie's full-sized avatar

Adam Soucie AdamSoucie

View GitHub Profile
@AdamSoucie
AdamSoucie / dropbox-link-loop-snippet.php
Created December 16, 2016 02:10
This snippet takes a Dropbox linked video file and makes it work in WordPress
@AdamSoucie
AdamSoucie / gradient-underline.css
Created March 27, 2017 21:37
Link with Gradient Underline
(content body class) a
{
display: inline-block;
text-decoration: none;
text-shadow:
0.05em 0 0 white, -0.05em 0 0 white,
0 0.05em 0 white, 0 -0.05em 0 white,
0.1em 0 0 white, -0.1em 0 0 white,
0 0.1em 0 white, 0 -0.1em 0 white;
background-image: linear-gradient(to right, black 0%, black 100%);
@AdamSoucie
AdamSoucie / skip-links.css
Last active May 31, 2017 04:17
CSS styles for skip links
<button id="main-menu-trigger" class="main-menu-trigger">Menu</button>
<nav id="main-menu-container" class="main-menu-container">
<ul id="main-menu" aria-expanded="false">
<li id="menu-item-1" class="menu-item">
<a href="#">Home</a>
</li>
<li id="menu-item-2" class="menu-item">
<a href="#">About</a>
</li>
<li id="menu-item-3" class="menu-item">
function toggleARIAExpanded(menu)
{
var isExpanded = menu.attr('aria-expanded');
if( isExpanded === 'true' )
{
menu.attr('aria-expanded', 'false');
menu.toggleClass('active');
}
else
<button id="main-menu-trigger" class="main-menu-trigger" role="button">Menu</button>
<nav id="main-menu-container" class="main-menu-container" role="navigation">
<ul id="main-menu" aria-expanded="false" role="menu">
<li id="menu-item-1" class="menu-item" role="menuitem">
<a href="#" role="link">Home</a>
</li>
<li id="menu-item-2" class="menu-item" role="menuitem">
<a href="#" role="link">About</a>
</li>
<li id="menu-item-3" class="menu-item" role="menuitem">
@AdamSoucie
AdamSoucie / no-toggle.php
Created August 2, 2018 02:50
Beaver Builder Select Field (no toggle)
'module_layout' => array(
'type' => 'select',
'label' => __( 'Module Layout', 'wds-beaver-builder' ),
'default' => 'fifty-image-text',
'options' => array(
'fifty-image-text' => __( 'Image/Text', 'wds-beaver-builder' ),
'fifty-text-image' => __( 'Text/Image', 'wds-beaver-builder' ),
'fifty-text-text' => __( 'Text/Text', 'wds-beaver-builder' ),
),
@AdamSoucie
AdamSoucie / with-toggle.php
Last active August 2, 2018 03:01
Select Field with Toggle
'fields' => array(
'module_layout' => array(
'type' => 'select',
'label' => __( 'Module Layout', 'wds-beaver-builder' ),
'default' => 'fifty-image-text',
'options' => array(
'fifty-image-text' => __( 'Image/Text', 'wds-beaver-builder' ),
'fifty-text-image' => __( 'Text/Image', 'wds-beaver-builder' ),
'fifty-text-text' => __( 'Text/Text', 'wds-beaver-builder' ),
),
@AdamSoucie
AdamSoucie / bb-frontend.php
Created August 17, 2018 19:14
Beaver Builder Gist Module - Front End
<?php
/**
* The frontend of the Gist Module.
*
* @package wds-gist
*/
// Get our fields.
$user_name = $settings->github_username;
$url = $settings->gist_url;
@AdamSoucie
AdamSoucie / gist-block.js
Created August 17, 2018 19:19
Block.js file for Gist Gutenberg Block
/**
* BLOCK: wds-gist
*/
// Import CSS.
import './style.scss';
import './editor.scss';
const { __ } = wp.i18n; // Import __() from wp.i18n
const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks