Skip to content

Instantly share code, notes, and snippets.

@briansteeleca
briansteeleca / acf-experience-skill-export.json
Last active November 2, 2022 17:56
ACF fields for OxyProps Portfolio WebSite - Full build Part 2 (https://www.youtube.com/watch?v=qwb8oC_veaw&t=3s)
[
{
"key": "group_636145701ece0",
"title": "Experience-Skill Relationship",
"fields": [
{
"key": "field_636148bd139e0",
"label": "Experience Skill Relationship",
"name": "experience-skill-relationship",
"aria-label": "",
/* (Bricks adds this – it's NOT overridden by Codebase) */
/* headings */
h1,
h2,
h3,
h4,
h5,
h6 {
text-rendering: optimizeLegibility;
margin: 0;
<p>In HTML, <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements">block-level elements</a> such as headers, paragraphs, and DIVs, occupy 100% of the width of their parent element. Their height depends on how much content they have inside.</p>
<h2 id="headings" tabindex="-1">Headings</h2>
<p>Heading font weights have been set to <code>normal</code> (default). You can override this for all headings in the SCSS default variables, or add a bold weight yourself on a per-heading or per-word basis, for emphasis.</p>
<p>Same as with paragraphs, headings have zero top margin while the bottom margin is set as equal to 3 <a href="/codebase-5/docs/1-getting-started/element-grid">element grid</a> units, or <em>one line-height of the default text size</em> (1.5rem) – thereby leaving an “empty line” gap between paragraphs and headings.</p>
<p>Heading sizes, weights and line heights are set using three SCSS maps in the default variables file – you can control the rhythm of each from there.</p>
<p>B
@briansteeleca
briansteeleca / map-popup.php
Created May 4, 2022 13:58
GridBuilderWP Map Popup with Featured Image
add_filter('wp_grid_builder_map/marker_content',
function( $content, $marker ) {
ob_start();
$url = wp_get_attachment_url( get_post_thumbnail_id() );
$excerpt = get_the_excerpt();
if ( $url ) {
echo '<div class="wpgb-map-marker-img">';
echo '<div style="background-image:url(' . esc_url( $url ) . ');"></div>';
echo '</div>';
}
@briansteeleca
briansteeleca / _layout.svelte
Created February 18, 2021 16:17
Sapper + Svelte Image + Tailwind CSS
<script>
import Nav from '../components/Nav.svelte';
export let segment;
</script>
<Nav {segment}/>
<main>
<slot></slot>
@briansteeleca
briansteeleca / wp-nav-menu-parameters.php
Created February 12, 2019 19:35 — forked from zgordon/wp-nav-menu-parameters.php
Demo of the possible menu parameters for wp_nav_menu
<?php
$args = [
// Location pickable in Customizer
'theme_location' => 'main-menu',
// Assigns a default menu to location
'menu' => 'Main Menu',
// Main wrapper around the ul of posts
'container' => 'div',
'container_class' => 'container-class',
'container_id' => 'container-id',
@briansteeleca
briansteeleca / page.list-collections.liquid
Last active March 8, 2018 15:19
Shopify Narrative Theme: Page template for "Feature a subset of collections on a page". https://help.shopify.com/themes/customization/collections/featuring-collections-using-link-lists
<div class="shopify-section">
<div class="list-collections-template" data-section-id="" data-section-type="list-collections-template">
<div class="page-width">
<div class="grid text-center">
<div class="grid__item medium-up--ten-twelfths medium-up--push-one-twelfth">
<header class="section-header text-center">
<h1 class="section-header__title h2">{{ page.title }}</h1>
</header>
<div class="rte">
@briansteeleca
briansteeleca / .htaccess
Last active August 29, 2015 14:13
Handy .htaccess mod_rewrite rules
# This tag ensures the rewrite module is loaded
<IfModule mod_rewrite.c>
# enable the rewrite engine
RewriteEngine On
# Set your root directory
RewriteBase /
# remove the .html extension
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP
RewriteRule (.*)\.html$ $1 [R=301]
@briansteeleca
briansteeleca / validate.js
Created October 22, 2014 19:15
Accessible form error focus solution with jQuery Validation (from Katie) #jquery #validation #accessibility #errors #katie
// http://stackoverflow.com/questions/1218118/overriding-a-function-within-the-jquery-validation-plugin
$("form#user-register").validate({
// focus will normally go to the last error
// but this will make it go to the first!
invalidHandler: function(form, validator){
$(validator.invalidElements()[0]).focus();
},
focusInvalid:false
});
@briansteeleca
briansteeleca / README.md
Last active August 29, 2015 14:07
Generated by SassMeister.com: Susy Grid - 2 columns for tablet, 3 columns for laptop with gutter-position:inside #susy #grid #sassmeister

##IMPORTANT: This example uses gutter-position: inside

##Example: nth-of-type(an+b) nth-of-type(3n+1)

In that expression, the number b represents the ordinal position of the first element that we want to match, and the number a represents the ordinal number of every element we want to match after that. So our example expression, 3n+1 will match the first element, and every third element after that.

For IE8 see: http://stackoverflow.com/questions/8492121/ie8-nth-child-and-before