Structure Overview
Various elements of Deserted Chateau's frontend HTML are constructed via HTML5 templates. These are split into two main categories:
PHP-Rendered Templates
These templates are included into the page via PHP, and populated with their corresponding values, before being sent to the client. This is for situations where populating the elements after the page has loaded isn't acceptable, such as tooltips, where it would cause a janky loading appearance.
The HTML for these templates is kept in src/Frontend/Includes, since they are included into the page in their finished forms, rather than the base template HTML being included into the page for later use.
JavaScript-Rendered Templates
The templates/ folder in the JavaScript directory of the codebase has various classes for constructing and populating document fragments. These are used for constructing and populating templates to be added to a page after the page has loaded, and make up the majority of the templates in use.
The HTML for these templates is kept in src/Frontend/Templates.
Hybrid Templates (PHP and JavaScript rendering)
A few templates have both PHP and JavaScript elements. This is mostly due to tooltips being rendered by PHP, and as such, some template elements that have tooltips contained within them will have PHP code to render the tooltips and then be added to a page via JavaScript later.