_index.scss 5.2 KB
/*
 * @description: index css
 * @author: chenglong.wang@yoho.cn
 * @date: 2015/4/16
 */

//banner
.banner {
    width: 100%;
    height: 220px;
    margin-bottom: 15px;
    position: relative;

    .swiper-container, .swiper-slide, img {
        width: 320px;
        height: 200px;
        display: block;
        overflow: hidden;
    }

    .swiper-slide {
        float: left;
    }

    .pagination-wrap {
        position: relative;
        margin-top: 10px;
        text-align: center;
    }

    .pagination {
        height: auto;
        overflow: hidden;
        display: inline-block;
        margin: 0 auto;
    }

    .swiper-pagination-switch {
        @include retina-sprite($icons, normal-new);
        margin-right: 5px;
        float: left;
        &:nth-last-of-type(1) {
            margin-right: 0;
        }
        &.swiper-active-switch {
            @include retina-sprite($icons, active-new);
        }
    }

    //only one
    .home-banner {
        width: 100%;
        img {
            width: 320px;
        }
    }
}

//content
.home-content {
    margin: 20px 15px 0 15px;

    @each $channel in fashion, lifestyle, video {
        .channel-#{$channel} {
            .img-link {
                position: relative;
                display: block;
                width: 290px;
                height: 185px;

                &:after {
                    content: '';
                    @include retina-sprite($icons, channel-#{$channel});
                    position: absolute;
                    right: -5px;
                    bottom: -5px;
                }

                img {
                    width: 100%;
                    height: auto;
                }
            }
        }
    }

    #pop {
        .img-link {
            width: 290px;
            height: 200px;
            background: #ffe558;
            overflow: hidden;
            padding: 30px 10px 10px 10px;
            @include box-sizing();

            &:before {
                content: '';
                @include retina-sprite($icons, pop, true, false);
                top: 4px;
            }

            &:after {
                display: none;
            }
            img {
                width: 270px;
                height: 157px;
                margin: 0 auto;
                display: block;
                overflow: hidden;
            }
        }
    }

    .content-item {
        width: 100%;
        height: auto;
        margin-bottom: 35px;
        padding-bottom: 35px;
        border-bottom: 1px solid #272727;

        > h2, > h3, > time {
            text-align: center;
            display: block;
            width: 100%;
        }

        > h2, > time {
            margin-top: 15px;
        }

        > h2, > h3 {
            line-height: 24px;
            font-size: 2rem;
            font-weight: bold;
            color: #000;
        }

        > h3 {
            margin-top: 2px;
        }

        > time {
            font-size: 1.4rem;
            font-weight: normal;
            color: #999;
            text-transform: capitalize;

            a {
                color: #999;
            }
        }
        > p {
            line-height: 23px;
            margin-top: 12px;
            text-align: center;
            display: block;
            width: 100%;
            font-size: 1.4rem;

            a {
                color: #000;
                display: block;
            }
        }
    }
}

.follow-us {
    margin: 30px auto 0 auto;
    @include retina-sprite($line, comment);
    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;
        }
    }
}