Commit 8a07a548 authored by Nikolay Gromov's avatar Nikolay Gromov

Добавил блок соц. ссылок

parent c0fbe085
//- Все примеси в этом файле должны начинаться c имени блока (social)
mixin social(mods)
//- Принимает:
//- mods: '' {string} - модификаторы блока
//- Вызов:
+social()
+social-link('https://vk.com/n.gromov', 'some-mod')
span ВКонтакте
+social-link('https://github.com/nicothin')
svg(width="32", height="32")
use(xlink:href="img/sprite.svg#icon-github")
-
// список модификаторов
var allMods = '';
if(typeof(mods) !== 'undefined' && mods) {
var modsList = mods.split(',');
for (var i = 0; i < modsList.length; i++) {
allMods = allMods + ' social--' + modsList[i].trim();
}
}
ul.social(class=allMods)&attributes(attributes)
block
mixin social-link(link, mods)
//- Принимает:
//- link {string} - ссылка
//- mods {string} - список модификаторов
//- Вызов:
+social-link('https://vk.com/n.gromov', 'some-mod')
span ВКонтакте
-
// список модификаторов
var allMods = '';
if(typeof(mods) !== 'undefined' && mods) {
var modsList = mods.split(',');
for (var i = 0; i < modsList.length; i++) {
allMods = allMods + ' social__link-wrap--' + modsList[i].trim();
}
}
li.social__link-wrap(class=allMods)&attributes(attributes)
a.social__link
block
// В этом файле должны быть стили для БЭМ-блока social, его элементов,
// модификаторов, псевдоселекторов, псевдоэлементов, @media-условий...
// Очередность: http://nicothin.github.io/idiomatic-pre-CSS/#priority
.social {
$block-name: &; // #{$block-name}__element
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment