Skip to content

Instantly share code, notes, and snippets.

View design-innovations's full-sized avatar

Jonathan Shroyer design-innovations

View GitHub Profile
@design-innovations
design-innovations / flex-to-table-for-ie
Created May 24, 2021 21:38 — forked from waseemsadiq/flex-to-table-for-ie
tailwind .flex to IE friendly code for dummies
/* IE9, IE10, IE11 | see: https://stackoverflow.com/a/30743013 */
@media screen and (min-width:0\0) {
.flex {
display:table;
width:100%;
}
.flex > div {
display:table-cell;
}
}
@design-innovations
design-innovations / .htaccess
Created May 13, 2021 22:06 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@design-innovations
design-innovations / pagination.php
Created May 7, 2021 23:54 — forked from franz-josef-kaiser/pagination.php
WordPress pretty Pagination with first/last, next/prev and range parameters above/below current page
- MOVED -
Can now be found in a repository incl. license, readme, styles and plugin php file: https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon
@design-innovations
design-innovations / wp-leadingslash.php
Created May 6, 2021 17:16 — forked from mcaskill/wp-leadingslash.php
WordPress \ Formatting : Prepends a leading slash and removes leading forward slashes and backslashes if they exist.
<?php
/**
* Prepends a leading slash.
*
* Will remove leading forward and backslashes if it exists already before adding
* a leading forward slash. This prevents double slashing a string or path.
*
* The primary use of this is for paths and thus should be used for paths. It is
* not restricted to paths and offers no specific path support.
@design-innovations
design-innovations / Wordpress Enqueue AlpineJS
Created February 16, 2021 20:20 — forked from sorindorobantu/Wordpress Enqueue AlpineJS
Wordpress Enqueue AlpineJS form CDN with IE11 support
// Wordpress Enqueue AlpineJS form CDN with IE11 support
// <script type="module" src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"></script>
// <script nomodule src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine-ie11.min.js" defer></script>
function advertis_enqueue_scripts()
{
wp_register_script( 'AlpineJS-module', 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.3.5/dist/alpine.min.js', null, null, false );
wp_enqueue_script('AlpineJS-module');
wp_register_script( 'AlpineJS-nomodule', 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.3.5/dist/alpine.min.js', null, null, false );
wp_enqueue_script('AlpineJS-nomodule');
}
<?
$tweet_id = (isset($tweet_id)) ? $tweet_id : '';
$twitter_name = (isset($twitter_name)) ? $twitter_name : '';
$twitter_handle = (isset($twitter_handle)) ? $twitter_handle : '';
?>
<div class="w-96 m-auto bg-white rounded-xl border border-gray-300 pt-4 pb-2 px-4">
<div class="flex">
<a href="https://twitter.com/<?= $twitter_handle ;?>" target="_blank" role="link" aria-hidden="true" tabindex="-1" class="rounded-full h-12 w-12 mr-1">
<img class="rounded-full" src="https://pbs.twimg.com/profile_images/660065817929846784/3KWHFG0Y_reasonably_small.png" >
</a>

Your First Block

To make things simple, we're going to make a semi-structured way to display a mailing address.

We're going to start with a file tree that looks like this:

address-block
  ├ blocks
  | ├ address.jsx
@design-innovations
design-innovations / Search my gists.md
Last active September 30, 2020 13:00 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:learncss

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

Name: usefulName
Caption: usefulName
@design-innovations
design-innovations / bootstrap-4-sass-mixins-cheat-sheet.scss
Created December 10, 2018 00:05
Bootstrap 4 Sass Mixins [Cheat sheet with examples] #BS4
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// @author http://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins
/* -------------------------------------------------------------------------- */
// Grid variables
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;