Authored by 王水玲

新潮教室

Showing 34 changed files with 1392 additions and 1 deletions
  1 +/**
  2 + * 星潮教室 亲密度·日期
  3 + * @author: wsl<shuiling.wang@yoho.cn>
  4 + * @date: 2016/4/11
  5 + */
  6 +
  7 +var $ = require('jquery');
  8 +
  9 +var CalendarHandler = {
  10 + currentYear: 0,
  11 + currentMonth: 0,
  12 + initialize: function() {
  13 + var $calendarItem;
  14 +
  15 + $calendarItem = this.createCalendar(0, 0);
  16 + $('#Container').append($calendarItem);
  17 + },
  18 + isRuiYear: function(aDate) {
  19 + return 0 === aDate % 4 && (aDate % 100 !== 0 || aDate % 400 === 0);
  20 + },
  21 + calculateWeek: function(y, m, d) {
  22 + var arr, vDay, week;
  23 +
  24 + arr = '7123456'.split('');
  25 + vDay = parseInt(d, 10);
  26 + week = arr[new Date(y, m - 1, vDay).getDay()];
  27 + return week;
  28 + },
  29 + calculateMonthDays: function(m, y) {
  30 + var mDay = 0;
  31 + var isRn;
  32 +
  33 + if (m === 0 || m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) {
  34 + mDay = 31;
  35 + } else {
  36 + if (m === 2) {
  37 +
  38 + // 判断是否为芮年
  39 + isRn = this.isRuiYear(y);
  40 + if (isRn === true) {
  41 + mDay = 29;
  42 + } else {
  43 + mDay = 28;
  44 + }
  45 + } else {
  46 + mDay = 30;
  47 + }
  48 + }
  49 + return mDay;
  50 + },
  51 + createCalendar: function(y, m) {
  52 + var $dayItem, nowDate, nowYear, nowMonth, nowDaysNub, nowWeek, lastMonthDaysNub, i, hasCreateDaysNub;
  53 +
  54 + var months = ['January', 'February', 'March', 'April', 'May',
  55 + 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  56 +
  57 + var signDay = $('.sign-day').val();
  58 +
  59 + $dayItem = $('<div class="dayItem"></div>');
  60 +
  61 + // 获取当前月份的天数
  62 + nowDate = new Date();
  63 +
  64 + nowYear = y === 0 ? nowDate.getFullYear() : y;
  65 + this.currentYear = nowYear;
  66 + nowMonth = m === 0 ? nowDate.getMonth() + 1 : m;
  67 + this.currentMonth = nowMonth;
  68 + nowDaysNub = this.calculateMonthDays(nowMonth, nowYear);
  69 +
  70 + $('.cur-year').html(nowYear);
  71 + $('.cur-month').html(months[nowMonth - 1]);
  72 +
  73 + // 获取当月第一天是星期几
  74 + nowWeek = parseInt(this.calculateWeek(nowYear, nowMonth, 1));
  75 +
  76 + // 获取上个月的天数
  77 + lastMonthDaysNub = this.calculateMonthDays((nowMonth - 1), nowYear);
  78 +
  79 + if (nowWeek !== 0) {
  80 +
  81 + // 生成上月剩下的日期
  82 + for (i = (lastMonthDaysNub - nowWeek); i < lastMonthDaysNub; i++) {
  83 + $dayItem.append('<div class="item lastItem">' + (i + 1) + '</div>');
  84 + }
  85 + }
  86 +
  87 + // 生成当月的日期
  88 + for (i = 1; i <= nowDaysNub; i++) {
  89 + if (signDay.indexOf(i) > -1) {
  90 + $dayItem.append('<div class="item signItem">' + i + '</div>');
  91 + } else {
  92 + $dayItem.append('<div class="item">' + i + '</div>');
  93 + }
  94 + }
  95 +
  96 + // 获取总共已经生成的天数
  97 + hasCreateDaysNub = nowWeek + nowDaysNub;
  98 +
  99 + // 如果小于42,往下个月推算
  100 + if (hasCreateDaysNub < 41) {
  101 + for (i = 0; i <= (41 - hasCreateDaysNub); i++) {
  102 + $dayItem.append('<div class="item lastItem">' + (i + 1) + '</div>');
  103 + }
  104 + }
  105 +
  106 + return $dayItem;
  107 + }
  108 +};
  109 +
  110 +$(document).ready(function() {
  111 + CalendarHandler.initialize();
  112 +});
@@ -10,3 +10,5 @@ require('./plus-star/detail'); @@ -10,3 +10,5 @@ require('./plus-star/detail');
10 require('./home'); 10 require('./home');
11 require('./list'); 11 require('./list');
12 require('./detail'); 12 require('./detail');
  13 +require('./star-classroom');
  14 +require('./calendar');
  1 +/**
  2 + * 星潮教室
  3 + * @author: wsl<shuiling.wang@yoho.cn>
  4 + * @date: 2016/4/11
  5 + */
  6 +
  7 +var $ = require('jquery'),
  8 + Swiper = require('yoho.iswiper');
  9 +
  10 +var bannerSwiper, collocationSwiper;
  11 +
  12 +if ($('.banner-swiper').find('li').length > 1) {
  13 + bannerSwiper = new Swiper('.banner-swiper', {
  14 + lazyLoading: true,
  15 + lazyLoadingInPrevNext: true,
  16 + loop: true,
  17 + autoplay: 3000,
  18 + autoplayDisableOnInteraction: false,
  19 + paginationClickable: true,
  20 + slideElement: 'li',
  21 + pagination: '.banner-top .pagination-inner'
  22 + });
  23 +}
  24 +
  25 +if ($('.collocation-swiper').find('li').length > 1) {
  26 + collocationSwiper = new Swiper('.collocation-swiper', {
  27 + lazyLoading: true,
  28 + lazyLoadingInPrevNext: true,
  29 + lazyLoadingOnTransitionStart: true,
  30 + grabCursor: true,
  31 + slidesPerView: 'auto',
  32 + slideElement: 'li',
  33 + watchSlidesVisibility: true
  34 + });
  35 +}
  36 +
  37 +if ($('.artice-zan').find('li').length > 0) {
  38 + $('.zan-more').show();
  39 +}
  40 +
  41 +$('.add-intimacy').on('click', function() {
  42 + $('.pop-intimacy').show();
  43 + $('.mask').show();
  44 +
  45 + $('body').css({
  46 + overflow: 'hidden'
  47 + });
  48 +});
  49 +
  50 +$('.pop-intimacy .pop-close, .mask').on('click', function() {
  51 + $('.pop-intimacy').hide();
  52 + $('.mask').hide();
  53 +
  54 + $('body').css({
  55 + overflow: 'visible'
  56 + });
  57 +});
1 -@import "tvls", "info", "plus-star", "info-list", "detail";  
  1 +@import "tvls", "info", "plus-star", "info-list", "detail", "star-classroom";
  1 +body {
  2 + width: 100%;
  3 + background: #333;
  4 + font: 12px/1.5 Arial,'黑体';
  5 +}
  6 +
  7 +.star-classroom {
  8 + img {
  9 + max-width: 100%;
  10 + display: block;
  11 + border: 0;
  12 + margin: 0 auto;
  13 + }
  14 +
  15 + a {
  16 + text-decoration: none;
  17 + outline: none;
  18 + color: #000;
  19 +
  20 + &:link,
  21 + &:visited,
  22 + &:hover,
  23 + &:actived {
  24 + color: #000;
  25 + }
  26 + }
  27 +
  28 + *:focus {
  29 + outline: none;
  30 + }
  31 +
  32 + .font-bold {
  33 + font-weight: bold;
  34 + }
  35 +
  36 + .classroom-mask {
  37 + background-color: rgba(0,0,0,.5);
  38 + position: fixed;
  39 + left: 0;
  40 + right: 0;
  41 + top: 0;
  42 + bottom: 0;
  43 + z-index: 9;
  44 + display: none;
  45 + }
  46 +
  47 + .head-tab {
  48 + width: 100%;
  49 + height: 88rem / $pxConvertRem;
  50 + background: #000;
  51 +
  52 + li {
  53 + width: 25%;
  54 + text-align: center;
  55 + float: left;
  56 + line-height: 88rem / $pxConvertRem;
  57 + font-size: 30rem / $pxConvertRem;
  58 +
  59 + a {
  60 + color: #b0b0b0;
  61 + display: inline-block;
  62 + }
  63 +
  64 + &.cur a{
  65 + color: #fff;
  66 + }
  67 + }
  68 + }
  69 +
  70 + .banner-top {
  71 + width: 100%;
  72 + height: 310rem / $pxConvertRem;
  73 + margin-top: 30rem / $pxConvertRem;
  74 + position: relative;
  75 +
  76 + .banner-swiper {
  77 + width: 100%;
  78 + height: 310rem / $pxConvertRem;
  79 + overflow: hidden;
  80 + position: relative;
  81 +
  82 + ul {
  83 + position: relative;
  84 + height: 310rem / $pxConvertRem;
  85 +
  86 + li {
  87 + float: left;
  88 + width: 100%;
  89 + height: 310rem / $pxConvertRem;
  90 +
  91 + img {
  92 + width: 100%;
  93 + height: 100%;
  94 + }
  95 + }
  96 + }
  97 + }
  98 +
  99 + .swiper-pagination {
  100 + position: absolute;
  101 + left: 0;
  102 + right: 0;
  103 + bottom: 20rem / $pxConvertRem;
  104 + text-align: center;
  105 + z-index: 1;
  106 +
  107 + .pagination-inner {
  108 + display: inline-block;
  109 +
  110 + span {
  111 + display: inline-block;
  112 + width: 14rem / $pxConvertRem;
  113 + height: 14rem / $pxConvertRem;
  114 + background: #fff;
  115 + opacity: 0.5;
  116 + margin: 0 10rem / $pxConvertRem;
  117 + border-radius: 50%;
  118 +
  119 + &.swiper-pagination-bullet-active {
  120 + background: #fff;
  121 + opacity: 1;
  122 + }
  123 + }
  124 + }
  125 + }
  126 + }
  127 +
  128 + .home-floor-sign {
  129 + width: 100%;
  130 + height: 220rem / $pxConvertRem;
  131 + margin-top: 30rem / $pxConvertRem;
  132 + background: #000;
  133 +
  134 + .nav-left {
  135 + width: 102rem / $pxConvertRem;
  136 + margin: 30rem / $pxConvertRem 0 0 30rem / $pxConvertRem;
  137 + text-align: center;
  138 + float: left;
  139 +
  140 + .user-name {
  141 + font-size: 24rem / $pxConvertRem;
  142 + color: #fff;
  143 + margin-top: 30rem / $pxConvertRem;
  144 + white-space: nowrap;
  145 + }
  146 + }
  147 +
  148 + .nav-main {
  149 + width: 252rem / $pxConvertRem;
  150 + height: 90rem / $pxConvertRem;
  151 + float: left;
  152 + background-image: image-url("guang/star-classroom/user_info_bg.png");
  153 + background-repeat: no-repeat;
  154 + background-size: contain;
  155 + margin:36rem / $pxConvertRem 0 0 10rem / $pxConvertRem;
  156 +
  157 + p {
  158 + color: #fff;
  159 + line-height: 44rem / $pxConvertRem;
  160 + font-size: 24rem / $pxConvertRem;
  161 + margin-left: 30rem / $pxConvertRem;
  162 + white-space: nowrap;
  163 + }
  164 + }
  165 +
  166 + .nav-right {
  167 + width: 195rem / $pxConvertRem;
  168 + text-align: center;
  169 + float: right;
  170 +
  171 + .wyf-img {
  172 + width: 119rem / $pxConvertRem;
  173 + height: 108rem / $pxConvertRem;
  174 + margin-top: 30rem / $pxConvertRem;
  175 + background-image: image-url("guang/star-classroom/home-wyf.png");
  176 + background-repeat: no-repeat;
  177 + background-size: contain;
  178 + display: inline-block;
  179 + }
  180 +
  181 + .add-intimacy {
  182 + width: 131rem / $pxConvertRem;
  183 + height: 52rem / $pxConvertRem;
  184 + background-image: image-url("guang/star-classroom/add_intimacy_bg.png");
  185 + background-repeat: no-repeat;
  186 + background-size: contain;
  187 + color: #fff;
  188 + font-size: 22rem / $pxConvertRem;
  189 + display: inline-block;
  190 + white-space: nowrap;
  191 + line-height: 66rem / $pxConvertRem;
  192 + margin-left: 12rem / $pxConvertRem;
  193 + }
  194 + }
  195 +
  196 + img {
  197 + width: 100rem / $pxConvertRem;
  198 + height: 100rem / $pxConvertRem;
  199 + border-radius: 50%;
  200 + border: 2rem / $pxConvertRem solid #e0e0e0;
  201 + }
  202 + }
  203 +
  204 + .floor-more {
  205 + width: 100%;
  206 + height: 88rem / $pxConvertRem;
  207 + background: #000;
  208 + position: relative;
  209 + margin-top: 30rem / $pxConvertRem;
  210 +
  211 + h2 {
  212 + color: #fff;
  213 + font-size: 34rem / $pxConvertRem;
  214 + line-height: 88rem / $pxConvertRem;
  215 + text-align: center;
  216 + }
  217 +
  218 + .more-btn {
  219 + width: 64rem / $pxConvertRem;
  220 + height: 96rem / $pxConvertRem;
  221 + background-image: image-url("guang/star-classroom/more.png");
  222 + background-repeat: no-repeat;
  223 + background-size: contain;
  224 + position: absolute;
  225 + right: 26rem / $pxConvertRem;
  226 + top: 0;
  227 + }
  228 + }
  229 +
  230 + .home-floor-subject {
  231 + .subject-banner,
  232 + .subject-video-area {
  233 + width: 100%;
  234 + height: 310rem / $pxConvertRem;
  235 + }
  236 +
  237 + .subject-video-area {
  238 + margin-top: 30rem / $pxConvertRem;
  239 + background: #000;
  240 +
  241 + #subject-video {
  242 + width: 100%;
  243 + height: 310rem / $pxConvertRem;
  244 + }
  245 + }
  246 + }
  247 +
  248 + .home-floor-collocation {
  249 + background: #000;
  250 + padding-bottom: 60rem / $pxConvertRem;
  251 +
  252 + .collocation-big-img {
  253 + width: 100%;
  254 + height: 277rem / $pxConvertRem;
  255 + padding: 0 14rem / $pxConvertRem;
  256 + box-sizing: border-box;
  257 +
  258 + li {
  259 + width: 276rem / $pxConvertRem;
  260 + height: 277rem / $pxConvertRem;
  261 + margin: 0 15rem / $pxConvertRem;
  262 + float: left;
  263 +
  264 + img {
  265 + height: 100%;
  266 + }
  267 + }
  268 + }
  269 +
  270 + .collocation-img {
  271 + width: 100%;
  272 + height: 139rem / $pxConvertRem;
  273 + margin-top: 30rem / $pxConvertRem;
  274 + position: relative;
  275 +
  276 + .collocation-swiper {
  277 + width: 100%;
  278 + height: 139rem / $pxConvertRem;
  279 + overflow: hidden;
  280 + position: relative;
  281 +
  282 + ul {
  283 + position: relative;
  284 + height: 139rem / $pxConvertRem;
  285 +
  286 + li {
  287 + float: left;
  288 + width: 229rem / $pxConvertRem;
  289 + height: 139rem / $pxConvertRem;
  290 + margin-left: 30rem / $pxConvertRem;
  291 +
  292 + img {
  293 + width: 100%;
  294 + height: 100%;
  295 + }
  296 + }
  297 + }
  298 + }
  299 + }
  300 + }
  301 +
  302 + .pop-intimacy {
  303 + width: 580rem / $pxConvertRem;
  304 + height: 910rem / $pxConvertRem;
  305 + background: #fff;
  306 + border-radius: 10rem / $pxConvertRem;
  307 + position: fixed;
  308 + top:20rem / $pxConvertRem;
  309 + left: 30rem / $pxConvertRem;
  310 + z-index: 10;
  311 + display: none;
  312 +
  313 + .intimacy-head {
  314 + text-align: center;
  315 + color: #444;
  316 + height: 140rem / $pxConvertRem;
  317 + padding-top: 20rem / $pxConvertRem;
  318 + box-sizing: border-box;
  319 + position: relative;
  320 +
  321 + .pop-close {
  322 + width: 25rem / $pxConvertRem;
  323 + height: 25rem / $pxConvertRem;
  324 + background-image: image-url("guang/star-classroom/pop-close.png");
  325 + background-repeat: no-repeat;
  326 + background-size: contain;
  327 + position: absolute;
  328 + right: 20rem / $pxConvertRem;
  329 + top: 24rem / $pxConvertRem;
  330 + }
  331 +
  332 + h1 {
  333 + font-size: 56rem / $pxConvertRem;
  334 + font-weight: bold;
  335 + line-height: 40rem / $pxConvertRem;
  336 + }
  337 +
  338 + h4 {
  339 + font-size: 24rem / $pxConvertRem;
  340 + }
  341 +
  342 + .my-intimacy {
  343 + font-size: 24rem / $pxConvertRem;
  344 +
  345 + span {
  346 + min-width: 10rem / $pxConvertRem;
  347 + height: 30rem / $pxConvertRem;
  348 + line-height: 30rem / $pxConvertRem;
  349 + border-radius: 30rem / $pxConvertRem;
  350 + font-size: 20rem / $pxConvertRem;
  351 + color: #fff;
  352 + padding: 0 10rem / $pxConvertRem;
  353 + margin-left: 14rem / $pxConvertRem;
  354 + background-color: #444;
  355 + }
  356 + }
  357 +
  358 + .increased {
  359 + font-size: 24rem / $pxConvertRem;
  360 + display: none;
  361 +
  362 + span {
  363 + color: red;
  364 + }
  365 + }
  366 + }
  367 +
  368 + .calendar {
  369 + width: 100%;
  370 + float: left;
  371 +
  372 + .week {
  373 + width: 100%;
  374 + height: 38rem / $pxConvertRem;
  375 + background: #aeaeae;
  376 + padding: 0 23rem / $pxConvertRem;
  377 + box-sizing: border-box;
  378 +
  379 + h3 {
  380 + width: 76rem / $pxConvertRem;
  381 + text-align: center;
  382 + font-size: 24rem / $pxConvertRem;
  383 + color: #fff;
  384 + float: left;
  385 + line-height: 38rem / $pxConvertRem;
  386 + }
  387 + }
  388 +
  389 + .dayItem {
  390 + float: left;
  391 + width: 100%;
  392 + padding: 10px 23rem / $pxConvertRem;
  393 + box-sizing: border-box;
  394 +
  395 + .item {
  396 + width: 76rem / $pxConvertRem;
  397 + color: #444;
  398 + float: left;
  399 + text-align: center;
  400 + cursor: pointer;
  401 + margin: 0;
  402 + height: 56rem / $pxConvertRem;
  403 + line-height: 56rem / $pxConvertRem;
  404 + font-size: 28rem / $pxConvertRem;
  405 +
  406 + &.lastItem {
  407 + color: #D2D2D2;
  408 + }
  409 +
  410 + &.signItem {
  411 + background-image: image-url("guang/star-classroom/sign-circle.png");
  412 + background-position: center;
  413 + background-repeat: no-repeat;
  414 + background-size: contain;
  415 + }
  416 + }
  417 + }
  418 + }
  419 +
  420 + .fan-charts {
  421 + width: 100%;
  422 + height: 88rem / $pxConvertRem;
  423 + border-top: 1px solid #d5d5d5;
  424 + text-align: center;
  425 + position: relative;
  426 + float: left;
  427 +
  428 + h2 {
  429 + font-size: 28rem / $pxConvertRem;
  430 + color: #444;
  431 + line-height: 88rem / $pxConvertRem;
  432 + }
  433 +
  434 + .arrow {
  435 + width: 88rem / $pxConvertRem;
  436 + height: 88rem / $pxConvertRem;
  437 + background-image: image-url("guang/star-classroom/arrow.png");
  438 + background-repeat: no-repeat;
  439 + background-size: contain;
  440 + position: absolute;
  441 + top: 0;
  442 + right: 0;
  443 + }
  444 + }
  445 +
  446 + .fan-charts-cont {
  447 + width: 100%;
  448 + line-height: 88rem / $pxConvertRem;
  449 + float: left;
  450 +
  451 + li {
  452 + width: 100%;
  453 + height: 88rem / $pxConvertRem;
  454 + border-top: 1px solid #d5d5d5;
  455 + position: relative;
  456 + padding: 0 25rem / $pxConvertRem;
  457 + box-sizing: border-box;
  458 +
  459 + .rank-ico {
  460 + width: 52rem / $pxConvertRem;
  461 + height: 39rem / $pxConvertRem;
  462 + border-radius: 0;
  463 + background-image: image-url("guang/star-classroom/king-ico.png");
  464 + background-color: #fff;
  465 + background-repeat: no-repeat;
  466 + background-size: contain;
  467 + color: #fff;
  468 + font-size: 24rem / $pxConvertRem;
  469 + text-align: center;
  470 + line-height: 50rem / $pxConvertRem;
  471 + font-weight: bold;
  472 + position: relative;
  473 + top: 25rem / $pxConvertRem;
  474 + }
  475 +
  476 + img {
  477 + width: 60rem / $pxConvertRem;
  478 + height: 60rem / $pxConvertRem;
  479 + border-radius: 50%;
  480 + position: relative;
  481 + top: 15rem / $pxConvertRem;
  482 + margin-left: 20rem / $pxConvertRem;
  483 + }
  484 +
  485 + .fans-name {
  486 + margin-left: 24rem / $pxConvertRem;
  487 + font-size: 24rem / $pxConvertRem;
  488 + color: #444;
  489 + }
  490 +
  491 + .fans-intimacy {
  492 + float: right;
  493 + font-size: 20rem / $pxConvertRem;
  494 + color: #444;
  495 +
  496 + span {
  497 + font-size: 24rem / $pxConvertRem;
  498 + color: #d0021b;
  499 + margin-left: 5rem / $pxConvertRem;
  500 + }
  501 + }
  502 + }
  503 +
  504 + li > * {
  505 + float: left;
  506 + }
  507 + }
  508 + }
  509 +
  510 + .things-article {
  511 + width: 100%;
  512 + float: left;
  513 + }
  514 +
  515 + .things-article > li {
  516 + width: 100%;
  517 + float: left;
  518 + padding: 0 0 30rem / $pxConvertRem 30rem / $pxConvertRem;
  519 + box-sizing: border-box;
  520 + background: #000;
  521 +
  522 + .author-info {
  523 + width: 100%;
  524 + padding-top: 30rem / $pxConvertRem;
  525 + float: left;
  526 + border-top:1px solid #b0b0b0;
  527 +
  528 + img {
  529 + width: 70rem / $pxConvertRem;
  530 + height: 70rem / $pxConvertRem;
  531 + border-radius: 50%;
  532 + float: left;
  533 + }
  534 +
  535 + .author-nav {
  536 + float: left;
  537 + margin-left: 20rem / $pxConvertRem;
  538 + overflow: hidden;
  539 +
  540 + h2 {
  541 + font-size: 28rem / $pxConvertRem;
  542 + color: #fff;
  543 + }
  544 +
  545 + .article-count {
  546 + font-size: 24rem / $pxConvertRem;
  547 + color: #b0b0b0;
  548 +
  549 + span {
  550 + margin-right:22rem / $pxConvertRem;
  551 +
  552 + &.see-ico {
  553 + width: 31rem / $pxConvertRem;
  554 + height: 24rem / $pxConvertRem;
  555 + background-image: image-url("guang/star-classroom/see.png");
  556 + background-repeat: no-repeat;
  557 + background-size: contain;
  558 + padding-left: 40rem / $pxConvertRem;
  559 + }
  560 + }
  561 + }
  562 + }
  563 + }
  564 +
  565 + .artice-cont {
  566 + width: 100%;
  567 + margin-top: 30rem / $pxConvertRem;
  568 + float: left;
  569 +
  570 + p {
  571 + width: 100%;
  572 + height: 180rem / $pxConvertRem;
  573 + font-size: 28rem / $pxConvertRem;
  574 + line-height: 46rem / $pxConvertRem;
  575 + padding-right: 30rem / $pxConvertRem;
  576 + color: #fff;
  577 + box-sizing: border-box;
  578 + overflow: hidden;
  579 + text-overflow: ellipsis;
  580 + display: -webkit-box;
  581 + -webkit-line-clamp: 4;
  582 + -webkit-box-orient: vertical;
  583 + }
  584 +
  585 + .artice-imgs {
  586 + width: 100%;
  587 + margin-top: 30rem / $pxConvertRem;
  588 + float: left;
  589 + }
  590 +
  591 + .artice-imgs > li {
  592 + float: left;
  593 + width: 190rem / $pxConvertRem;
  594 + height: 190rem / $pxConvertRem;
  595 + margin-right: 5rem / $pxConvertRem;
  596 +
  597 + img {
  598 + width: 100%;
  599 + height: 100%;
  600 + border-radius: 4rem / $pxConvertRem;
  601 + }
  602 + }
  603 + }
  604 +
  605 + .artice-zan {
  606 + width: 100%;
  607 + border-top: 1px solid #b0b0b0;
  608 + margin-top: 27rem / $pxConvertRem;
  609 + float: left;
  610 + padding-top: 20rem / $pxConvertRem;
  611 +
  612 + .zan-ico {
  613 + width: 34rem / $pxConvertRem;
  614 + height: 34rem / $pxConvertRem;
  615 + background-image: image-url("guang/star-classroom/zan.png");
  616 + background-repeat: no-repeat;
  617 + background-size: contain;
  618 + float: left;
  619 + margin: 9rem / $pxConvertRem 53rem / $pxConvertRem 0 14rem / $pxConvertRem;
  620 + }
  621 +
  622 + ul {
  623 + float: left;
  624 + width: 420rem / $pxConvertRem;
  625 + height: 50rem / $pxConvertRem;
  626 + overflow: hidden;
  627 +
  628 + li {
  629 + float: left;
  630 + margin: 0 10rem / $pxConvertRem;
  631 + width: 50rem / $pxConvertRem;
  632 + height: 50rem / $pxConvertRem;
  633 +
  634 + img {
  635 + width: 100%;
  636 + height: 100%;
  637 + border-radius: 50%;
  638 + }
  639 + }
  640 + }
  641 +
  642 + .zan-more {
  643 + float: left;
  644 + width: 50rem / $pxConvertRem;
  645 + height: 50rem / $pxConvertRem;
  646 + border-radius: 50%;
  647 + margin: 0 10rem / $pxConvertRem;
  648 + background: #f0f0f0;
  649 + color: #acb1b7;
  650 + font-size: 24rem / $pxConvertRem;
  651 + text-align: center;
  652 + line-height: 50rem / $pxConvertRem;
  653 + /*display: none;*/
  654 + }
  655 + }
  656 + }
  657 +
  658 + .subject-list {
  659 + width: 100%;
  660 + height: auto;
  661 + overflow: hidden;
  662 +
  663 + li {
  664 + width: 100%;
  665 + float: left;
  666 + background: #000;
  667 + margin-top: 30rem / $pxConvertRem;
  668 +
  669 + img {
  670 + width: 100%;
  671 + }
  672 +
  673 + p {
  674 + width: 100%;
  675 + height: 88rem / $pxConvertRem;
  676 + box-sizing: border-box;
  677 + overflow: hidden;
  678 + white-space: nowrap;
  679 + text-overflow: ellipsis;
  680 + padding: 0 34rem / $pxConvertRem;
  681 + font-size: 34rem / $pxConvertRem;
  682 + line-height: 88rem / $pxConvertRem;
  683 + }
  684 +
  685 + a {
  686 + color: #fff;
  687 + }
  688 + }
  689 + }
  690 +
  691 + .collocation-list {
  692 + width: 100%;
  693 +
  694 + li {
  695 + float: left;
  696 + width: 100%;
  697 + margin-top: 30rem / $pxConvertRem;
  698 + background: #000;
  699 +
  700 + .cont-area {
  701 + width: 100%;
  702 + box-sizing: border-box;
  703 + padding: 30rem / $pxConvertRem;
  704 + }
  705 +
  706 + .cont-txt {
  707 + font-size: 30rem / $pxConvertRem;
  708 + line-height: 46rem / $pxConvertRem;
  709 + color: #b0b0b0;
  710 + margin-top: 10rem / $pxConvertRem;
  711 + }
  712 +
  713 + img {
  714 + width: 100%;
  715 + }
  716 +
  717 + .title {
  718 + font-size: 42rem / $pxConvertRem;
  719 + line-height: 48rem / $pxConvertRem;
  720 +
  721 + a {
  722 + color: #fff;
  723 + }
  724 + }
  725 +
  726 + .count-area {
  727 + position: relative;
  728 + width: 100%;
  729 + height: 32rem / $pxConvertRem;
  730 + margin-top: 15rem / $pxConvertRem;
  731 +
  732 + span {
  733 + font-size: 24rem / $pxConvertRem;
  734 + color: #b0b0b0;
  735 + height: 32rem / $pxConvertRem;
  736 + line-height: 32rem / $pxConvertRem;
  737 +
  738 + i {
  739 + background-repeat: no-repeat;
  740 + background-size: contain;
  741 + display: inline-block;
  742 + margin-right: 5rem / $pxConvertRem;
  743 + }
  744 +
  745 + &.time {
  746 + float: left;
  747 + }
  748 +
  749 + &.see {
  750 + float: left;
  751 + margin-left: 20rem / $pxConvertRem;
  752 + }
  753 +
  754 + .time-ico {
  755 + width: 24rem / $pxConvertRem;
  756 + height: 24rem / $pxConvertRem;
  757 + background-image: image-url("guang/star-classroom/time.png");
  758 + }
  759 +
  760 + .see-ico {
  761 + width: 31rem / $pxConvertRem;
  762 + height: 24rem / $pxConvertRem;
  763 + background-image: image-url("guang/star-classroom/see.png");
  764 + }
  765 +
  766 + &.zan {
  767 + position: absolute;
  768 + right: 122rem / $pxConvertRem;
  769 +
  770 + .zan-ico {
  771 + width: 34rem / $pxConvertRem;
  772 + height: 32rem / $pxConvertRem;
  773 + background-image: image-url("guang/star-classroom/xin.png");
  774 + vertical-align: text-bottom;
  775 + }
  776 + }
  777 +
  778 + &.forward {
  779 + width: 40rem / $pxConvertRem;
  780 + height: 28rem / $pxConvertRem;
  781 + background-image: image-url("guang/star-classroom/forward.png");
  782 + position: absolute;
  783 + right: 23rem / $pxConvertRem;
  784 + margin-left: 45rem / $pxConvertRem;
  785 + background-repeat: no-repeat;
  786 + background-size: contain;
  787 + }
  788 + }
  789 + }
  790 + }
  791 + }
  792 +
  793 + .things-list {
  794 + .things-article > li {
  795 + margin-top: 30rem / $pxConvertRem;
  796 +
  797 + .author-info {
  798 + border-top: none;
  799 + }
  800 + }
  801 + }
  802 +
  803 + .check-in {
  804 + background: #f0f0f0;
  805 +
  806 + .check-in-header {
  807 + width: 100%;
  808 + height: 283rem / $pxConvertRem;
  809 + background-image: image-url("guang/star-classroom/checkIn-bg.jpg");
  810 + background-repeat: no-repeat;
  811 + background-size: contain;
  812 +
  813 + .head-cont {
  814 + text-align: center;
  815 + padding-top: 30rem / $pxConvertRem;
  816 + height: 195rem / $pxConvertRem;
  817 + box-sizing: border-box;
  818 +
  819 + img {
  820 + width: 100rem / $pxConvertRem;
  821 + height: 100rem / $pxConvertRem;
  822 + border-radius: 50%;
  823 + border:4rem / $pxConvertRem solid;
  824 + border-color: rgba(255,255,255,.6);
  825 + }
  826 +
  827 + .user-name {
  828 + color: #fff;
  829 + font-size: 24rem / $pxConvertRem;
  830 + font-weight: bold;
  831 + margin-top: 15rem / $pxConvertRem;
  832 + }
  833 + }
  834 +
  835 + .count-area {
  836 + width: 100%;
  837 + float: left;
  838 + }
  839 +
  840 + .count-nav {
  841 + width: 319rem / $pxConvertRem;
  842 + float: left;
  843 + margin-top: 12rem / $pxConvertRem;
  844 +
  845 + p {
  846 + width: 100%;
  847 + text-align: center;
  848 + color: #fff;
  849 + line-height: 32rem / $pxConvertRem;
  850 + }
  851 + }
  852 +
  853 + .line {
  854 + width: 2rem / $pxConvertRem;
  855 + height: 46rem / $pxConvertRem;
  856 + float: left;
  857 + margin-top: 26rem / $pxConvertRem;
  858 + box-sizing: border-box;
  859 + border-left: 1px solid #fff;
  860 + }
  861 + }
  862 +
  863 + .ranking-area {
  864 + width: 100%;
  865 + background: #fff;
  866 + border-top: 1px solid #e0e0e0;
  867 + margin-top: 30rem / $pxConvertRem;
  868 + padding-left: 30rem / $pxConvertRem;
  869 + box-sizing: border-box;
  870 +
  871 + li {
  872 + width: 100%;
  873 + height: 120rem / $pxConvertRem;
  874 + padding-top: 20rem / $pxConvertRem;
  875 + box-sizing: border-box;
  876 + border-bottom: 1px solid #e0e0e0;
  877 +
  878 + img {
  879 + width: 80rem / $pxConvertRem;
  880 + height: 80rem / $pxConvertRem;
  881 + border-radius: 50%;
  882 + float: left;
  883 + }
  884 +
  885 + .ranking-mid {
  886 + float: left;
  887 + margin-left: 20rem / $pxConvertRem;
  888 +
  889 + .rank-ico {
  890 + min-width: 18rem / $pxConvertRem;
  891 + height: 38rem / $pxConvertRem;
  892 + border-radius: 38rem / $pxConvertRem;
  893 + background: #444;
  894 + display: inline-block;
  895 + text-align: center;
  896 + line-height: 40rem / $pxConvertRem;
  897 + color: #fff;
  898 + font-size: 24rem / $pxConvertRem;
  899 + font-weight: bold;
  900 + padding: 0 10rem / $pxConvertRem;
  901 + }
  902 +
  903 + .rank-name {
  904 + font-size: 24rem / $pxConvertRem;
  905 + color: #444;
  906 + margin-top: 5rem / $pxConvertRem;
  907 + }
  908 + }
  909 +
  910 + .ranking-rg {
  911 + font-size: 20rem / $pxConvertRem;
  912 + color: #444;
  913 + float: right;
  914 + margin:20rem / $pxConvertRem 30rem / $pxConvertRem 0 0;
  915 +
  916 + .intimacy {
  917 + margin-left: 10rem / $pxConvertRem;
  918 + font-size: 36rem / $pxConvertRem;
  919 + color: #b0b0b0;
  920 + }
  921 + }
  922 +
  923 + &.high-light {
  924 + .rank-ico {
  925 + width: 52rem / $pxConvertRem;
  926 + height: 39rem / $pxConvertRem;
  927 + line-height: 50rem / $pxConvertRem;
  928 + border-radius: 0;
  929 + background-image: image-url("guang/star-classroom/king-ico.png");
  930 + background-color: #fff;
  931 + background-repeat: no-repeat;
  932 + background-size: contain;
  933 + padding: 0;
  934 + }
  935 +
  936 + .intimacy {
  937 + color: #d0021b;
  938 + }
  939 + }
  940 + }
  941 + }
  942 + }
  943 +}
  1 +{{# trendClassCheckIn}}
  2 + {{> layout/header}}
  3 + <div class="star-classroom">
  4 + <div class="check-in">
  5 + <div class="check-in-header">
  6 + <div class="head-cont">
  7 + <img src="{{userImg}}" />
  8 + <p class="user-name">{{userName}}</p>
  9 + </div>
  10 + <div class="count-area">
  11 + <div class="count-nav">
  12 + <p>{{rankNum}}</p>
  13 + <p>排名</p>
  14 + </div>
  15 + <div class="line"></div>
  16 + <div class="count-nav">
  17 + <p>{{intimacy}}</p>
  18 + <p>亲密度</p>
  19 + </div>
  20 + </div>
  21 + </div>
  22 +
  23 + <ul class="ranking-area">
  24 + {{#each rankingList}}
  25 + <li {{#if highLigth}} class="high-light" {{/if}}>
  26 + <img src="{{img}}" />
  27 + <div class="ranking-mid">
  28 + <i class="rank-ico">{{num}}</i>
  29 + <p class="rank-name">{{userName}}</p>
  30 + </div>
  31 + <div class="ranking-rg">亲密度<span class="intimacy {{#if @first}}font-bold{{/if}}">{{intimacyNum}}</span></div>
  32 + </li>
  33 + {{/each}}
  34 + </ul>
  35 + </div>
  36 + </div>
  37 + {{> layout/footer}}
  38 +{{/trendClassCheckIn}}
  1 +{{# trendClassCollocation}}
  2 + {{> layout/header}}
  3 + <div class="star-classroom">
  4 + {{> guang/head-tab}}
  5 + <ul class="collocation-list">
  6 + {{#each collocationList}}
  7 + <li>
  8 + {{#if img}}
  9 + <a href="{{url}}"><img src="{{img}}" /></a>
  10 + {{/if}}
  11 + <div class="cont-area">
  12 + <h2 class="title"><a href="{{url}}">{{title}}</a></h2>
  13 + <p class="cont-txt">{{content}}</p>
  14 + <div class="count-area">
  15 + <span class="time"><i class="time-ico"></i>{{time}}</span>
  16 + <span class="see"><i class="see-ico"></i>{{seeNum}}</span>
  17 + <span class="zan"><i class="zan-ico"></i>{{zanNum}}</span>
  18 + <span class="forward"></span>
  19 + </div>
  20 + </div>
  21 + </li>
  22 + {{/each}}
  23 + </ul>
  24 + </div>
  25 + {{> layout/footer}}
  26 +{{/trendClassCollocation}}
  1 +{{# trendClassHome}}
  2 + {{> layout/header}}
  3 + <div class="star-classroom">
  4 + {{> guang/head-tab}}
  5 + {{> guang/banner-top}}
  6 + {{> guang/home-floor-sign}}
  7 + {{> guang/home-floor-subject}}
  8 + {{> guang/home-floor-collocation}}
  9 + {{> guang/home-floor-things}}
  10 + </div>
  11 + {{> layout/footer}}
  12 +{{/trendClassHome}}
  1 +{{# trendClassSubject}}
  2 + {{> layout/header}}
  3 + <div class="star-classroom">
  4 + {{> guang/head-tab}}
  5 + <ul class="subject-list">
  6 + {{#each subjectList}}
  7 + <li>
  8 + <a href="{{url}}">
  9 + <img src="{{img}}" />
  10 + <p>{{title}}</p>
  11 + </a>
  12 + </li>
  13 + {{/each}}
  14 + </ul>
  15 + </div>
  16 + {{> layout/footer}}
  17 +{{/trendClassSubject}}
  1 +{{# trendClassThings}}
  2 +<div class="star-classroom">
  3 + {{> guang/head-tab}}
  4 + <div class="things-list">
  5 + {{> guang/things-article}}
  6 + </div>
  7 +</div>
  8 +{{/trendClassThings}}
  1 +<div class="banner-top">
  2 + <div class="banner-swiper swiper-container">
  3 + <ul class="swiper-wrapper">
  4 + {{#each bannerList}}
  5 + {{#if @first}}
  6 + <li class="swiper-slide">
  7 + <a href="{{url}}">
  8 + <img src="{{img}}">
  9 + </a>
  10 + </li>
  11 + {{^}}
  12 + <li class="swiper-slide">
  13 + <a href="{{url}}">
  14 + <img class="swiper-lazy" data-src="{{img}}">
  15 + </a>
  16 + <div class="swiper-lazy-preloader"></div>
  17 + </li>
  18 + {{/if}}
  19 + {{/each}}
  20 + </ul>
  21 + </div>
  22 + <div class="swiper-pagination">
  23 + <div class="pagination-inner">
  24 + </div>
  25 + </div>
  26 +</div>
  1 +{{# title}}
  2 + <div class="floor-more">
  3 + <h2>{{title}}</h2>
  4 + <a class="more-btn" href="{{moreUrl}}">&nbsp;</a>
  5 + </div>
  6 +{{/ title}}
  1 +<ul class="head-tab">
  2 + {{#each headTab}}
  3 + <li {{#if cur}} class="cur" {{/if}}><a href="{{ url }}">{{ name }}</a></li>
  4 + {{/each}}
  5 +</ul>
  1 +{{# starCollocation}}
  2 + {{> guang/floor-header-more}}
  3 + <div class="home-floor-collocation">
  4 + <ul class="collocation-big-img">
  5 + {{#each collocationBigImg}}
  6 + <li><a href="{{url}}"><img src="{{img}}" /></a></li>
  7 + {{/each}}
  8 + </ul>
  9 + <div class="collocation-img">
  10 + <div class="collocation-swiper swiper-container">
  11 + <ul class="swiper-wrapper">
  12 + {{#each collocationList}}
  13 + <li class="swiper-slide">
  14 + <a href="{{url}}">
  15 + <img class="swiper-lazy" data-src="{{img}}">
  16 + </a>
  17 + <div class="swiper-lazy-preloader"></div>
  18 + </li>
  19 + {{/each}}
  20 + </ul>
  21 + </div>
  22 + </div>
  23 + </div>
  24 +{{/ starCollocation}}
  1 +{{# homeSign}}
  2 + <div class="home-floor-sign">
  3 + <div class="nav-left">
  4 + <img src="{{portraitUrl}}" />
  5 + <p class="user-name">{{username}}</p>
  6 + </div>
  7 + <div class="nav-main">
  8 + <p>我的排名:{{rank}}</p>
  9 + <p>累计亲密度:{{intimacy}}</p>
  10 + </div>
  11 + <div class="nav-right">
  12 + <i class="wyf-img"></i>
  13 + <span class="add-intimacy">增加亲密度</span>
  14 + </div>
  15 + </div>
  16 + {{> guang/pop-intimacy}}
  17 +{{/ homeSign}}
  1 +{{# starSubject}}
  2 + {{> guang/floor-header-more}}
  3 + <div class="home-floor-subject">
  4 + {{# subjectBanner}}
  5 + <a href="{{url}}"><img src="{{img}}" class="subject-banner"/></a>
  6 + {{/ subjectBanner}}
  7 +
  8 + {{# subjectVideo}}
  9 + <div class="subject-video-area">
  10 + <video id="subject-video" controls="controls" poster="{{videoImg}}" autobuffer>
  11 + <source src="{{videoUrl}}">
  12 + </video>
  13 + </div>
  14 + {{/ subjectVideo}}
  15 + </div>
  16 +{{/ starSubject}}
  1 +{{# starThings}}
  2 + {{> guang/floor-header-more}}
  3 + {{> guang/things-article}}
  4 +{{/ starThings}}
  1 +<div class="pop-intimacy">
  2 + <div class="intimacy-head">
  3 + <div class="pop-close"></div>
  4 + <h1 class="cur-year"></h1>
  5 + <h4 class="cur-month"></h4>
  6 + <div class="my-intimacy">亲密度 <span>+{{intimacyNum}}</span></div>
  7 + <div class="increased">今日已增加<span>{{intimacyNum}}</span>,明日再来哦!</div>
  8 + </div>
  9 + <div class="calendar">
  10 + <input type="hidden" value="{{signDay}}" class="sign-day" />
  11 + <div class="week">
  12 + {{#each week}}
  13 + <h3>{{this}}</h3>
  14 + {{/each}}
  15 + </div>
  16 + <div id="Container"></div>
  17 + </div>
  18 + <div class="fan-charts">
  19 + <h2>新潮粉丝榜</h2>
  20 + <a href="{{url}}" class="arrow">&nbsp;</a>
  21 + </div>
  22 + <ul class="fan-charts-cont">
  23 + {{#each fanCharts}}
  24 + <li>
  25 + <i class="rank-ico">{{num}}</i>
  26 + <img src="{{img}}" />
  27 + <span class="fans-name">{{name}}</span>
  28 + <div class="fans-intimacy">亲密度<span {{#if @first}}class="font-bold"{{/if}}>{{intimacyNum}}</span></div>
  29 + </li>
  30 + {{/each}}
  31 + </ul>
  32 +</div>
  33 +<div class="classroom-mask"></div>
  1 +{{# thingsArticle}}
  2 + {{> layout/header}}
  3 + <ul class="things-article">
  4 + {{#each articles}}
  5 + <li>
  6 + <div class="author-info">
  7 + <img src="{{authorImg}}" />
  8 + <div class="author-nav">
  9 + <h2>{{authorname}}</h2>
  10 + <p class="article-count"><span>{{releaseTime}}</span><span class="see-ico">{{seeNum}}</span></p>
  11 + </div>
  12 + </div>
  13 + <div class="artice-cont">
  14 + <a href="{{url}}">
  15 + <p>{{articeTxt}}</p>
  16 + <ul class="artice-imgs">
  17 + {{#each articeImg}}
  18 + <li><img src="{{img}}" /></li>
  19 + {{/each}}
  20 + </ul>
  21 + </a>
  22 + </div>
  23 + <div class="artice-zan">
  24 + <div class="zan-ico"></div>
  25 + <ul>
  26 + {{#each zanUser}}
  27 + <li><img src="{{img}}" /></li>
  28 + {{/each}}
  29 + </ul>
  30 + <div class="zan-more">{{zanNum}}+</div>
  31 + </div>
  32 + </li>
  33 + {{/each}}
  34 + </ul>
  35 + {{> layout/footer}}
  36 +{{/ thingsArticle}}
@@ -341,3 +341,12 @@ @@ -341,3 +341,12 @@
341 </script> 341 </script>
342 {{/if}} 342 {{/if}}
343 343
  344 +{{!-- 星潮教室 --}}
  345 +{{#if trendClassHomePage}}
  346 +<script>
  347 + seajs.use('js/guang/star-classroom');
  348 + seajs.use('js/guang/calendar');
  349 +</script>
  350 +{{/if}}
  351 +
  352 +