Skip to content

Instantly share code, notes, and snippets.

View thejimbirch's full-sized avatar

Jim Birch thejimbirch

View GitHub Profile
@thejimbirch
thejimbirch / bootstrap-paragraphs-colors.css
Created October 21, 2016 17:28
Drupal 8 CSS file for Paragraphs customized for Width and Background color fields.
/* RGBA Colors from http://mdbootstrap.com/css/colors/#rgba-colors */
.paragraph--color--rgba-blue-light {
background: rgba(3, 169, 244, 0.3);
}
.paragraph--color--rgba-red-light {
background: rgba(244, 67, 54, 0.3);
}
@thejimbirch
thejimbirch / bootstrap-paragraphs.css
Created October 21, 2016 17:29
Drupal 8 CSS file for Paragraphs customized for Width and Background color fields.
/* -----------------------------------------------------------------------------
Paragraph Section CSS.
The following classes are available if the different Paragraph types
need their own individual styling.
.paragraph.paragraph--type--blank {}
.paragraph.paragraph--type--carousel {} -- Is used below
.paragraph.paragraph--type--columns {} -- Is used below
@thejimbirch
thejimbirch / bootstrap-paragraphs.less
Created October 21, 2016 17:30
Drupal 8 LESS file for Paragraphs customized for Width and Background color fields.
/* -----------------------------------------------------------------------------
Paragraph Section CSS.
The following classes are available if the different Paragraph types
need their own individual styling.
.paragraph.paragraph--type--blank {}
.paragraph.paragraph--type--carousel {} -- Is used below
.paragraph.paragraph--type--columns {} -- Is used below
@thejimbirch
thejimbirch / field--paragraph--field-column-content.html.twig
Created October 21, 2016 17:33
Drupal 8 Template for Bootstrap Paragraphs Column field.
{#
/**
* @file
* Overrides field template to add column class based on loop length.
*
* To override output, copy the "field.html.twig" from the templates directory
* to your theme's directory and customize it, just like customizing other
* Drupal templates such as page.html.twig or node.html.twig.
*
* Instead of overriding the theming for all fields, you can also just override
@thejimbirch
thejimbirch / Bootstrap Drupal 8 Tabs - menu-local-task.html.twig
Last active February 26, 2017 23:42
Add these two files to your Bootstrap enambled theme at themes/custom/THEME/templates/navigation/
<li{{ attributes.addClass(is_active ? 'active') }}>{{ link }}</li>
@thejimbirch
thejimbirch / paragraph--xeno-hero.html.twig
Created April 23, 2017 23:46
Partial section of Xeno Hero Drupal 8 Paragraphs Template
{# Prints div with classes, & content w/o img/invert/overlay/parallax fields. #}
<div{{ attributes.addClass(classes).setAttribute('data-overlay', overlay_levels).setAttribute('data-speed', parallax_speeds) }}>
{% if content.xeno_background_image|render %}
<div class="paragraph--type--xeno-hero__image">
{{ content.xeno_background_image }}
</div>
{% endif %}
{{ content|without('xeno_background_image', 'xeno_invert', 'xeno_overlay', 'xeno_parallax') }}
</div>
{%- for item in items -%}
<div class="element--layout-columns__{{ loop.length }}col">{{ item.content }}</div>
{%- endfor -%}
<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_claim_review' );
/**
* Add ClaimReview to Schema Types options
*
* @since 1.0
*/
function schema_wp_new_add_schema_type_7623456( $options ) {
@thejimbirch
thejimbirch / pull_request_template.md
Created October 10, 2018 16:12 — forked from kwhite/pull_request_template.md
An example PR template

Description

As a developer, I need to start with a story.

A few sentences describing the overall goals of the pull request's commits. What is the current behavior of the app? What is the updated/expected behavior with this PR? Include your acceptance critiera! If your tasks were well-written, you can probably copy/paste some of this.

Affected URL

link_to_relevant_multidev_or_test_site

@thejimbirch
thejimbirch / drupal-7-field-bootstrap-carousel.html.php
Created August 28, 2016 22:09
Drupal 7 Field Template for creating a Bootstrap Carousel