• Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Learning Erstwhile
  • File Structure
  • Compilation Process
  • Routing
  • Request Flow
  • Components and ErML
    • How Components are Compiled
    • Themes
    • Layouts
  • Scoped Variables
  • Modals
  • Models
    • Using an Erstwhile-aware Backend
    • Creating Your Own Description.json
    • Using Models from the Controller

Themes

8 views 0

Written by mike
August 8, 2023

Erstwhile bundles Components into Themes. At the moment, there is a simple and incomplete one called Mazer (based on the MIT licensed Mazer Dashboard Bootstrap theme) to serve as a starting point.

Themes live in directories (Mazer is here) which in turn contain child directories for each component, as well as a reserved directory called /theme (that contains things like SCSS and Javascript files used theme-wide) and a file called theme.js that contains the subclass of ErstwhileTheme needed to compile the theme.

Each component directory typically contains at least two files, component.js (which contains the subclass of ErstwhileComponent that defines the theme) and component.ejs that contains the EJS template of the component. Only component.js is required. For custom components you can add additional files like SCSS if needed, or additional Javascript files.

Was this helpful?

Yes  No
Related Articles
  • Using Models from the Controller
  • Creating Your Own Description.json
  • Using an Erstwhile-aware Backend
  • Models
  • Modals
  • Scoped Variables

Didn't find your answer? Contact Us

Previously
How Components are Compiled
Up Next
Layouts

loader

Join our Mailing List     

  • Privacy Policy
  • Terms of Use
  • © 2025 RestlessDev. Made in New Orleans.

Welcome to Erstwhile

Thank you for checking out Erstwhile. We’re just getting started, so if you’d like to keep up with our progress please register now and we’ll let you know when new releases come out.

loader

Email Address*

Name