仿优设首页人气作者B2美化兼容手机端

仿优设首页人气作者B2美化兼容手机端-狗大户博客
仿优设首页人气作者B2美化兼容手机端
此内容为付费阅读,请付费后查看
星元10
立即购买
您当前未登录!建议登陆后购买,可保存购买订单
付费阅读
温馨提示:本文最后更新于2024-01-29 17:22:02,某些文章具有时效性,若有错误或已失效,请在下方留言。

功能特点

自动调用已经发布过文章的用户,按粉丝数量从多到少排序。

电脑端默认显示7位作者,手机端默认显示3位作者。

效果图

图片[1]-仿优设首页人气作者B2美化兼容手机端-狗大户博客

css代码

/*仿优设网人气排行首页开始*/
@media (max-width:768px) {
.home-authors .item, .home-authors .group-item .item-images .img-item {
    width: 100%!important;
}
  .item-author:nth-child(n+4) {
display:none;

}
 
}
.item-author .ap-item{
    margin:20px auto;
}

.home-authors .item-tobe-author .meta-avatars img {
    display: inline-block;
    width: 30px;
    height:30px;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    border-radius: 100%;
    overflow: hidden;
    margin-left: -10px;
    border-radius: 50%;
    transform: translateX(0px);
    overflow: hidden;
    border: 3px solid #fff;
}

.ap-item-meta .cat:before {
    content: '#';
    /* top: 2px; */
    line-height: 19px;
    width: 19px;
    height: 19px;
    margin-right: 5px;
    color: #fe2c55;
    text-align: center;
    float: left;
    background: rgba(254, 44, 85, 0.2);
    border-radius: 50%;
    display: block;
    /* position: absolute; */
    left: 0;
}

.item-author .author-btn .looo {
    line-height: 13px;
    font-size: 13px;
    width: 100%;
    color: #333;
    background: #f5f6f7;
}


.item-author .item-wrap:hover .item-top .author-btn,.home-authors .item-tobe-author .item-wrap:hover .item-top .author-btn {
    display: block;
}


.item-author .author-btn {
    position: absolute;
    right: 0;
    top: 90px!important;
    display: none;
    width: 100%
}


.item-author .author-btn .user-s-follow {
   padding:10px;
    text-align: center
}

.looo .msg-icon,.looo .top{
    display:none;
}
















.home-authors .part-title{
    font-size: 18px;
}
.home-authors .author-items {
    margin: 0 auto;
    display:flex;
    flex-wrap:wrap;
}
.home-authors .part-title, .part-hot-channel .part-title, .part-zt .part-title, .archive-list-see .part-title, .post-related .part-title, .hunter-recent-hot .part-title, .hunter-last-week .part-title {
    font-size: 21px;
    color: #333333;
    margin-bottom: 50px;
}
.home-authors .part-title .sub-link .icon-btn-bang, .hunter-recent-hot .part-title .sub-link .icon-btn-bang, .hunter-last-week .part-title .sub-link .icon-btn-bang {
    color: #ff6000;
}

.home-authors .item, .home-authors .group-item .item-images .img-item {
    margin-bottom: 30px;
}
.home-authors .item, .home-authors .group-item .item-images .img-item {
    padding: 0 5px;
}
.home-authors .item, .home-authors .group-item .item-images .img-item {
    width: 25%;
}
.author-name .text-ellipsis{
    max-width:80px;
}
.item-author .item-wrap, .home-authors .item-tobe-author .item-wrap {
    padding: 30px 15px 10px;
}
.item-author .item-wrap, .home-authors .item-tobe-author .item-wrap {
    background-color: #fff;
  height:390px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    -webkit-transition: all .2s;
    -o-transition: all .2s;
    transition: all .2s;
}
.item-author .item-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding-top: 100%;
    overflow: hidden;
}
.item-author .item-bg::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 54%;
    background-color: #fff;
    z-index: 1;
}
.item-author .item-bg .thumb-1 {
    background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
}

.item-author .item-bg .thumb-2 {
   background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    
}

.item-author .item-bg .thumb-3 {
    background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
}

.item-author .item-bg .thumb-4 {
 background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.item-author .item-bg .thumb-5 {
   background-image: linear-gradient(180deg, #2af598 0%, #009efd 100%);
}

.item-author .item-bg .thumb-6{
    background-image: linear-gradient(to top, #ff0844 0%, #ffb199 100%);
}

.item-author .item-bg .thumb-7 {
     background-image: linear-gradient(to top, #4481eb 0%, #04befe 100%);
}














.item-author .item-bg .thumb {
    padding-top: 100%;
    position: absolute;
    left: -50px;
    right: -50px;
    top: -50px;
    width: auto;
  
}
.thumb {
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    -webkit-background-size: cover;
    background-size: cover;
    width: 100%;
    height: 0;
}
.item-author .item-bg::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 54%;
    padding-top: 11%;
   
}
.item-author .item-top {
    padding: 15px;
}
.item-author .item-top {
    position: relative;
    -webkit-box-shadow: 0 20px 40px 0 rgba(0,0,0,0.02);
    box-shadow: 0 20px 40px 0 rgba(0,0,0,0.02);
    padding: 15px;
     background: #fff;
    -webkit-border-radius: 11px;
    -moz-border-radius: 11px;
    border-radius: 11px;
    z-index: 1;
}
 
.item-author .author-avatar {
    font-size: 50px;
    top: 15px;
}
.home-authors .item  .author-avatar .avatar, .home-authors .group-item .item-images .img-item  .author-avatar .avatar {
    border-color: #ff6000;
}
.item-author .author-avatar .avatar {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding-top: 0;
    height: 50px;
    border: 2px solid #ffbc00;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    border-radius: 100%;
    overflow: hidden;
}
.home-authors .item:nth-child(1) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(1) .author-avatar:after {
    content: '01';
     
}
.home-authors .item:nth-child(2) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(2) .author-avatar:after {
    content: '02';
   
}
.home-authors .item:nth-child(3) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(3) .author-avatar:after {
    content: '03';
     
}
.home-authors .item:nth-child(4) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(4) .author-avatar:after {
    content: '04';
   
}
.home-authors .item:nth-child(5) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(5) .author-avatar:after {
    content: '05';
     
}
.home-authors .item:nth-child(6) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(6) .author-avatar:after {
    content: '06';
   
}
.home-authors .item:nth-child(7) .author-avatar:after, .home-authors .group-item .item-images .img-item:nth-child(7) .author-avatar:after {
    content: '07';
   
}
.item-author .author-avatar {
    position: absolute;
    
    width: 50px;
}
.author-main {
    padding-left: 58px;
}
.item-author .author-avatar img {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding-top: 0;
    height: 50px;
    border: 2px solid #ff6000;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    border-radius: 100%;
    overflow: hidden;
}
.item-author .author-name {
    font-size: 20px;
    color:#333;
    margin-bottom: 10px;
    white-space: nowrap;
}
.item-author .author-info {
    font-size: 13px;
    margin-top: 25px;
    margin-right: -16px;
    margin-left: -16px;
    padding: 0px 16px;
    color: #777;
    text-align: center;
    line-height: 30px;
    background: #f5f6f7;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
}
.item-author .author-avatar:after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: 90%;
    margin-left: -25%;
    width: 50%;
    height: 33.3333%;
     background-image: url(/pic/uisdc_n2.png);
    background-position: center;
    background-repeat: no-repeat;
    -webkit-background-size: contain;
    background-size: contain;
    color: #ffffff;
    font-size: 12px;
    line-height: 32px;
    text-align: center;
    -webkit-transform: scale(.8);
    -ms-transform: scale(.8);
    transform: scale(.8);
    -webkit-transform-origin: center bottom;
    -ms-transform-origin: center bottom;
    transform-origin: center bottom;
}
.item-author .author-name .lv-icon{
    margin-top: 2px;
    margin-left: 10px;
}
.item-author .author-name {
          font-size: 15px;
    
    display: flex;
    white-space: nowrap;
    margin-bottom: 10px;
    
}
.item-author .author-name .uname {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    overflow: hidden;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-author .author-meta {
    font-size: 13px;
}
.item-author .author-meta {
    font-size: 12px;
    line-height: 1.5;
    height: 20px;
    overflow: hidden;
    font-weight: normal;
    color: #777;
}
.item-author .author-meta span:first-child {
    position: relative;
    margin-right: 5px;
}
.item-author .author-meta {
    font-size: 13px;
}

.btn-orange, .widget-talk .talk-item .talk-wrap:hover .btn, .list-item-home-news .widget-btns .btn:hover, .listitem-widget-job .widget-btns .btn:hover, .list-item-home-job .widget-btns .btn:hover, .search-widget-hotsearch .widget-btns .btn:hover, .group-sidebar .widget-talk .widget-btns .btn {
    background: #ff6000;
    color: #fff;
}
.author-name count{
    display:none;
}
 
.item-author .item-bottom-title {
    font-size: 14px;
    color: #b5b5b5;
    font-weight: normal;
    
}


.item-author .item-bottom {
    font-size: 14px;
    position: relative;
    z-index: 1;
   margin-top:10px;
    height: auto;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.item-author .ap-item {
    font-size: 14px;
}

.home-authors .item-tobe-author .item-btns a:first-child {
    color: #fff!important;
}
.home-authors .item-tobe-author .item-btns a:last-child {
    color: #ff6000!important;
}

.home-authors .item-tobe-author .item-btns a:visited {
    color: inherit;
}
.item-author .ap-item {
    font-size: 12px;
    
}
 
.item-author .ap-item-wrap.has-thumb {
    padding-left: 42%;
     
}
.item-author .ap-item-wrap {
    display: block;
    position: relative;
}
 .item-author .ap-item-wrap .ap-item-meta a:before{
         content: '#';
    /* top: 2px; */
    line-height: 15px;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    margin-right: 5px;
    color: var(--b2color);
    text-align: center;
    float: left;
    background: var(--b2lightcolor);
    border-radius: 50%;
    display: block;
     
     
 }
.item-author .ap-item-wrap .ap-item-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 40%;
    overflow: hidden;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    height:70px;
}
.item-author .ap-item-wrap .ap-item-thumb .thumb {
    -webkit-transition: all .2s;
    -o-transition: all .2s;
    transition: all .2s;
    padding-top: 70%;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}
.item-author .ap-item-wrap.has-thumb .ap-item-title {
   height: 40px;
    overflow: hidden;
    font-weight: normal;
    line-height: 20px;
}
 
.item-author .ap-item-wrap .ap-item-title {
    font-size: 14px;
}

.item-author .ap-item-wrap .ap-item-meta {
    font-size: 11px;

    margin-top:10px;
}
.home-authors .item-tobe-author .item-wrap {
    background-image: url(/pic/uisdc-rank-bg.jpg);
    -webkit-background-size: cover;
    background-size: cover;
    -webkit-background-origin: top center;
    background-origin: top center;
    background-repeat: no-repeat;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
}
.home-authors .item-tobe-author .tobe-author-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 30px 20px 20px;
}
.home-authors .item-tobe-author .tobe-author {
    background-color: #fff ;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;
}
.home-authors .item-tobe-author .item-title,.home-authors .item-tobe-author .item-title .b2font {
      color: #ff6000;
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}
.home-authors .item-tobe-author .item-title a {
    display: block;
    color: #777;
}
.home-authors .item-tobe-author .item-cont p{ 
    
 margin:20px auto;   
}
.home-authors .item-tobe-author .item-cont {
    font-size: 16px;
    line-height: 28px;
}
.home-authors .item-tobe-author .item-cont .meta-views{
    font-size:14px;
    
    vertical-align:bottom
}
.home-authors .item-tobe-author .item-cont {
    font-size: 16px;
    color: #777;
    line-height: 24px;
}
 
.home-authors .item-tobe-author .item-cont .count {
    margin-bottom: 10px;
}
.home-authors .item-tobe-author .item-cont .count strong {
    font-size: 40px;
    color: #ff6000;
}
.home-authors .item-tobe-author .item-cont .count span {
    font-size: 16px;
}
.home-authors .item-tobe-author .item-btns {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    text-align: center;
}
.home-authors .item-tobe-author .item-btns .btn:first-child {
    padding:10px;
     
}
.home-authors .item-tobe-author .item-btns .btn:last-child {
       width: 46%;
    display: inline-block;
    line-height: 20px;
    border: 1px #ff6000 solid;
    padding: 10px;
    
    
}
.btn-orange, .widget-talk .talk-item .talk-wrap:hover .btn, .list-item-home-news .widget-btns .btn:hover, .listitem-widget-job .widget-btns .btn:hover, .list-item-home-job .widget-btns .btn:hover, .search-widget-hotsearch .widget-btns .btn:hover, .group-sidebar .widget-talk .widget-btns .btn {
    background: #ff6000;
    color: #fff;
}
.home-authors .item-tobe-author .item-btns .btn {
    width: 46%;
    display: inline-block;
    line-height: 20px;
}
.btn-orange-border, .talk-singular-prev-next .item-backhome .item-content .btn {
    background-color: transparent;
    color: #ff6000;
    border: 1px solid #ff6000;
}
/*仿优设网人气排行首页结束*/

child.js内容

new Vue({
    el:'#Onecad-tuijian',
    data:{
        
       ids:[]
    },
    mounted(){
        if(this.$refs.searchUseer){
            this.ids = b2_search_data.users
            this.checkFollowByids()
        }
        
    },

    methods:{
       
        dmsg(id){
            if(!b2token){
                login.show = true
            }else{
                b2Dmsg.userid = id
                b2Dmsg.show = true
            }
        }
    }
});

b2/index.php合适位置插入内容

© 版权声明
THE END
喜欢就支持一下吧
点赞0投币 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容