DrupalCon Seattle 2019: Maybe-crazy things to do with SVG in Drupal 8
Update: A link to the slides! Instructions for viewing in the readme.
Drupal 8 makes using inline SVG in your templates both easy and awesome. For starters, you can:
Pass variables into your svg file to change colors, add classes, create animations, and more.
Display SVG differently based on its context
Respond to user events like hover, click, etc.
Use php to dynamically create paths in an SVG based on database values
If you are unafraid to look inside the SVG file, you will find so many properties and attributes that are easy to modify to customize your content, and you may come to consider SVG an amazing extension of your Twig templates.
Level of knowledge:
Intermediate HTML, CSS, and knowledge of Drupal Admin interface and theming with Twig
No special knowledge about SVG required
Attendees will learn:
Basic capabilities of SVG, especially inline SVG
Creative ways to include SVG in your theme
Using values from the database to customize SVG output
Drupal 8 makes using inline SVG in your templates both easy and awesome. For starters, you can:
Pass variables into your svg file to change colors, add classes, create animations, and more.
Display SVG differently based on its context
Respond to user events like hover, click, etc.
Use php to dynamically create paths in an SVG based on database values
If you are unafraid to look inside the SVG file, you will find so many properties and attributes that are easy to modify to customize your content, and you may come to consider SVG an amazing extension of your Twig templates.
Level of knowledge:
Intermediate HTML, CSS, and knowledge of Drupal Admin interface and theming with Twig
No special knowledge about SVG required
Attendees will learn:
Basic capabilities of SVG, especially inline SVG
Creative ways to include SVG in your theme
Using values from the database to customize SVG output