-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from voischev/v0.2.0
release v0.2.0
- Loading branch information
Showing
19 changed files
with
207 additions
and
99 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
...ub/_button/github_button_download.bemhtml → ..._type/github-button_type_download.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...thub/_button/github_button_follow.bemhtml → ...n/_type/github-button_type_follow.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...github/_button/github_button_fork.bemhtml → ...ton/_type/github-button_type_fork.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...ithub/_button/github_button_issue.bemhtml → ...on/_type/github-button_type_issue.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...github/_button/github_button_star.bemhtml → ...ton/_type/github-button_type_star.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...ithub/_button/github_button_watch.bemhtml → ...on/_type/github-button_type_watch.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
block('github-button')( | ||
tag()('a') | ||
); |
2 changes: 0 additions & 2 deletions
2
...s/github/_button/github_button.browser.js → ...ks/github-button/github-button.browser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* global modules:false */ | ||
|
||
modules.require([], function() { | ||
(function(d, s, id){ | ||
var js, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
block('github-ribbon')( | ||
tag()('a'), | ||
attrs()(function() { | ||
return { | ||
href : this.ctx.url | ||
}; | ||
}), | ||
content()(function() { | ||
return { | ||
tag : 'img', | ||
attrs : { | ||
src : this.ctx.image, | ||
alt : this.ctx.alt || 'Fork me on GitHub' | ||
} | ||
}; | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#github-ribbon | ||
|
||
## Моды | ||
|
||
`url` — ссылка на страницу репозитория | ||
|
||
`image` — если указан подгружает кастомную картинку | ||
|
||
## Модификаторы | ||
- `left` {true} | ||
|
||
Ribbon прижат вправо | ||
|
||
- `right` {true} | ||
|
||
Ribbon прижат вправо | ||
|
||
- `theme` : {Имя темы} (опционально) | ||
|
||
Переопределяет моду `image` на одну из тем https://github.com/blog/273-github-ribbons | ||
Нужен уровень переопределения `bem-social/design/common.blocks` | ||
|
||
## Пример | ||
```js | ||
{ | ||
block : 'github-ribbon', | ||
mods : { theme : 'red', right : true }, | ||
url : 'https://github.com/voischev/bem-social' | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.github-ribbon | ||
{ | ||
position: absolute; | ||
top: 0; | ||
|
||
.image { | ||
margin: 0; | ||
padding: 0; | ||
border: none; | ||
} | ||
|
||
&.github-ribbon_left{ | ||
left: 0; | ||
} | ||
&.github-ribbon_right{ | ||
right: 0; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_darkblue.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'darkblue').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png'; | ||
} | ||
applyNext(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_gray.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'gray').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_gray_6d6d6d.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png'; | ||
} | ||
applyNext(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_green.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'green').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png'; | ||
} | ||
applyNext(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_orange.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'orange').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png'; | ||
} | ||
applyNext(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_red.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'red').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png'; | ||
} | ||
applyNext(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
design/common.blocks/github-ribbon/_theme/github-ribbon_theme_white.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
block('github-ribbon').mod('theme', 'white').def()(function() { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_left_white_ffffff.png'; | ||
if(this.mods.right) { | ||
this.ctx.image = 'https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png'; | ||
} | ||
applyNext(); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.