NAME
Slovo::Themes::Malka - a small theme, using chota.css
SYNOPSIS
# in etc/slovo.conf
plugins => [
# ...
# Themes. The precedence is depending on the order here.
"Themes::Malka"
# another custom theme
{"Themes::MyTheme"=>{templates=>['themes/my_theme' => 'themes/my_theme']}}
],
DESCRIPTION
Slovo::Themes::Malka is a core plugin which is loaded by defauld during startup. It contains a __DATA__ section with a set of templates and static files. It adds itself to the beginning of the @{$renderer->classes}
. Also it appends its suggested relative path themes/malka
to the "Themes" select_box in the form for editing domains domove/form.html.ep
. This way the theme can be shosen for use by separate domains, served by one Slovo instance.
Note that the theme must be inflated first to the respective domove
folder for the selection to work. See Slovo::Command::Author::inflate.
The theme holds templates and static files in its __DATA__
section. Templates from __DATA__
section reduce IO operations during startup time as the application does not have to load them from separate files. This reduces the overall execution time when the application is run as a CGI script. This works well for one-site deployments or several sites, using the same theme.
The templates and static files can be inflated to separate files and customised for your own deployment using the command Slovo::Command::Author::inflate. Here is an example with an internationalized domain name (IDN) - слово.бг (xn--b1arjbl.xn--90ae).
bin/slovo inflate --class Slovo::Themes::Malka -t \
--path domove/xn--b1arjbl.xn--90ae/templates/themes/malka
bin/slovo inflate --class Slovo::Themes::Malka -p \
--path domove/xn--b1arjbl.xn--90ae
METHODS
The usual method is implemented.
register
Prepends the class to renderer and static classes and prepends the base path of the templates from the __DATA__
section to $conf->{domove_templates}
, which is used in the domains form.
EMBEDDED FILES
Currently this theme embeds the following files. They will be inflated when using the given example at the end of the DESCRIPTION.
@@ celini/execute.html.ep
@@ layouts/site.html.ep
@@ partials/_beleyazhka.html.ep
@@ partials/_ceyalina.html.ep
@@ partials/_data_type.html.ep
@@ partials/_footer.html.ep
@@ partials/_footer_right.html.ep
@@ partials/_head.html.ep
@@ partials/_header.html.ep
@@ partials/_kniga.html.ep
@@ partials/_lang_menu.html.ep
@@ partials/_left.html.ep
@@ partials/_left_menu_stranici.html.ep
@@ partials/_otgowory.html.ep
@@ partials/_pisanie.html.ep
@@ partials/_pisanie_otkysy.html.ep
@@ partials/_right.html.ep
@@ partials/_wyprosy.html.ep
@@ partials/_zaglawie.html.ep
@@ stranici/templates/dom.html.ep
@@ stranici/execute.html.ep
@@ css/malka/chota_all_min.css
@@ css/malka/site.css
SEE ALSO
"Stash and templates" in Mojolicious::Guides::Tutorial, "renderer" in Mojolicious, Mojolicious::Renderer, "Bundling assets with plugins" in Mojolicious::Guides::Rendering, Slovo::Command::Author::inflate