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
{% comment %} | |
* | |
* This loop loops through a collection called `collection_name` | |
* and sorts it by the front matter variable `date` and than filters | |
* the collection with `reverse` in reverse order | |
* | |
* To make it work you first have to assign the data to a new string | |
* called `sorted`. | |
* | |
{% endcomment %} |
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
/** | |
* Convert font-size from px to rem with px fallback | |
* | |
* @param $size - the value in pixel you want to convert | |
* | |
* e.g. p {@include fontSize(12px);} | |
* | |
*/ | |
@use "sass:math"; |
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
#Lando file for angular app + storybook | |
name: angular-app | |
excludes: | |
- ./node_modules | |
proxy: | |
front: | |
- angular-app.lndo.site:4200 | |
- storybook-app.lndo.site:6006 | |
services: | |
front: |
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
<?php | |
use Drupal\paragraphs\Entity\Paragraph; | |
/** | |
* Implements template_preprocess_node | |
* | |
* Add variables for paragraphs available to node templates | |
*/ | |
function CUSTOM_preprocess_node(&$variables) { | |
// Convenience Variables |
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
// Requires Gulp v4. | |
// $ npm uninstall --global gulp gulp-cli | |
// $ rm /usr/local/share/man/man1/gulp.1 | |
// $ npm install --global gulp-cli | |
// $ npm install | |
const { src, dest, watch, series, parallel } = require('gulp'); | |
const browsersync = require('browser-sync').create(); | |
const sass = require('gulp-sass'); | |
const autoprefixer = require('gulp-autoprefixer'); | |
const sourcemaps = require('gulp-sourcemaps'); |
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 HOOK_preprocess_block__page_title_block(&$variables) { | |
$request = \Drupal::request(); | |
$route_match = \Drupal::routeMatch(); | |
$page_title = \Drupal::service('title_resolver')->getTitle($request, $route_match->getRouteObject()); | |
if (!empty($page_title) && empty($variables['content']['#title'])) { | |
$variables['content']['#title'] = $page_title; | |
} | |
} |
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
###### | |
# This script intentionally deletes a lot of things that could be important!!!!! | |
# Please be sure you have a backup before you go nucular!!!!! | |
##### | |
# Depending on where your web root is... | |
rm -rf vendor/ && rm -rf web/core && rm -rf web/modules/contrib/ && rm -rf composer.lock | |
# or | |
rm -rf vendor/ && rm -rf docroot/core && rm -rf docroot/modules/contrib/ && rm -rf composer.lock |
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
#!/usr/bin/env bash | |
# 1. Skip steps if you already have the tools listed | |
# 2. Run source ~/.bashrc or source ~/.zshrc after each step to ensure command is registered | |
# Install Homebrew, if not installed | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update Homebrew installed packages | |
brew update && brew upgrade |
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
iframe { | |
max-width: 100%; | |
} |
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
var IputEffect = function(){ | |
var placeholderPosition, appendInputWhenSelect, actions; | |
actions = { | |
activate: function(el) { | |
el.parentNode.parentNode.addClass('active'); | |
}, | |
deactivate: function(el) { | |
if (el.value === '') el.parentNode.parentNode.removeClass('active'); |