-
Notifications
You must be signed in to change notification settings - Fork 14
Creating a custom theme
The theming engine within BlueStats allows you to change the html, css and js of any page. This is because BlueStats uses template files within themes to generate the pages.
These are stored in the themes
directory within the BlueStats root. The directory name of the theme is the name of the theme and is used to select themes in to admin panel.
The directory layout of a theme looks like this:
- ThemeName
- assets
- CSS and JS files used within the theme
- modules
- PluginName
- Custom module for plugin
- PluginName
- templates
- allPlayers.html
- highscores.html
- home.html
- player.html
- global.html
- 404.html
The files in the templates folder contain the html for all the pages in bluestats. The file names are the same as the request uri. You can add more pages and they will be avaliable. This will allow you to add custom pages such as about pages, pvp stats and more.
global.html
is used as the main template and all page templates extend this file. They replace {{ content }}
with the html within the template file.
404.html
is used to store the html for Not Found pages. This file also extends global.html