A starter theme for SilverStripe
This package is auto-updated.
Last update: 2022-04-19 14:09:45 UTC
- Copy the theme into the
themes/directory of your SilverStripe project. If you've named it correctly, there should be a directory called
- Add the following to your
SilverStripe\View\SSViewer: themes: - '$public' - '[your-theme]' - '$default'
- Update composer.json to fit your new theme name.
- Copy src/StarterPageExtension.php to app/src and make your page uses it
SilverStripe\CMS\Model\SiteTree: extensions: - StarterPageExtension
- Happy hacking!
This theme is basically build around recommendations made in this article https://www.matuzo.at/blog/html-boilerplate/ which is a brilliant introduction for a modern boilerplate.
It is bundled with bootstrap 5 but feel free to use whatever you like.
Please use https://google-webfonts-helper.herokuapp.com/fonts/ to create a local version of your google fonts or use your own. Use only woff/woff2 fonts.
Fonts needs to be preloaded for best results, see StarterPageExtension::PreloadResources
By default, the search form works on all pages. But this leads to a lot of problems. In general, I'd rather use a custom search controller to display results. This should be provided with $SearchControllerLink.
You can use https://github.com/lekoala/silverstripe-simple-search to enable this.
No js is required by default in the theme. This is because I highly recommend to manage things from your controller instead.
Here is a sample bit of code you can include in
Please note we are using js modules here and this require the usage of my defer backend module with
enable_js_modules set to
for this to work.
NOTE: Dropdown, Tooltip and Popover are not usable with js modules
- SiteConfig.ThemeColor to be defined