Code Portfolio

This is a portfolio of code snippets from projects I've worked on over the years using the following technologies: Drupal, Sass, Gulp, Git, jQuery, Docksal, and more.

Note, since most of my full time coding work over the past 5 years has dealt with Enterprise level private repositories, I decided to create this site as a showcase for some code snippets, examples, and experiments I've worked on over the years. This is a work in progress, so I'll be adding more code over time.

ยป Danny Englander | October 21, 2018

  • Sass Loops for Creating Custom Utility Classes

    Create CSS utility classes the easy way using a Sass @each loop

    View Code
  • Custom Install Script With Docksal

    A custom script to install Node, Yarn, Jekyll, and Ruby in Docksal

    View Code
  • Drupal 7 Theming: Adding a Views Name as a Body Class

    In which we query with Drupal's global views_get_page_view function

    View Code
  • Drupal 8: Removing Core Stylesheets in a Sub-theme

    Using Drupal 8's libraries-override function

    View Code
  • Drupal 8: Theming a File Link by Content Type

    Using Drupal 8's theme_suggestions_later hook for enhanced Twig template variations

    View Code
  • Drupal 8: Create a Twig Template Theme Hook

    Create Twig template theme hook suggestions for Drupal user view modes

    View Code
  • Lazy Load Responsive Images using LazySizes JS

    A Jekyll loop that draws upon YAML data for responsive images

    View Code
  • Drupal 7: Attach JS With Conditions

    Attach fitvids.js to a wysiwyg field where a video is present via the video filter module.

    View Code
  • Setting a Color theme with jQuery Cookie

    This code allows a user to select a color theme from a slide out panel in a Drupal theme

    View Code
  • Drupal 8: Set a Conditonal class for Edge to Edge content types

    Get an array of node types and then add a body class

    View Code