Skip to content

Instantly share code, notes, and snippets.

Natalie NatalieMac

  • Los Angeles, CA
Block or report user

Report or block NatalieMac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View custom-walker.php
<?php
/**
* Custom Walker
*
* @access public
* @since 1.0
* @return void
*/
class lflegal_walker extends Walker_Nav_Menu
{
View embed.html
<div class="cc_player" data-username="dbhq">Loading ...</div>
<div id="cc_recenttracks_dbhq" class="cc_recenttracks_list">Loading ...</div>
<script language="javascript" type="text/javascript" src="http://radio4.citrus3.com:2199/system/recenttracks.js"></script>
<script src="http://radio4.citrus3.com:2199/system/player.js" type="text/javascript"></script>
View pagination-next-prev.php
<nav aria-label="<?php esc_attr_e( 'Pagination', 'my-text-domain' ); ?>">
<?php echo paginate_links( array(
'type' => 'list',
'prev_next' => true,
'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'my-text-domain' ) . '</span> ',
'prev_text' => '<i class="fas fa-angle-left"></i><span class="screen-reader-text">' . __( 'Previous page', 'my-text-domain' ) . '</span>',
'next_text' => '<i class="fas fa-angle-right"></i><span class="screen-reader-text">' . __( 'Next page', 'my-text-domain' ) . '</span>',
) ); ?>
</nav>
View screen-reader-text.css
/* Text meant only for screen readers. */
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
View pagination.php
<nav aria-label="<?php esc_attr_e( 'Pagination', 'my-text-domain' ); ?>">
<?php echo paginate_links( array(
'type' => 'list',
'prev_next' => false,
'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'my-text-domain' ) . '</span> '
) ); ?>
</nav>
@NatalieMac
NatalieMac / pagination.html
Last active May 7, 2019
Accessible pagination markup
View pagination.html
<nav aria-label="Pagination">
<ul>
<li><span class="pagination__item" href="#" aria-current="page" class="current" aria-label="Current Page, Page 1">1</span></li>
<li><a class="pagination__item" href="#" aria-label="Page 2">2</a></li>
<li><a class="pagination__item" href="#" aria-label="Page 3">3</a></li>
<li><a class="pagination__item" href="#" aria-label="Page 4">4</a></li>
<li><a class="pagination__item" href="#" aria-label="Page 5">5</a></li>
</ul>
</nav>
@NatalieMac
NatalieMac / trigger-draw-attention.js
Last active Feb 12, 2019
Highlight hotspots from an automatically generated select element
View trigger-draw-attention.js
jQuery(document).ready(function($){
/* Select the container for the hotspots */
var daImage = $('.hotspots-container');
/* Select all the areas in the container */
var areas = daImage.find('area');
/* Create a new select element */
var newSelect = $('<select id="daSelector"><option>Island</option></select>');
/* Prepend the select before the container */
@NatalieMac
NatalieMac / index.js
Created May 3, 2017
Remove typekit stylesheets
View index.js
var styleTags = jQuery('style');
var typekitStyles = styleTags.filter(':contains("typekit")');
typekitStyles.remove();
View custom.js
$( 'a[href*="#"]:not([href="#"])' ).click( function(e) {
var $this_link = $( this ),
has_closest_smooth_scroll_disabled = $this_link.closest( '.et_smooth_scroll_disabled' ).length,
has_closest_woocommerce_tabs = ( $this_link.closest( '.woocommerce-tabs' ).length && $this_link.closest( '.tabs' ).length ),
has_closest_eab_cal_link = $this_link.closest( '.eab-shortcode_calendar-navigation-link' ).length,
has_acomment_reply = $this_link.hasClass( 'acomment-reply' ),
disable_scroll = has_closest_smooth_scroll_disabled || has_closest_woocommerce_tabs || has_closest_eab_cal_link || has_acomment_reply;
if ( ( location.pathname.replace( /^\//,'' ) == this.pathname.replace( /^\//,'' ) && location.hostname == this.hostname ) && ! disable_scroll ) {
var target = $( this.hash );
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Intro to React</title>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-with-addons.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.4.5/react-redux.js"></script>
You can’t perform that action at this time.