Less для иконок вкладок и меню навигации

Less для иконок вкладок и меню навигации

Less:
.navigation-icons(@nav-id; @fa-uid; @fa-size: false; @faColor: hsl(204, 80%, 80%))
{
    @m-faColor: hsl(hue(@faColor), saturation(@faColor), lightness(@faColor)); // Костыль для работы условия iscolor в миксине
    
    .p-navEl-link,
    .menu-linkRow,
    .offCanvasMenu-link
    {
        &[data-nav-id="@{nav-id}"]:before
        {
            padding-right: 4px;
            & when (isnumber(@fa-size))
            {
                font-size: @fa-size;
            }
            & when (iscolor(@m-faColor))
            {
                color: @m-faColor;
            }
            //content: "\@{fa-uid}";
            .m-faIcon(@fa-uid);
        }
    }
}

// Иконки Font Awesome в навигацию
/* Главная */
.navigation-icons(home, f046);
/* Форум */
.navigation-icons(forums, @fa-var-info);
.navigation-icons(newPosts, @fa-var-comments);
.navigation-icons(findThreads, @fa-var-search);
.navigation-icons(yourThreads, @fa-var-comment);
.navigation-icons(unansweredThreads, @fa-var-search-minus);
.navigation-icons(contributedThreads, @fa-var-search-plus);
.navigation-icons(watched, @fa-var-eye);
.navigation-icons(watchedThreads, @fa-var-bookmark);
.navigation-icons(watchedForums, @fa-var-bookmark);
.navigation-icons(searchForums, @fa-var-search-plus);
.navigation-icons(markForumsRead, @fa-var-check-square);
/* Ресурс менеджер */
.navigation-icons(xfrm, @fa-var-download);
.navigation-icons(xfrmLatestReviews, @fa-var-trophy);
.navigation-icons(xfrmYourResources, @fa-var-user);
.navigation-icons(xfrmWatched, @fa-var-eye);
.navigation-icons(xfrmWatchedResources, @fa-var-bookmark);
.navigation-icons(xfrmWatchedCategories, @fa-var-bookmark);
.navigation-icons(xfrmSearchResources, @fa-var-search);
/* Пользователи */
.navigation-icons(members, @fa-var-users);
.navigation-icons(registeredMembers, @fa-var-user-plus);
.navigation-icons(currentVisitors, @fa-var-users);
.navigation-icons(newProfilePosts, @fa-var-comment-dots);
.navigation-icons(searchProfilePosts, @fa-var-search-plus);
/* Что нового? */
.navigation-icons(whatsNew, @fa-var-comment-smile);
.navigation-icons(whatsNewPosts, @fa-var-file-alt);
.navigation-icons(xfrmNewResources, @fa-var-download);
.navigation-icons(whatsNewProfilePosts, @fa-var-pencil);
.navigation-icons(whatsNewNewsFeed, @fa-var-rss);
.navigation-icons(latestActivity, @fa-var-fire);

Less:
.navigation-icons(@nav-id; @fa-uid; @fa-type: false; @fa-size: false; @color: false) {
    .p-navEl-link,
    .menu-linkRow,
    .offCanvasMenu-link  {
            &[data-nav-id="@{nav-id}"]:before {
                padding-right: 4px;
                & when (@fa-type = false) {
                    .m-faBase();
                }
                & when (@fa-type = Brands) {
                    .m-faBase('Brands');
                }
                & when (isnumber(@fa-size)) {
                    font-size: @fa-size;
                }
                & when (iscolor(@color)) {
                    color: @color;
                }
                content: "\@{fa-uid}";
            }
    }
}

// Иконки Font Awesome в навигацию
/* Главная */
.navigation-icons(home, f046);
/* Форум */
.navigation-icons(forums, f129);
.navigation-icons(newPosts, f086);
.navigation-icons(findThreads, f002);
.navigation-icons(yourThreads, f075);
.navigation-icons(unansweredThreads, f010);
.navigation-icons(contributedThreads, f00e);
.navigation-icons(watched, f06e);
.navigation-icons(watchedThreads, f02e);
.navigation-icons(watchedForums, f02e);
.navigation-icons(searchForums, f00e);
.navigation-icons(markForumsRead, f14a);
//.navigation-icons(markForumsRead, f171, Brands);
/* Ресурс менеджер */
.navigation-icons(xfrm, f019);
.navigation-icons(xfrmLatestReviews, f091);
.navigation-icons(xfrmYourResources, f007);
.navigation-icons(xfrmWatched, f06e);
.navigation-icons(xfrmWatchedResources, f02e);
.navigation-icons(xfrmWatchedCategories, f02e);
.navigation-icons(xfrmSearchResources, f002);
/* Пользователи */
.navigation-icons(members, f0c0);
.navigation-icons(registeredMembers, f234);
.navigation-icons(currentVisitors, f0c0);
.navigation-icons(newProfilePosts, f4ad);
.navigation-icons(searchProfilePosts, f00e);
/* Что нового? */
.navigation-icons(whatsNew, f4b4);
.navigation-icons(whatsNewPosts, f15c);
.navigation-icons(xfrmNewResources, f019);
.navigation-icons(whatsNewProfilePosts, f040);
.navigation-icons(whatsNewNewsFeed, f09e);
.navigation-icons(latestActivity, f06d);

Less:
.navigation-icons (@nav-id; @fa-uid; @fa-size: false; @color: false) {
    .p-navEl-link,
    .menu-linkRow {
            &[data-nav-id="@{nav-id}"]:before {
                padding-right: 4px;
                font: normal normal normal 14px/1 FontAwesome;
                & when (isnumber(@fa-size)) {
                    font-size: @fa-size;
                }
                & when (iscolor(@color)) {
                    color: @color;
                }
                content: "\@{fa-uid}";
            }
    }
}

// Иконки Font Awesome в навигацию
/* Главная */
.navigation-icons (home, f046);
/* Форум */
.navigation-icons (forums, f129);
.navigation-icons (newPosts, f0e6);
.navigation-icons (findThreads, f002);
.navigation-icons (yourThreads, f0e5);
.navigation-icons (unansweredThreads, f010);
.navigation-icons (contributedThreads, f00e);
.navigation-icons (watched, f06e);
.navigation-icons (watchedThreads, f097);
.navigation-icons (watchedForums, f02e);
.navigation-icons (searchForums, f00e);
.navigation-icons (markForumsRead, f046);
/* Ресурс менеджер */
.navigation-icons (xfrm, f019);
.navigation-icons (xfrmLatestReviews, f091);
.navigation-icons (xfrmYourResources, f007);
.navigation-icons (xfrmWatched, f06e);
.navigation-icons (xfrmWatchedResources, f097);
.navigation-icons (xfrmWatchedCategories, f02e);
.navigation-icons (xfrmSearchResources, f002);
/* Пользователи */
.navigation-icons (members, f0c0);
.navigation-icons (registeredMembers, f234);
.navigation-icons (currentVisitors, f0c0);
.navigation-icons (newProfilePosts, f27b);
.navigation-icons (searchProfilePosts, f00e);
/* Что нового? */
.navigation-icons (whatsNew, f1d7);
.navigation-icons (whatsNewPosts, f0f6);
.navigation-icons (xfrmNewResources, f019);
.navigation-icons (whatsNewProfilePosts, f040);
.navigation-icons (whatsNewNewsFeed, f09e);
.navigation-icons (latestActivity, f06d);
/* Галерея */
.navigation-icons (xfmg, f030);
/* Чат от Сиропу */
.navigation-icons (siropuChat, f046);
Назад
Сверху Снизу