Moodle themes provide a way of affecting the appearance of any page within Moodle. Through a mixture of CSS and PHP code, themes allow us to lay out our pages in creative ways.
All themes require four files as a minimum: config.php, styles.php, header.html
, and footer.html
. They should also have one or more CSS files.
The styles.php
file is standard and seldom needs to be changed. The config.php
file defines all of the stylesheets used by the theme as well as other style options. The header.html
and footer.html
files define the opening and closing HTML respectively for all pages using the theme. The CSS files include all of the CSS styles defined by this theme. The standard themes break these out by function and include styles_color.css
for color style definitions, styles_fonts.css
for font style definitions, and styles_layout.css
for layout style definitions. Breaking out your CSS into functional files is not required. However, it makes it simpler to replace only...