Skip to content

Commit

Permalink
Merge pull request #49 from voischev/v0.3.0
Browse files Browse the repository at this point in the history
realise 0.3.0
  • Loading branch information
voischev committed Nov 14, 2014
2 parents 5d85ad8 + 1e9cc66 commit 913921f
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 16 deletions.
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,39 @@
Yandex.Share API и другие. Содержит SVG иконки социальных сетей, и несколько
тем оформления. Библиотека использует некоторые блоки [bem-components](http://github.com/bem/bem-components).

[Анотация](http://ru.bem.info/forum/issues/-634/)
## История изменений

## Сейчас есть
### 0.3.0

### Default Buttons
- Добавился блок коментариев `disqus`

+ Twitter
+ Vkontakte
+ GitHub
### 0.2.0

### Custom Share
- Переименован блок `github` в `github-button`
- Добавлен блок `github-ribbon`

### 0.1.0

##### Блоки на основе апи сервисов

- Блок `github` Github Buttons
- Блок `twitter` кнопки "твитнуть", виджет "твит"
- Блок `vk` Лайк
- Блок `yashare` "Поделиться" от Яндекса

##### Кастомизируемые блоки

- Блок `share` поддерживаемые сервисы Blogger, Facebook, Google Plus, Twitter, Вконтакте

##### Темы оформления

- Блок `share` Темы `simple` и `normal`

+ Vkontakte
+ Facebook
+ Twitter
+ Google+
+ Blogger

#### Service API
+ [Yandex.Share](http://api.yandex.ru/share/)

## В планах

+ Blocks `*-groups`
+ Open Graph для блока page ([bem-core](http://github.com/bem/bem-core))
+ Авторизации
+ Widgets [Comments, News, ...]
+ и другие интерфейсные решения использования социальных кнопок
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bem-social",
"version": "0.1.0",
"version": "0.3.0",
"description": "BEM Social Components Library",
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions common.blocks/disqus/disqus.bemhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
block('disqus')(
js()(function() {
return { shortname : this.ctx.shortname };
}),
attrs()(function() {
return this.extend(applyNext(), {
id : 'disqus_thread'
});
})
);
23 changes: 23 additions & 0 deletions common.blocks/disqus/disqus.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules.define(
'disqus',
['i-bem__dom'],
function(provide, BEMDOM) {

provide(BEMDOM.decl(this.name, {
onSetMod : {
'js' : {
'inited' : function() {
var disqus_shortname = this.params.shortname;
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
}
}
}
}));

});
4 changes: 4 additions & 0 deletions common.blocks/disqus/disqus.deps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
({
mustDeps : [{ block : 'i-bem', elems : 'dom' }],
shouldDeps : []
})
4 changes: 4 additions & 0 deletions desktop.bundles/index/index.bemjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@
}
]
},
{
block : 'disqus',
shortname : 'bemsocial'
},
{
elem : 'footer',
content : [
Expand Down

0 comments on commit 913921f

Please sign in to comment.