Skip to content

Instantly share code, notes, and snippets.

View evanmwillhite's full-sized avatar

Evan Willhite evanmwillhite

  • ActiveCampaign
  • Nashville, TN
View GitHub Profile
@evanmwillhite
evanmwillhite / menu.scss
Created September 29, 2017 17:53
Example SCSS/CSS
// Menu Breakpoint
$main-menu-medium: 43em;
// Nav
.main-nav {
display: none;
@include breakpoint($main-menu-medium) {
display: block;
}
@evanmwillhite
evanmwillhite / menu.js
Last active September 27, 2017 18:20
Simple Menu Javascript Example
/**
* @file
* A JavaScript file containing menu functionality (small/large screen)
*
*/
(function (Drupal) {
Drupal.behaviors.mainMenu = {
attach: function (context) {
{#
/**
* @file
* Default theme implementation to display a paragraph.
*
* Available variables:
* - paragraph: Full paragraph entity.
* - id: The paragraph ID.
* - bundle: The type of the paragraph, for example, "image" or "text".
* - authorid: The user ID of the paragraph author.
{#
/**
* @file
* Default theme implementation to display a paragraph.
*
* Available variables:
* - paragraph: Full paragraph entity.
* - id: The paragraph ID.
* - bundle: The type of the paragraph, for example, "image" or "text".
* - authorid: The user ID of the paragraph author.
@evanmwillhite
evanmwillhite / capabilities.html
Created May 18, 2017 18:00
Forcepoint Capabilities Section markup
<section class="capabilities">
<ul class="capabilities__list">
<li class="capabilities__item">
<a href="#" class="capabilities__link">
<h2 class="capabilities__title">Cloud Security</h2>
<h3 class="capabilities__text">Keeping attackers out starts with better visibility into people's actions across the network, in data centers, branch offices and cloud environments.</h3>
<span class="capabilities__btn button btn-green btn-arrow btn-small">Learn More</span>
</a>
</li>
<li class="capabilities__item">
@evanmwillhite
evanmwillhite / masthead.html
Created February 7, 2017 16:08
FP Homepage Masthead markup
<div class="home-masthead">
<div class="home-masthead__wrapper">
<h2 class="home-masthead__heading">The point where data is most valuable and most vulnerable<span>is right in front of you.</span></h2>
<a href="home-masthead__cta" class="button">Learn More</a>
<ul class="home-masthead__list">
<li class="home-masthead__list-item"></li>
<li class="home-masthead__list-item"><a class="home-masthead__link" href="">Cloud Security</a></li>
<li class="home-masthead__list-item"><a class="home-masthead__link" href="">Network Security</a></li>
<li class="home-masthead__list-item"><a class="home-masthead__link" href="">Data &amp; Insider Threat Security</a></li>
<li class="home-masthead__list-item"><a class="home-masthead__link" href="">Cross Domain</a></li>
@evanmwillhite
evanmwillhite / emulsify2.md
Last active December 12, 2016 22:12
Emulsify Post 2

Introducing Emulsify: Pattern Lab Prototyping Tool and Drupal 8 Theme

Part 2: Getting started

In the last post, we introduced Emulsify and spoke a little about the history that went into its creation. In this post, we will walk through the basics of Emulsify to get you building lovely, organized components automatically added to Pattern Lab.

Prototyping

Emulsify is at it's most basic level a prototyping tool. Assuming you've met the requirements and have installed Emulsify, running the tool is as simple as navigating to the directory and running npm start. This task takes care of building your Pattern Lab website, compiling Sass to minified CSS, linting and minifying Javascript, even creating an SVG sprite from SVGs in the images/icons/src/ directory. Also, this single command will start a watch task and open your Pattern Lab instance automatically in a browser. So now when you save a fi

@evanmwillhite
evanmwillhite / emulsify.md
Last active December 9, 2016 16:43
Emulsify Post 1

Introducing Emulsify: Pattern Lab Prototyping Tool and Drupal 8 Theme

Part 1: History

There is no question that the Frontend space has exploded in the past decade, having gone from the seemingly novice aspect of web development to a first-class citizen to deeper specialization. At the smaller agency level, being a Frontend engineer typically involves a balancing act between this general and specific knowledge. This makes it all the more important for agency Frontend teams to take a step back and determine some shared principles. We at Four Kitchens did this through late summer and into fall, and here's what we came up with:

1. Backend Agnostic

Even within Four Kitchens, we build websites and applications using a variety of backend languages and database structures, and this is only a microcosm of the massive diversity in modern web development. Our Frontend team strives to choose and build tools that are portable between backend systems. Not only is this a smart goal internally but also an importa

@evanmwillhite
evanmwillhite / pattern-lab.md
Last active October 6, 2016 16:05
Pattern Lab: Atomic Design + Living Styleguide

Pattern Lab: Atomic Design + Living Styleguide

Background

Automated (or "living") styleguides are a popular topic in Frontend development these days. And it's no suprise, as they benefit the integrity of the project as well as ease design and development (Link to Joe’s article on why styleguides). Four Kitchens has a long history of using static styleguides within projects, but as the Frontend team reevaluated our process this year, we wanted to standardize around an automated styleguide for future projects. By automating this part of our process, we ensure the styleguide always reflects the latest design and code during the entire life of the project.

We began by evaluating existing automated styleguide tools and narrowed the selection down to a couple that made sense alongside our existing toolset: KSS (Link to Randy’s article) and Pattern Lab. We then committed to testing these in real projects to expose strengths/weaknesses so that we could eventually choose the best tool

@evanmwillhite
evanmwillhite / styleguide.txt
Created October 5, 2016 15:20
Reasons for Using Styleguides
1. Single Authoritative Source: A living styleguide becomes the authoritative source for your branding, design and code. Too often, authority is spread across multiple iterations - multiple rounds of mood boards, wireframes, mocks/prototypes (not to mention written conversations including email or ticketing systems). These are all necessary pieces, but a living styleguide serves as a final definitive source - one that should be authorized by the entire team including designers, developers and stakeholders.
2. Quick Iteration: Speaking of authorization, a styleguide offers a faster way for designers and stakeholders to sign off on components while the backend or API is being developed. Free from these constraints, it is faster to iterate and easier to digest in terms of approvals, allowing the whole team to more rapidly move through the design and prototyping phase.
3. Speed of Development: Along the same lines, styleguide-driven development - particulary one that emphasizes a component-based approach - great