Themes
Biblioteca is configured to be easily themeable.
By default all the template in the templates
directory are used unless the same template exists in the theme’s directory.
Creating a new theme
-
Add your theme in the user form in
src/Form/ProfileType.php
:Directorysrc
DirectoryForm
- ProfileType.php
-
You can overwrite all the original templates by adding a file with the same structure under your theme directory:
In
templates/themes/<your theme>/[original_folder]/[original_template_name]
you can rewrite the template with your theme markupEvery time a template is called, it will first check if the template exists in the theme’s folder or fall back to the original one
Directorytemplates
Directoryshelf
- index.html.twig
Directorythemes
Directorycool
Directoryshelf
- index.html.twig
-
Update the CSS assets as necessary.
Directoryassets
Directorystyles
- global.css
-
Don’t forget to change your theme in the user settings to test it