_follow-us.scss 2.2 KB
/*
 * @description: follow-us css
 * @author: chenglong.wang@yoho.cn
 * @date: 2015/4/21
 */

.follow-us {
    margin: 30px auto 0 auto;
    //@include retina-sprite($line, comment-home);
    border: 1px solid transparent;

    > h2 {
        font-size: 1.8rem;
        margin-top: 18px;
        text-align: center;
        font-weight: bold;
    }

    > ul {
        margin: 15px 25px 0 25px;
        height: auto;
        overflow: hidden;

        li {
            float: left;
            margin-right: 32px;
            &:nth-of-type(4) {
                margin-right: 0;
            }
            @include hide-text();
            a {
                display: block;
                width: 100%;
                height: 100%;
            }
        }

        @each $follow in show, sina, facebook, instagram {
            .follow-#{$follow} {
                @include retina-sprite($icons, #{$follow});
            }
        }
    }
    > .rss {
        margin: 18px 25px 0 25px;
        height: 21px;
        border: 1px solid #000;
        position: relative;
        font-size: 1.4rem;

        .rss-btn, input[type='text'] {
            display: block;
            height: 21px;
            line-height: 21px;
            position: absolute;
            top: 0;
        }

        .rss-btn {
            background: #000;
            width: 65px;
            text-align: center;
            right: 0;
            color: #fff;
            font-weight: bold;
        }

        input[type='text'] {
            text-indent: 10px;
            display: block;
            width: 170px;
            left: 0;
            background: none;
            border: none;
            outline: none;
        }
    }
}

@each $channel, $color in (home, #000),
    (fashion, #9b90ff),
    (beauty, #ffcaca),
    (sport, #84e3ca),
    (lifestyle, #ffca72),
    (magazine, #7ecaff),
    (video, #c9caca) {

    ##{$channel} {
        .follow-us {
            @include retina-sprite($line, comment-#{$channel});

            h2 {
                color: $color;
            }

            > .rss {
                border: 1px solid $color;

                .rss-btn {
                    background: $color;
                }
            }
        }
    }
}