GNU AGPLv3: www.gnu.org/licenses/agpl-3.0.html
Gem dedicated for Mokio that adds Skins functionality (including the whole frontend functionality) to Mokio CMS.
Install Mokio first. See detailed instructions about at www.mokio.org/support#getting-started
Lets assume that Mokio is mounted under /backend
After you set up application with Mokio, you need to add following line to your Gemfile:
gem mokio_skins, :git => github.com/versoft/mokio_skins
-
Open Mokio backend: localhost:3000/backend
-
Login with default admin account:
-
Navigate to Skins → Add new skin
-
Prepare skin packed with zip with the following structure:
[ZIP] skin_name
- FOLDER
-
skin_name
-[FOLDER] templates – main skin templates (currently available formats: erb, haml, slim)
–default.html.erb
–layout.html.erb
–home.html.erb
–article.html.erb
–pic_gallery.html.erb
–mov_gallery.html.erb
–contact.html.erb
–list.html.erb
- [FOLDER] js (javascripts for your skin)
–file.js
–file2.js
- [FOLDER] css (css stylesheets for yous skin)
–style.css
–style2.css
- [FOLDER] images (pictures, photos, graphics for your skins) (jpg,gif,png)
–img1.jpg
–img2.png
–img3.gif
Requirements for the skin:
• ZIP filename needs to be the same as skin name
• Skin name has to be unique per system
• Supported styles formats: css
• Supported scripts formats: js
• Supported pictures formats: jpg, gif, png
Skin templates are HTML files with pieces of ruby code with various helpers provided by
Mokio Skins (see point 6). More information about erb, haml and slim format can be found
ERB: www.stuartellis.eu/articles/erb/
HAML: haml.info/
SLIM: slimlang.com/
To activate your skin, navigate to: Skins → Edit skin
-
Change Active field to On (green)
-
Save the skin
To edit your skin, navigate to: Skins → Edit skin
On the left there is a list of skin files available for edit.
Useful shortcuts:
• [ Ctrl R ] display hints in editor
• [ Ctrl S ] or Save File – save your changes in given file
• [ Ctrl Z ] undo changes
Description of helper methods available in Mokio Skins editor can be found on