Skip to content

Instantly share code, notes, and snippets.

View zanesensenig's full-sized avatar

Zane Sensenig zanesensenig

View GitHub Profile
#!/bin/sh
# UPDATE DRUPAL CORE
yes | drush up drupal
# UPDATE MODULES
yes | drush up --no-core
# CLEANOUT FILES
drush cu
# COPY PATH
location=$(pwd)
#!/bin/sh
location=$(pwd)
PSU=`echo $location| cut -d'.' -f 1`
echo $PSU
#PSUSTRING=`echo $PSU| cut -d'/' -f 1`
#PSUSTRING=`echo $PSU|tail -c 10`
#echo $PSUSTRING
# SUBSTRING=`echo $INPUT| cut -d'_' -f 2`
@zanesensenig
zanesensenig / set_of_three.txt
Last active October 23, 2015 15:33
Target the last element in a set of 3
a:nth-child(3):last-child {
/* I'm the last of three */
}
@zanesensenig
zanesensenig / paragraphs-item--card.tpl.php
Created October 23, 2015 15:34
Basic Paragraphs TPL
<div class="card">
<h2><?php print render($content['field_card_title']); ?></h2>
<?php print render($content['field_card_image']); ?>
<?php print render($content['field_card_link']); ?></li>
</div>
@zanesensenig
zanesensenig / page.tpl.php
Last active October 23, 2015 18:57
Source Ordering --Sidebar
<main role="main" class="row l-main">
<!-- sidebar region ( PUSHED TO RIGHT ON LARGE ) -->
<aside role="complementary" class="sidebar-second small-12 medium-6 large-3 large-push-9 columns sidebar">
<?php print render($page['sidebar_second']); ?>
</aside>
<!-- .l-main region ( PULLED TO LEFT ON LARGE ) -->
<div class="main small-12 medium-12 large-9 large-pull-3 columns">
<?php print render($page['content']); ?>
</div>
</main
@zanesensenig
zanesensenig / autofocus.txt
Created November 9, 2015 15:06
Autofocus an input field inside of a Foundation modal window.
$(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
var modal = $(this);
modal.find('[autofocus]').focus();
});
@zanesensenig
zanesensenig / BAREBONES-COMMENTED-page.tpl.php
Last active October 24, 2016 14:34
New Site Page Reset
<!--.page -->
<div role="document" class="page">
<!-- START HEADER
************************************ -->
<header role="banner" class="l-header">
<!-- TOP BAR -->
<?php if ($top_bar): ?>
@zanesensenig
zanesensenig / template.php
Created January 5, 2016 17:36
New Site Template Reset
<?php
function hook_preprocess_html(&$variables) {
}
function hook_preprocess_page(&$variables) {
if ($node = menu_get_object()) {
$variables['node'] = $node;
}
@zanesensenig
zanesensenig / hook.scss
Created January 5, 2016 17:37
New Site SASS Reset
//Admin Toolbar style fix
#admin-menu-wrapper, #admin-menu-wrapper ul {
font-size: 11px;
}
// Remove first time div on home page
div#first-time {
display: none;
}
// Remove reveal background
.reveal-modal-bg{
@zanesensenig
zanesensenig / bg-embed.css
Created February 18, 2016 14:17
Containerless BG Embed
.bg-embed{
background:url(https://upload.wikimedia.org/wikipedia/commons/6/67/Inside_the_Batad_rice_terraces.jpg);
margin: auto;
calc(-50vw + 50%);
background-size: cover;
background-repeat: no-repeat;
background-position: 50%;
/* padding-bottom: 25%; */
}