====== Écriture d'un thème depuis zéro ======
Sources:
* [[https://blog.templatetoaster.com/create-drupal-theme-from-scratch/]]
Nom du thème créé : **Theme01**
* Créer le dossier **/themes/custom/Theme01**
* Y créer l'arborescente suivante :
themes
custom
Theme01
css
style.css
js
main.js
templates
page.html.twig
Theme01.info.yml
Theme01.libraries.yml
Fichier **/themes/custom/Theme01/Theme01.info.yml**
name: Theme01
type: theme
core: 8.x
libraries:
- Theme01/global
regions:
header: Header
content: Content
footer: Footer
Fichier **/themes/custom/Theme01/Theme01.libraries.yml**
global:
css:
theme:
css/style.css: {}
js:
js/main.js: {}
dependencies:
- core/jquery
Redéfinir le template "**page.html.twig**"
Fichier **/themes/custom/Theme01/templates/page.html.twig**
{{page.content}}