Skip to content

Instantly share code, notes, and snippets.

@jeffam
jeffam / readme.md
Last active February 26, 2019 13:44
ILR/CU Design System

ILR/CU Design System

  • Monorepo for components. Templates are twig, CSS preprocessor is Sass.
  • Each component is a package. Probably npm. Each package has its dependencies, compiled CSS, optional js, documentation, and twig template.
  • Projects can install components a-la-carte. e.g. npm install @cu-design/component-button.

An installed component might look like this:

node_modules/@cu-design/component-button/
@jeffam
jeffam / 3005403-35__modified.patch
Last active December 2, 2019 23:54
Cannot delete or edit a block that is placed in a section of the layout_builder Patch for 8.7
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 078d2adc80..ee7ffb426b 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -87,10 +87,11 @@ function seven_preprocess_block_content_add_list(&$variables) {
/**
* Implements hook_preprocess_block() for block content.
*
- * Disables contextual links for all blocks.
+ * Disables contextual links for all blocks except for layout builder blocks.
#!/usr/bin/env bash
# Set the default message.
cat <<'EOF' | drush vset efd_default_message -
<p>As a result of the University's <a href="https://statements.cornell.edu/2020/20200310-coronavirus-update.cfm">recently announced proactive measures</a> to prevent the spread of the novel coronavirus disease, COVID-19, this event has been cancelled and we are not currently accepting applications.<br>For more information, please <a href="/about-ilr/contact-us">contact us</a>.</p>
EOF
# Here's an example of disabling a form using the default message.
echo '{default}' | drush vset efd__fex_wisp_sponsor_registration -
function xdebug-status() {
if [ $# -eq 0 ]
then
if [[ "$XDEBUG_MODE" == "off" ]]
then
echo "Xdebug is off."
else
echo "Xdebug is on."
fi
else