Skip to content

Instantly share code, notes, and snippets.

View StevenGFX's full-sized avatar
🚀
Knocking it out of the planet! 🌎

Steven Williams StevenGFX

🚀
Knocking it out of the planet! 🌎
View GitHub Profile
@pixleight
pixleight / carousel.css
Created December 8, 2020 17:13
Tailwind CSS / Alpine.js Image Carousel with Lightbox
@philwolstenholme
philwolstenholme / ######-phil-wolstenholme-drupalcon-europe-2020-utility-first-css.md
Last active November 1, 2021 09:18
Phil Wolstenholme - DrupalCon Europe 2020 - Utility-first CSS

Hello DrupalCon! 👋

Here's a big dump of code examples from my slides, plus some examples that didn't make it to the final cut.

The snippets should be organised by slide number, e.g. #46--_search.scss is the snippet of search-related SCSS shown on slide 46.

My slides

Here's a PDF of my slides (via Google Drive) for your reference, or if Zoom goes wrong!

@vidia
vidia / nginx-unificontroller.conf
Last active November 4, 2024 10:16
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@jpalala
jpalala / react_samples_list.md
Last active November 12, 2024 04:10 — forked from leecade/react_samples_list.md
React Samples List
@raphaellarrinaga
raphaellarrinaga / drupal_8_twig_cheatsheet.md
Last active July 20, 2023 21:21
[Drupal 8 Twig cheatsheet] #tags: drupal8, twig, cheatsheet

Drupal 8 Twig cheatsheet

Please note I created that sheet as a personal side note/draft and not everything is fully tested. There could be errors or better things to do. So if you spot something wrong or something that can be improved, feel free to comment below and I will do the changes.

Getting Drupal 8 field values in Twig

Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}

@bogvsdev
bogvsdev / image_src.html.twig
Last active May 1, 2020 19:14
Drupal 8 twig, get image url
{% set the_image = item.content['#field_collection_item'].field_featurette_image %}
<img src="{{ file_url(the_image.entity.uri.value) }}" alt="{{ the_image.alt }}" title="{{ the_image.title }}">
or
<img src="{{file_url(node.field_hotel_image.entity.uri.value)}}" alt="3242">
@startinggravity
startinggravity / menu--social-media.html.twig
Created October 30, 2015 15:37
Use a Drupal menu as a social media links block
{#
/**
* @file
* Theme override to display a social media links from a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
@sachbearbeiter
sachbearbeiter / image.html.twig
Last active September 27, 2021 09:05
D8: Theming examples: Images: How to print individual image values and suppress width and height via the image.html.twig template ... *First results of struggling through Drupal 8 - better solutions are probably out there! **Drupal 8 is still Beta - improvements through API modifications are possible!
{#
/**
* @file
* Default theme implementation of an image.
*
* Available variables:
* - attributes: HTML attributes for the img tag.
* - style_name: (optional) The name of the image style applied.
*
* @see template_preprocess_image()
@KartikTalwar
KartikTalwar / CoderDojo.md
Last active August 1, 2018 17:50
GitHub CoderDojo - Intro to D3.js

Animations in JavaScript

D3.js

Library that uses HTML, CSS and SVG to bring data to life.

Setting Up