Skip to content

Instantly share code, notes, and snippets.

View thejimbirch's full-sized avatar

Jim Birch thejimbirch

View GitHub Profile
core: 8.x
type: theme
base theme: stable
name: 'Theme Name'
description: 'Theme Name is a custom theme based on Stable (not theme)'
regions:
page_top: 'Page Top'
page_bottom: 'Page Bottom'
{% if page.header %}
<nav class="navbar">
<div class="container-fluid">{{ page.header }}</div>
</nav>
{% endif %}
<div id="navbar" class="collapse navbar-collapse">
{{ content }}
</div>
{% block content %}
{% if site_logo %}
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
Menu
</button>
<a class="navbar-brand" href="{{ path('<front>') }}" title="{{ site_name }}" rel="home">
<img src="{{ site_logo }}" alt="{{ site_name }}" />
</a>
global-styling:
version: 1.x
css:
base:
css/bootstrap.css: {}
js:
js/bootstrap.js: {}
dependencies:
- core/jquery
@thejimbirch
thejimbirch / drupal-paragraph-multi-column.html.twig
Last active August 15, 2016 02:36
Simple Drupal Paragraph Template - Example Filename would be paragraph--MACHINE-NAME.html.twig
<div class="element element--layout-columns">
{{ content }}
</div>
/* -------------------------------------------------------------------------- */
/* Base Paragraph Styling. This is the BEM Block */
/* -------------------------------------------------------------------------- */
.element {
padding-top: @jumbotron-padding;
.make-sm-column(10);
.make-sm-column-offset(1);
.make-md-column(8);
.make-md-column-offset(2);
@thejimbirch
thejimbirch / select.html.twig
Created August 18, 2016 22:51
Styling Exposed View Forms in Drupal 8 - Twig Template
{#
/**
* @file
* Theme override for a select element.
*
* Available variables:
* - attributes: HTML attributes for the select tag.
* - options: The option element children.
*
* @see template_preprocess_select()
/* -------------------------------------------------------------------------- */
/* Extends: */
/* https://gist.github.com/thejimbirch/5b6b9ceb6e597a48f330e02edd8bcb49 */ */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* Here we add Width Modifiers */
/* -------------------------------------------------------------------------- */
/* Adds Width Element -- Medium */
@thejimbirch
thejimbirch / drupal-paragraph-bootstrap-carousel.html.twig
Last active October 16, 2016 11:21
Drupal Paragraph Twig Template for creating a Bootstrap Carousel