Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Section: Drupal theming #5

Open
theodorosploumis opened this issue Dec 28, 2021 · 3 comments
Open

New Section: Drupal theming #5

theodorosploumis opened this issue Dec 28, 2021 · 3 comments
Labels
Theme Drupal theme

Comments

@theodorosploumis
Copy link
Owner

theodorosploumis commented Dec 28, 2021

General theming

  • The Drupal theme anatomy
  • Create subtheme
  • Regions
  • Twig templates (organizing, naming, inheritance)
  • Frameworks we prefer (and how to choose them)
  • Setup CSS (CSS variables, postcss, scss, node-sass etc)
  • Setup JS (ES6, jQuery)
  • Fonts/typography
  • Setup compiling (grunt, gulp, npm etc)
  • Browsersync, autoreload etc
  • autoprefixer and browser support, polyfills
  • npm utilities (eslint, normalize, husky, prettier, stylelint etc)
  • External libraries used (JS utilities, cookies etc)
  • Enable twig and cache debug (+devel module)
  • hooks (how to add custom classes, theme suggestions, in-twig libraries)
  • IDE setup, basic vcs (git) workflows
  • Utility CSS/JS/HTM frameworks
  • Storybook
  • Should we include compiled assets to vcs?
  • Best practices to write, organize and reuse SCSS and JS
  • Chrome extensions for theming
  • Browser Devtools (how to, common tasks, addiotional tools etc)
  • "Translating" design systems into styleguides
  • e2e testing, visual regression etc
  • Drupal themes we prefer or avoid
  • Drupal layout builder
  • Drupal theme breakpoints
  • BEM, SMACSS and other CSS methodologies within Drupal
  • Above the fold CSS
  • A11y validations, tools and analysis
  • Local dev tools (eg ddev) to get a running Drupal instance

See also https://github.com/theodorosploumis/notes/blob/master/drupal/theme-validator.md.


Theming lessons

Business logic versus presentation logic

Twig

Theme hooks

  • Theme hook suggestions

Render arrays

  • The structure of a render array
  • The render pipeline

Assets and libraries

  • Libraries

Common theme hooks

  • Lists
  • Links
  • Tables

Attributes

Layouts

  • Defining layouts
  • Rendering a layout

Other/General

  • Get Drupal themes
  • The theme anatomy
  • Base themes and inheritance
  • Create a new theme
  • Theme settings
  • (Theme) layouts and breakpoints
  • Twig templates
  • Render arrays
  • Controllers
  • Theme templates and theme hooks
  • BEM, SMACSS and other CSS methodologies within Drupal
  • Attach CSS and JS (internal, external) with libraries
  • Working with JS (behaviors etc)
  • Useful modules for theming (kint, webprofiler, twig related etc)
  • Twig basics (render, loop, sub-values, conditions, arrays)
  • Twig functions
  • Twig filters
  • Twig macros
  • How to theme
  • Modules we use for theming
  • Base themes we prefer
  • Themes we avoid
  • Theming philosophy
  • Compiling assets
  • Performance needs and testing
  • Browsers we support
  • A11y testing
  • Using paid themes

Theming problems quastionaire

Theming process standards

Trying new things on theming


Drupal + TailwindCSS theme

  • tailwind version (CDN usage)
  • unset Drupal core CSS files
  • tailwind CSS variables
  • tailwind compiler
  • Drupal config values (php --> twig) on admin UI
  • fonts
  • colors
  • width & layout
  • twig templates
  • twig template suggestions (by bundle, field type, view_mode, combinations of)
  • email twig templates
  • use laravel mix
  • Drupal modules (ui_patterns, entity_class_formatter, block_class, layout_builder, CKEditor tailwind buttons)
  • Other CSS/JS libraries (hover, animate, icons etc)
@theodorosploumis theodorosploumis added the Theme Drupal theme label Sep 9, 2022
@theodorosploumis theodorosploumis changed the title Drupal + TailwindCSS theme New Section: Drupal theming Feb 6, 2023
@theodorosploumis
Copy link
Owner Author

theodorosploumis commented Apr 26, 2023

Lessons: Theming (new)

  • Base theme and inheritance
  • CSS libraries
    • which
    • external/internal
    • (core) overrides
  • JS libraries
    • which
    • external/internal
    • (core) overrides
  • Theme Breakpoints
  • Theme settings (config)
  • Asset bundle
    • grunt
    • bundle
    • gulp
    • phpstorm watchers
  • SCSS structure
  • Twig
    • functions
    • filters
    • loops
    • macros
    • conditions
    • values
    • folders
    • suggestions
    • embeds
    • extends
    • templates
    • variables
    • debug
  • Admin theme
  • Theming methodology
    • Twig templates
    • Patternlab
    • Storybook
  • Styleguides
  • .theme file
    • functions
    • hooks
    • includes
  • Related modules
    • ds
    • components
    • ui_patterns
    • paragraphs
    • layout_builder
    • twig_tweak
    • twig_field_value
    • field_formatter_class
  • Browser
    • which
    • extensions
    • profiles
    • local sources
  • Node version (for npm packages) with nvm
  • Git
    • .gitignore
    • exclude compiled (CSS/JS) files?
    • pre commit hook
  • Mockups and design
    • Sketch
    • Figma
    • InvisionApp
    • XD
    • Zeplin

@theodorosploumis
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Theme Drupal theme
Projects
None yet
Development

No branches or pull requests

1 participant