Skip to content

Instantly share code, notes, and snippets.

View jacine's full-sized avatar
😁

Jacine Luisi jacine

😁
View GitHub Profile
@jacine
jacine / Notes.md
Created February 7, 2020 02:08
Kickstart Responsive Image Notes

Responsive Images

  • Hero: 734 x 400 / total: 1280 / left 546px 42.65625% / right 734px 57.34375%
    • 730 x 417 (Ratio 7:4)
  • Hero II: Full width, max height of 400px
    • 1300 x 400 (Ratio 13:4)
    • 2600 x 800 (Ratio 13:4)
  • Cards: 346 x 190 / 25:19 ratio
    • 350 x 200 (Ratio 7:4)
  • Blog (teaser): 350 x 200 / 7:4 ratio
@jacine
jacine / extensions.md
Created December 23, 2019 16:34
VSCode Extensions
@jacine
jacine / details.twig
Last active May 14, 2019 14:40
Node Edit Form - Sidebar (via custom Seven sub theme)
{#
/**
* @file
* Component template for details element.
* https://www.drupal.org/project/components
*
* Variables:
* - summary: HTML/text to display in <summary> element
* - details: Main content of details.
* - open: If the details element should be open by default.

Keybase proof

I hereby claim:

  • I am jacine on github.
  • I am jacine (https://keybase.io/jacine) on keybase.
  • I have a public key whose fingerprint is ED1C D152 92C1 D401 F241 0837 2C54 AE7F 3308 6C2B

To claim this, I am signing this object:

@jacine
jacine / icon.html.twig
Last active November 2, 2016 16:26
Icons for Menu Item links broke with 8.2 upgrade!
{#
/**
* @file
* Drupal pass-through template for icon theme hook implementation.
*
* @see /themes/THEME/components/icon.twig.
*/
#}
{% embed '@components/icon.twig' %}{% endembed %}
@jacine
jacine / icon.twig
Created September 1, 2016 19:28
My Icon Twig Component
{#
/**
* @file
* SVG Icon template
*
* Variables:
* - icon: Name of the icon; SVG should exist as build/img/icons/{icon}.swg
* - text: Fallback text for screen readers, and when icon is not present.
* - text_class: Provides a class using boolean text_visible, to add a class
* which determines whether fallback text should appear visually or not.
@jacine
jacine / composer.md
Last active August 31, 2016 19:13
Composer

Composer Workflow

Composer is a package manager similar to NPM for JavaScript, but for dealing with PHP packages. We use it to manage Drupal core, contributed modules (and other 3rd party libraries needed) and patches. The following section is a quick reference for common tasks. Ensure you have installed/updated Composer before proceeding.

*Note about Git: While this will be obvious to most, it bears mentioning that after you're finished installing, updating or patching with Composer, you'll need to add the changes/additions to version control.

Contributed Modules

Note: When a specific version isn't specified, composer prefers stable over RC over beta over alpha over DEV releases.

@jacine
jacine / mytheme.theme.php
Last active August 8, 2016 13:20
Container Context!
<?php
use Drupal\Core\Render\Element;
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function THEME_theme_suggestions_container_alter(array &$suggestions, array $variables) {
if (!empty($variables['element'])) {
$element = $variables['element'];