-
-
Notifications
You must be signed in to change notification settings - Fork 6
Templates
Templates are "simple" php infused HTML files. Well, they're simple if you know some PHP. But you probably do as you're running this PHP based devtool.
The current setup of templates allows you to take any name you want for a template. As long as there's a .phtml, .css and .js file that php-drafter can find in your include path or apib path that carries the same name. You have several structure options for this:
/templates/<templatename>/<templatename>.<filename>
/templates/<templatename>.<filename>
/<templatename>/<templatename>.<filename>
/<templatename>.<filename>
- File is in main repo
By default it uses default
as a template, which you can find in the Out/HTML directory.
Since user templates have priority you can even call your theme default (saves you using a CLI argument).
<apibpath>
/index.apib
/templates/<templatename>/<templatename>.phtml
/templates/<templatename>/<templatename>.css
/templates/<templatename>/<templatename>.js
PHPDraft also has a material design theme which you can use the -t material
flag for. This theme has customisable colours. Those colours can be found here: https://getmdl.io/customize/index.html. You can pass them to the parser using environment variables, for example COLOR_PRIMARY=grey; COLOR_SECONDARY=orange
.