Skip to content

Instantly share code, notes, and snippets.

View mariohernandez's full-sized avatar
✌️

Mario Hernandez mariohernandez

✌️
View GitHub Profile
@mariohernandez
mariohernandez / SassMeister-input.sass
Created September 4, 2014 16:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
.theme-magazine .nice-menu
top: 5px
left: 195px
position: absolute
.admin-menu &
@mariohernandez
mariohernandez / SassMeister-input.scss
Created October 1, 2014 20:11
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
p {
a {
color: red;
.footer & {
color: purple;
@mariohernandez
mariohernandez / SassMeister-input.sass
Created October 9, 2014 20:51
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
.read-more-button
display: inline-block
padding: 8px 25px
color: white
text-decoration: none

Vertical Layout with Navigation

Vertical scrolling sections of content with mobile hamburger navigation. Animations easily customized.

A Pen by Ettrics on CodePen.

License.

@mariohernandez
mariohernandez / SassMeister-input-HTML.html
Created November 18, 2015 00:42
Generated by SassMeister.com.
<div class="container">
<header role="header">Header</header>
<div class="content-wrapper">
<section class="main-content">
Main Content
</section>
<aside class="sidebar">
Sidebar
</aside>
</div>

Perfectly Centered Navigation

A fluid navigation that makes use of css3 transitions as you hover over the link items.

A Pen by Mario Hernandez on CodePen.

License.

@mariohernandez
mariohernandez / card.json
Last active November 6, 2016 02:14
Example of jSON object for card component
{
"image": "<img src='assets/miriam-werner.png' alt='Miriam B. Werner' />",
"name":"Miriam B. Werner",
"bio":"Miriam B. Weiner is an experienced travel writer and editor based in Washington, D.C. She has traveled all around Europe, as well as to countries in Africa and the Middle East. Now she’s set her sights on visiting the U.S. National Parks while providing the inspiration and information others need to make the most of America’s wilderness.",
"showBio": "View full biography",
"hideBio": "Hide biography",
"socialLinks": [
{
"icon": "instagram",
"url": "http://instagram.com"
@mariohernandez
mariohernandez / card.js
Last active November 6, 2016 02:17
Example of Javascript for card component
(function ($) {
'use strict';
Drupal.behaviors.card = {
attach: function (context, settings) {
var $bioButton = $('.card__view-bio', context);
var $bioDrawer = $('.card__bio', context);
var showBio = 'View full biography';
var hideBio = 'Hide biography';
{# set a variable for social media icons
to later pass to the component template #}
{%
set social = [
{
url: content.field_card_social_link.0['#url'].uri,
icon: content.field_card_social_link.0['#title'],
},
{
url: content.field_card_social_link.1['#url'].uri,