/mokio_skins

Gem dedicated for Mokio that adds Skins functionality (and therefore sample frontend) to Mokio CMS.

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

MokioSkins

Licence

GNU AGPLv3: www.gnu.org/licenses/agpl-3.0.html

Description

Gem dedicated for Mokio that adds Skins functionality (including the whole frontend functionality) to Mokio CMS.

Tutorials, documentation & useful tips

See www.mokio.org/support

Getting started with Mokio Skins

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

Creating a skin for your website with Mokio CMS

  1. Open Mokio backend: localhost:3000/backend

  2. Login with default admin account:

  3. Navigate to Skins → Add new skin

  4. 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: slim­lang.com/

Activate your skin

To activate your skin, navigate to: Skins → Edit skin

  1. Change Active field to On (green)

  2. Save the skin

Edit 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

Helpers available in editor [Ctrl R]

­Description of helper methods available in Mokio Skins editor can be found on

www.mokio.org/support#mokio-helpers