This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_preprocess_HOOK() for page title templates. | |
*/ | |
function THEMENAME_preprocess_page(&$variables) { | |
$node = \Drupal::request()->attributes->get('node'); | |
if (isset($node) && $node instanceof Node) { | |
// Check node types and remove the block title. | |
switch ($node->getType()) { | |
case "bio": | |
case "form": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$base-font-size: 16px; // The font size set on the root html element. | |
@function rem($size) { | |
$remSize: $size / $base-font-size; | |
@return #{$remSize}rem; | |
} | |
//////// CODE STARTS BELOW //////// | |
p { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const groq = require('groq') | |
const BlocksToMarkdown = require('@sanity/block-content-to-markdown') | |
const client = require('../utils/sanityClient.js') | |
const serializers = require('../utils/serializers') | |
const overlayDrafts = require('../utils/overlayDrafts') | |
const hasToken = !!client.config().token | |
function generateBasicpage (basicpage) { | |
return { | |
...basicpage, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
// Mixins. | |
@mixin icon { | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
background-size: contain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$teaser_images = ''; | |
$teaser_images = field_get_items('node', $node, 'field_teaser_image'); | |
if (!empty($teaser_images)) { | |
foreach ($teaser_images as $teaser_image) { | |
$path = $teaser_image['uri']; | |
$alt = $teaser_image['alt']; | |
$title = $teaser_image['title']; | |
$nodeURL = 'node/' . $node->nid; | |
$image = theme_image_style( | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function THEMENAME_preprocess_html(&$variables) { | |
// Get the value of the field and add it as a class on <body>. | |
$node = \Drupal::routeMatch()->getParameter('node'); | |
if ($node instanceof \Drupal\node\NodeInterface) { | |
if ($node->field_layout) { | |
$layout_style = $node->field_layout->value; | |
$vars['attributes']['class'][] = 'layout-' . str_replace('_', '-', $layout_style); | |
} else { | |
$variables['attributes']['class'][] = 'layout-CUSTOM-CLASS'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Linux Foundation Bower Dependencies", | |
"version": "0.0.1", | |
"authors": [ | |
"Jeremy Caldwell <[email protected]>" | |
], | |
"license": "MIT", | |
"ignore": [ | |
"**/.*", | |
"node_modules", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Smooth scroll. | |
Drupal.behaviors.smoothScroll = { | |
attach: function(context, settings) { | |
$('.scroll').click(function(event) { | |
event.preventDefault(); | |
$('html,body').animate({ | |
scrollTop: $(this.hash).offset().top | |
}, 500); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
// color() mixin: | |
///////////////////////////////////////////////////// | |
// Gets the specified color from the color palette // | |
// // | |
// Usage: // | |
// background: color('blue'); // #0099CE // |
NewerOlder