Creating A New Theme

So, you wanna make a theme? Well, first of all, you should at least have a basic understanding of HTML, PHP, and having at least heard of Laravel's Blade templating syntax. If you've never heard of any of those, I wouldn't recommend continuing.

To start us off, I'd recommend putting the server in debug mode and taking it out of production by changing the following lines in your .env file:

APP_ENV=local
APP_DEBUG=true

These changes should disable view caching and give you a handy little toolbar on the bottom for debugging.

Next up, head to resources/themes and copy the pterodactyl folder to another folder named after your theme.
Repeat this step for public/themes, copying the pterodactyl folder to your theme name.

Now you need to define your theme so it knows what directory the assets are in. Edit app/theme.php and copy/paste the pterodactyl block, replacing pterodactyl with your own theme name.

Finally, set your theme to the desired name by opening up your .env again and changing the following:

APP_THEME=your_theme_name

After that, you should be ready to go! Happy hacking!

Just a quick overview of the file tree:

  • public/themes/theme - Publicly facing resources, like CSS, JS, etc.
  • resources/themes - Private files that are parsed by the server and sent to the client
    • lang - Translation files for your theme, At the time of writing you can't change the language.
    • themes/theme - Templates for each of the pages