Skip to content

Instantly share code, notes, and snippets.

@innabelaya
Last active April 16, 2017 21:54
Show Gist options
  • Select an option

  • Save innabelaya/41aa8afbfbcfe7c4a9a9 to your computer and use it in GitHub Desktop.

Select an option

Save innabelaya/41aa8afbfbcfe7c4a9a9 to your computer and use it in GitHub Desktop.

Revisions

  1. innabelaya revised this gist Dec 14, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions 05-bemjson.js
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,7 @@
    favicon: '/favicon.ico',
    head: [
    { elem: 'meta', attrs: { name: 'description', content: '' }},
    { elem: 'css', url: 'index.min.css' },
    { elem: 'css', url: 'index.min.ie.css', ie: 'IE' }
    { elem: 'css', url: 'index.min.css' }
    ],
    scripts: [{ elem: 'js', url: 'index.min.js' }],
    content: [
  2. innabelaya created this gist Aug 24, 2015.
    99 changes: 99 additions & 0 deletions 05-bemjson.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,99 @@
    ({
    block: 'page',
    title: 'Title of the page',
    favicon: '/favicon.ico',
    head: [
    { elem: 'meta', attrs: { name: 'description', content: '' }},
    { elem: 'css', url: 'index.min.css' },
    { elem: 'css', url: 'index.min.ie.css', ie: 'IE' }
    ],
    scripts: [{ elem: 'js', url: 'index.min.js' }],
    content: [
    {
    block: 'head',
    mix: [ { block: 'box', js: true } ],
    content: {
    block: 'layout',
    content: [
    {
    elem: 'left',
    content: {
    tag: 'form',
    attrs: { action: 'http://yandex.ru/yandsearch' },
    content: [
    {
    block: 'input',
    name: 'text',
    val: 'Find'
    },
    {
    block: 'button',
    type: 'submit',
    content: 'Search'
    }
    ]
    }
    },
    {
    elem: 'right',
    content: {
    block: 'logo',
    content: [
    {
    block: 'link',
    url: 'http://ru.bem.info',
    content: [
    {
    block: 'image',
    attrs: { src: 'http://varya.me/online-shop-dummy/desktop.blocks/b-logo/b-logo.png' }
    },
    {
    elem: 'slogan',
    content: 'A new way of thinking'
    }
    ]
    }
    ]
    }
    }
    ]
    }
    },
    {
    block: 'goods',
    goods: [
    {
    title: 'Apple iPhone 4S 32Gb',
    image: 'http://mdata.yandex.net/i?path=b1004232748_img_id8368283111385023010.jpg',
    price: '259',
    url: '/'
    },
    {
    title: 'Samsung Galaxy Ace S5830',
    image: 'http://mdata.yandex.net/i?path=b0206005907_img_id5777488190397681906.jpg',
    price: '73',
    url: '/'
    },
    {
    title: 'HTC One S',
    image: 'http://mdata.yandex.net/i?path=b0229115752_img_id5362588736801424341.jpg',
    price: '152',
    url: '/'
    },
    {
    title: 'Sharp SH530U',
    image: 'http://mdata.yandex.net/i?path=b1119145405_img_id7474251838115767025.jpg',
    price: '***',
    url: '/',
    new: true
    },
    {
    title: 'Samsung Galaxy S III 16Gb',
    image: 'http://mdata.yandex.net/i?path=b0503234231_img_id4954748565558111178.jpg',
    price: '180',
    url: '/'
    }
    ]
    }
    ]
    })