We begin with the folder structure of a theme. In this section we always go from the theme root folder, in most cases this is the
- src - A folder that can contain PHP classes, used to give theme creators a very good extensibility. For example a helper class to create some recursive listings.
- static - This will be copied without modification to output folder:
public/sasige-theme. Use this for your themes static file like images and libraries.
Sasige have built in SCSS support. Just create a
.scss file wherever you want, for example in a
stylesheets folder. In the theme page file you can use it than like that to generate a valid css file from one or many SCSS sources.
<link href="<?= $page->getThemeCssUrl(["stylesheets/page.scss"]) ?>" rel="stylesheet">
Following variables are available in every SCSS file.
$themeUrlUrl to the root of the theme static folder
This will create one file that contain the contents of this 2 files.
The rest is up to you
In the root theme folder you can insert whatever you want. Every
.php file you create here is available as a template for the user by calling
$page->setThemeTemplate("xxx");. In the real world there are some templates you should create. Best way to see what common standards are, you can use the starter project.
- site.php - Used to output raw HTML in the page layouts content.
- post.php - Used to output posts. Should have a headline, leadtext, timestamp and content.