Skip to content

Instantly share code, notes, and snippets.

Avatar

Natalie NatalieMac

  • Los Angeles, CA
View GitHub Profile
View ssa-table-style.css
table.tablepress {
box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
display: block;
margin: auto;
max-width: 100%;
overflow-x: auto;
width: fit-content;
}
.tablepress thead th,
@NatalieMac
NatalieMac / forms.css
Last active May 15, 2020
CREEC Salsa CSS
View forms.css
/**
* Import Google fonts used on website
*/
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&family=Montserrat:ital,wght@0,400;0,700;1,400;1,700&display=swap');
/**
* Set default font, font size and line height to match website
*/
html body,
body p,
View child-cpt.php
<?php
$args = array(
'post_type' => 'patient-education',
'posts_per_page' => 4,
'post_parent' => $post->ID,
'orderby' => 'title',
'order' => 'ASC',
);
$related = new WP_Query( $args );
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 */