Skip to content

Instantly share code, notes, and snippets.

View zanesensenig's full-sized avatar

Zane Sensenig zanesensenig

View GitHub Profile
@zanesensenig
zanesensenig / hover.tpl.php
Last active June 2, 2016 12:21
PURE CSS HOVER
<a class="past-projects-card" href="/node/<?php print $fields['nid']->content ?>" style="background: url(<?php print $fields['field_exhibition_image']->content ?>) center center/cover;">
<div class="show-project-details">
<?php print $fields['title']->content ?>
<?php print $fields['field_artist_group']->content ?>
<?php print $fields['field_project_date']->content ?>
</div>
</a>
@zanesensenig
zanesensenig / show-hide.js
Created June 1, 2016 13:30
reusable show/hide utility
$('.past-projects-card').hover(
function(){ $(this).addClass('project-details-hover'); },
function(){ $(this).removeClass('project-details-hover'); }
);
$('.past-projects-card').hover(
function(){ $('.show-project-details', this).removeClass('hide'); },
function(){ $('.show-project-details', this).addClass('hide'); }
);
@zanesensenig
zanesensenig / paragraphs--example.php
Last active April 20, 2016 12:26
Paragraphs print value snippet
<?php
$items = field_get_items('paragraphs_item', $variables['paragraphs_item'], 'field_para_background_color');
$key = $items[0]['value'];
?>
<div id="full-width-container" class="<?php print $key; ?>">
<div id="full-width-image" class="">
<?php print render($content['field_image']); ?>
</div>
</div>
@zanesensenig
zanesensenig / animate.css
Created April 18, 2016 12:30
artsUP Landing Gradient
background: linear-gradient(90deg, #00aeef, #ed008c);
background-size: 400% 400%;
-webkit-animation: AnimationName 16s ease infinite;
-moz-animation: AnimationName 16s ease infinite;
-o-animation: AnimationName 16s ease infinite;
animation: AnimationName 16s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:0% 82%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
@zanesensenig
zanesensenig / fix_css_hardware.css
Created March 16, 2016 13:58
Hardware Acceleration -- CSS Transition Flickering
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-ms-perspective: 1000;
perspective: 1000;
@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%; */
}
@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 / 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 / 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 / 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();
});