Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // os__text.bh.js
- module.exports = function(bh) {
- bh.match('os__text', function(ctx) {
- ctx.tag('p'),
- ctx.content([
- {
- content: 'Доступно для iPhone, iPad, Android, Windows phone, Mac OS, Windows 8'
- }
- ]);
- });
- };
- // intro.bh.js
- module.exports = function(bh) {
- bh.match('intro', function(ctx) {
- ctx.tag('section');
- ctx.content([
- {
- block: 'container',
- content: [
- {
- block: 'title',
- mods: { theme: 'white'}
- },
- {
- block: 'link',
- cls: 'btn-download',
- url: '#',
- content: 'Скачать приложение'
- },
- {
- block: 'os',
- content: [
- {
- elem: 'link',
- mods: { os: 'ios' }
- },
- {
- elem: 'link',
- mods: { os: 'ms' }
- },
- {
- block: 'os',
- elem: 'text'
- }
- ]
- }
- ]
- }
- ])
- });
- bh.match('os__link', function(ctx) {
- ctx.tag('a');
- });
- };
- // Трансформируется в
- <div class="os">
- <a class="os__link os__link_os_ios"></a>
- <a class="os__link os__link_os_ms"></a>
- <p class="os__text"></p>
- <div>Доступно для iPhone, iPad, Android, Windows phone, Mac OS, Windows 8</div>
- <p></p>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement