#09 - Attaching assets (CSS/JS)
Opened this issue · 0 comments
amansrivastava commented
Objective
At the end of this course, you will be able to
add JS/CSS to a module or a theme to be available on selection / all pages
Exercise
- Create a custom module and add a CSS and JS file in appropriate subdirectories in the module.
- Create a libraries.yml file and define 2 libraries one for each of the CSS and JS.
- Attach the CSS such that it is loaded for all Table elements shown anywhere on the site. Hint
- Take any custom block that you have built over the previous exercises. Modify the build() to attach the JS to be loaded whenever the block is displayed. Hint