Libraries

A library is a description of blocks and resources it consists of. So a library is just a file with information about blocks, assets, etc.

lib.json file structure

Key Description
name The name of a library
groups A set of groups for blocks
blocs A set of blocks
res js and css resources used by library

Example of library config.json file

{
    "name": "default",
    "groups": [{
        "id": "text",
        "label": "Text",
        "position": "0"
    }, {
        "id": "gallery",
        "label": "Gallery",
        "position": "1"
    }, {
        "id": "slider",
        "label": "Slider",
        "position": "2"
    }, {
        "id": "video",
        "label": "Video",
        "position": "3"
    }, {
        "id": "call_to_action",
        "label": "Call to action",
        "position": "4"
    }, {
        "id": "other",
        "label": "Other",
        "position": "5"
    }],
    "blocks": [{
        "name": "demo_text",
        "url": "demo_text/"
    }, {
        "name": "demo_text_2_col",
        "url": "demo_text_2_col/"
    }, {
        "name": "demo_blockquote",
        "url": "demo_blockquote/"
    }, {
        "name": "demo_call_to_action",
        "url": "demo_call_to_action/"
    }, {
        "name": "demo_iconbox",
        "url": "demo_iconbox/"
    }, {
        "name": "glyphicons",
        "url": "glyphicons/"
    }, {
        "name": "demo_map",
        "url": "demo_map/"
    }, {
        "name": "demo_video",
        "url": "demo_video/"
    }, {
        "name": "demo_carousel",
        "url": "demo_carousel/"
    }, {
        "name": "demo_gallery",
        "url": "demo_gallery/"
    }, {
        "name": "assets",
        "url": "http://qoob-builder.com/blocks/default/media/"
    }, {
        "name": "demo_slider",
        "url": "demo_slider/"
    }],
    "res": [{
            "name": "qoob_default_css",
            "type": "css",
            "url": "lib.css"
        }, {
            "name": "owl_carousel_сss",
            "type": "css",
            "url": "demo_slider/assets/css/owl.carousel.css"
        }, {
            "name": "owl_carousel_js",
            "type": "js",
            "url": "demo_slider/assets/js/owl.carousel.min.js"
        }
    ]
}