-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ya-share2, move yashare, bem-contrib #74
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"name": "bem-social", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "BEM Social Components Library", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/bem-incubator/bem-social" | ||
"url": "git://github.com/bem-contrib/bem-social" | ||
}, | ||
"keywords": [ | ||
"bem", | ||
|
@@ -24,7 +24,7 @@ | |
"Ivan Voischev <[email protected]>" | ||
], | ||
"dependencies": { | ||
"bem-components": "2.3.0" | ||
"bem-components": "^2.3.0" | ||
}, | ||
"license": "MIT" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
block('yashare')( | ||
js()(true), | ||
cls()('ya-share2'), | ||
attrs()(function() { | ||
var ctx = this.ctx, | ||
attrs = { | ||
'data-bare' : ctx.bare, | ||
'data-counter' : ctx.counter, | ||
'data-copy' : ctx.copy, | ||
'data-description' : ctx.description, | ||
'data-image' : ctx.image, | ||
'data-lang' : ctx.lang, | ||
'data-limit' : ctx.limit, | ||
'data-services' : (ctx.services || []).join(','), | ||
'data-size' : ctx.size, | ||
'data-title' : ctx.title, | ||
'data-url' : ctx.url, | ||
}; | ||
return attrs; | ||
}) | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = function(bh) { | ||
|
||
bh.match('yashare', function(ctx, json) { | ||
ctx.js(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. методы ctx
.js(true)
.cls('ya-share2')
.attrs(); |
||
ctx.cls('ya-share2'); | ||
ctx.attrs({ | ||
'data-bare' : json.bare, | ||
'data-counter' : json.counter, | ||
'data-copy' : json.copy, | ||
'data-description' : json.description, | ||
'data-image' : json.image, | ||
'data-lang' : json.lang, | ||
'data-limit' : json.limit, | ||
'data-services' : (json.services || []).join(','), | ||
'data-size' : json.size, | ||
'data-title' : json.title, | ||
'data-url' : json.url, | ||
}); | ||
}); | ||
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[{ | ||
block : 'yashare' | ||
}, { | ||
block : 'yashare', | ||
services : ['a,b,c'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. тут точно не должно быть There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Да, верно, поправлю |
||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<div class="yashare i-bem ya-share2" data-services="" data-bem="{"yashare":{}}"></div> | ||
<div class="yashare i-bem ya-share2" data-services="a,b,c" data-bem="{"yashare":{}}"></div> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -378,13 +378,12 @@ | |
'moimir', | ||
'gplus' | ||
], | ||
theme : 'counter', | ||
l10n : 'ru', | ||
url : 'http://bem-incubator.github.io/bem-social/', | ||
title : 'BEM Social Components Library', | ||
description : 'Fork me on GitHub', | ||
image : 'https://raw.githubusercontent.com/voischev/bem-social/' + | ||
'master/desktop.bundles/index/blocks/page/image/bem.png' | ||
'master/desktop.bundles/index/blocks/page/image/bem.png', | ||
counter : true | ||
}, | ||
{ | ||
tag : 'br' | ||
|
@@ -401,37 +400,33 @@ | |
'friendfeed', | ||
'gplus' | ||
], | ||
theme : 'default', | ||
l10n : 'ru', | ||
url : 'http://bem-incubator.github.io/bem-social/', | ||
title : 'BEM Social Components Library', | ||
description : 'Fork me on GitHub', | ||
image : 'https://raw.githubusercontent.com/voischev/bem-social/' + | ||
'master/desktop.bundles/index/blocks/page/image/bem.png' | ||
'master/desktop.bundles/index/blocks/page/image/bem.png', | ||
limit : 4, | ||
copy : 'last' | ||
|
||
}, | ||
{ | ||
tag : 'br' | ||
}, | ||
{ | ||
attrs : { style : 'background: #212121' }, | ||
content : [ | ||
{ | ||
block : 'yashare', | ||
quickServices : [ | ||
'vkontakte', | ||
'facebook', | ||
'twitter', | ||
'odnoklassniki', | ||
'lj' | ||
], | ||
theme : 'dark', | ||
url : 'http://bem-incubator.github.io/bem-social/', | ||
title : 'BEM Social Components Library', | ||
description : 'Fork me on GitHub', | ||
image : 'https://raw.githubusercontent.com/voischev/bem-social/' + | ||
'master/desktop.bundles/index/blocks/page/image/bem.png' | ||
} | ||
] | ||
block : 'yashare', | ||
quickServices : [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Оставить поддержку поля quickServices, которое в новом api просто services, или тоже вырезать? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adinvadim думаю двигаться нужно на упрощение) так что вырезай |
||
'vkontakte', | ||
'facebook', | ||
'twitter', | ||
'odnoklassniki', | ||
'lj' | ||
], | ||
url : 'http://bem-incubator.github.io/bem-social/', | ||
title : 'BEM Social Components Library', | ||
description : 'Fork me on GitHub', | ||
image : 'https://raw.githubusercontent.com/voischev/bem-social/' + | ||
'master/desktop.bundles/index/blocks/page/image/bem.png', | ||
size : 's' | ||
} | ||
] | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
кмк, либо дописать еще один
var
, либо отбить все объявление вправо.но вообще предлагаю что-нибудь типа: