Skip to content

Instantly share code, notes, and snippets.

View tristanmason's full-sized avatar

Tristan Mason tristanmason

View GitHub Profile
@tristanmason
tristanmason / fcc-tribute-page-bill-evans.markdown
Last active January 14, 2017 02:37
FCC Tribute Page - Bill Evans

FCC Tribute Page - Bill Evans

FreeCodeCamp tribute page project. This page honors jazz pianist Bill Evans. It was challenging to get the look and functionality I wanted across all devices, especially iOS devices.

A Pen by Tristan Mason on CodePen.

License.

@tristanmason
tristanmason / gist:ca9b87cacbfb92505c43f8b8429eb392
Last active September 12, 2020 20:53
Make the footer widgets on Genesis Navigation Pro theme horizontal
/* Fix footer widget area */
.site-footer .wrap {
display: flex;
flex-direction: column-reverse;
}
.site-footer .footer-widgets {
display: flex;
flex-direction: row;
@tristanmason
tristanmason / gist:03b63626497475278e1e8d238f35e780
Created March 30, 2021 16:25
Check for Astra Advanced Headers and add header ID class to Wordpress body classes for per-header styling
/**
* Check for Astra Advanced Headers and add header ID class to body classes for per-header styling
* @author Tristan Mason <tristanmason.com>
*/
function tmac_add_advanced_header_class( $classes ) {
// only run if Advanced Headers exists and is enabled on this page
if ( (int)method_exists('Astra_Ext_Advanced_Headers_Data', 'get_current_page_header_ids') && in_array('ast-advanced-headers',$classes) ) {
$tmac_header_ids = Astra_Ext_Advanced_Headers_Data::get_current_page_header_ids();
$classes[] = 'tmac-header-id-' . $tmac_header_ids;
}
@tristanmason
tristanmason / gist:575bcbe29738019bd6b9adacc1257f77
Created May 12, 2021 18:35
Always show aria-label for accessibility on Astra header builder social icons
<?php // class-astra-builder-ui-controller.php | Line 92
echo '<a href="' . esc_url( $link ) . '"' . esc_attr( $item['label'] ? ' aria-label=' . $item['label'] . '' : ' aria-label=' . $item['id'] . '' ) . ' ' . ( 'phone' === $item['id'] || 'email' === $item['id'] ? '' : 'target="_blank" rel="noopener noreferrer" ' ) . 'style="--color: ' . esc_attr( ! empty( $item['color'] ) ? $item['color'] : '#3a3a3a' ) . '; --background-color: ' . esc_attr( ! empty( $item['background'] ) ? $item['background'] : 'transparent' ) . ';" class="ast-builder-social-element ast-inline-flex ast-' . esc_attr( $item['id'] ) . ' ' . esc_attr( $builder_type ) . '-social-item">';
?>