Fork of Drupal 8's Bartik theme for my theming presentations (about Twig). (Do Not use Bartik as a base theme in real projects, 'cause updates may break your theme!)
Warning: It looks broken because markup was changed but CSS styling was not written for the new classes! :)
- block.html.twig
- add bundle (type) class to blocks
- field.html.twig
- new file to add "BEM Element" style class to fields
- field--node--field-tags.html.twig
- added first / last classes and tag count using Twig's loop variable
- menu.html.twig
- new file
- added custom css classes (article link below)
- mybartik.theme
- preprocess to have "bundle" variable in field.html.twig
- template suggestions sample for custom block types
- node.html.twig
- added new variable: bundle
- use BEM style class naming where block is the content type
- added embedded twig block, to split up template to smaller parts
- node--article.html.twig
- new file, extends node.html.twig
- node--article--teaser.html
- new file, extends node--article.html.twig
- example usage of "parent"
- added custom read more link using path function
- page.html.twig
- Copyright message using date() filter
- Current date using format_date
- Node created and updated date
- Kint
- (try to) print content of different node fields
- Twig Documentation
- Set Twig Debug
- Drupal 8 Twig: add custom CSS classes to menus (based on menu name)
- Translatable, custom dates in Twig templates of Drupal 8
- Applying BEM inspired classes to your Drupal 8 theme
- Things I Learned from the DrupalTwig Slack: Volume 1
- Things I Learned from the DrupalTwig Slack: Volume 2
- Pistachio: "…to serve as an example of all the features a theme can have"
- Top Thirteen Drupal Twig Helper Modules
- Introducing the UI Patterns module: use atomic UI components everywhere in Drupal 8
- https://www.drupal.org/project/components – Registers “component libraries” defined by your theme or module as Twig namespaces.
- https://www.drupal.org/project/twig_field_value
- https://www.drupal.org/project/themable_forms
- https://www.drupal.org/sandbox/mikeker/2612132 (Twig Globals)
- https://www.drupal.org/project/ui_patterns – "Define and expose self-contained UI patterns as Drupal plugins and use them seamlessly in your Paragraphs, Panels, Field Groups or Display Suite view modes.""