signv2.blade.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
  8. />
  9. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  10. <style>
  11. html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
  12. pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small,
  13. strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
  14. table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details,
  15. figcaption, figure, footer, header, menu, nav, section, summary, time, mark, audio,
  16. video {
  17. margin: 0;
  18. padding: 0;
  19. border: 0;
  20. outline: 0;
  21. font-size: 100%;
  22. vertical-align: baseline;
  23. background: transparent;
  24. }
  25. html {
  26. background: #fff;
  27. }
  28. body {
  29. line-height: 1.5;
  30. font-size: 0.24rem;
  31. font-family: sans-serif, "Microsoft YaHei";
  32. margin: auto;
  33. max-width: 750px;
  34. text-align: center;
  35. -webkit-font-smoothing: antialiased;
  36. }
  37. :focus {
  38. outline: 1;
  39. }
  40. article,
  41. aside,
  42. canvas,
  43. details,
  44. figcaption,
  45. figure,
  46. footer,
  47. header,
  48. hgroup,
  49. menu,
  50. nav,
  51. section,
  52. summary {
  53. display: block;
  54. }
  55. ul {
  56. list-style: none;
  57. }
  58. blockquote,
  59. q {
  60. quotes: none;
  61. }
  62. blockquote:before,
  63. blockquote:after,
  64. q:before,
  65. q:after {
  66. content: "";
  67. content: none;
  68. }
  69. a {
  70. margin: 0;
  71. padding: 0;
  72. border: 0;
  73. font-size: 100%;
  74. vertical-align: baseline;
  75. background: transparent;
  76. text-decoration: none;
  77. }
  78. ins {
  79. background-color: #ff9;
  80. color: #000;
  81. text-decoration: none;
  82. }
  83. mark {
  84. background-color: #ff9;
  85. color: #000;
  86. font-style: italic;
  87. font-weight: bold;
  88. }
  89. del {
  90. text-decoration: line-through;
  91. }
  92. abbr[title],
  93. dfn[title] {
  94. border-bottom: 1px dotted #000;
  95. cursor: help;
  96. }
  97. table {
  98. border-collapse: collapse;
  99. border-spacing: 0;
  100. }
  101. hr {
  102. display: block;
  103. height: 1px;
  104. border: 0;
  105. border-top: 1px solid #cccccc;
  106. margin: 0;
  107. padding: 0;
  108. }
  109. input,
  110. select {
  111. vertical-align: middle;
  112. padding: 0;
  113. margin: 0;
  114. }
  115. input[type="button"],
  116. input[type="submit"],
  117. input[type="reset"] {
  118. -webkit-appearance: none;
  119. }
  120. img {
  121. -webkit-tap-highlight-color: transparent;
  122. }
  123. i {
  124. font-style: normal;
  125. }
  126. body.dialog-open {
  127. position: fixed;
  128. width: 100%;
  129. }
  130. html {
  131. background: #f7f7f7;
  132. }
  133. .sign-wrap {
  134. font-size: 0;
  135. }
  136. .sign-wrap .sign-banner {
  137. position: absolute;
  138. top: 0;
  139. left: 0;
  140. }
  141. .sign-wrap .every-day__get {
  142. position: absolute;
  143. top: 7.5%;
  144. left: 50%;
  145. -webkit-transform: translate(-50%, 0%);
  146. transform: translate(-50%, 0%);
  147. font-size: 18px;
  148. color: #fff;
  149. }
  150. .sign-wrap .every-day__get i {
  151. font-weight: bold;
  152. }
  153. .sign-wrap .wrap-box {
  154. margin: 0 10px;
  155. background: white;
  156. -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
  157. box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
  158. border-radius: 10px;
  159. font-size: 13px;
  160. padding: 20px;
  161. position: relative;
  162. }
  163. .sign-wrap .wrap-box .wrap-box__banner {
  164. position: absolute;
  165. top: 0%;
  166. left: 50%;
  167. -webkit-transform: translate(-50%, -56%);
  168. transform: translate(-50%, -56%);
  169. width: 70%;
  170. }
  171. .sign-wrap .sign-week__wrap {
  172. margin-top: 30%;
  173. }
  174. .sign-wrap .sign-week__wrap .title-text {
  175. margin-top: 9px;
  176. font-size: 13px;
  177. color: #666;
  178. }
  179. .sign-wrap .sign-week__wrap .title-text i {
  180. font-size: 14px;
  181. color: #74aeff;
  182. font-weight: bold;
  183. }
  184. .sign-wrap .sign-week__wrap .sign-progress__wrap {
  185. position: relative;
  186. padding-bottom: 50px;
  187. }
  188. .sign-wrap .sign-list__wrap {
  189. position: absolute;
  190. width: 100%;
  191. top: 0;
  192. left: 50%;
  193. -webkit-transform: translate(-56%, 8%);
  194. transform: translate(-56%, 8%);
  195. }
  196. .sign-wrap .sign-list__wrap .sign-list__top,
  197. .sign-wrap .sign-list__wrap .sign-list__bottom {
  198. display: -webkit-box;
  199. display: -ms-flexbox;
  200. display: flex;
  201. -ms-flex-pack: distribute;
  202. justify-content: space-around;
  203. -webkit-box-align: start;
  204. -ms-flex-align: start;
  205. align-items: flex-start;
  206. }
  207. .sign-wrap .sign-list__wrap .sign-list__top {
  208. margin-bottom: 6%;
  209. }
  210. .sign-wrap .sign-list__wrap .sign-list__bottom {
  211. -webkit-box-orient: horizontal;
  212. -webkit-box-direction: reverse;
  213. -ms-flex-direction: row-reverse;
  214. flex-direction: row-reverse;
  215. }
  216. .sign-wrap .sign-list__wrap .sign-item {
  217. width: 24%;
  218. font-size: 0;
  219. }
  220. .sign-wrap .sign-list__wrap .sign-item img {
  221. width: 22px;
  222. height: 22px;
  223. }
  224. .sign-wrap .sign-list__wrap .sign-item .day-send,
  225. .sign-wrap .sign-list__wrap .sign-item .day-text {
  226. display: block;
  227. font-size: 11px;
  228. color: #999;
  229. }
  230. .sign-wrap .sign-list__wrap .sign-item .day-send {
  231. width: 55px;
  232. margin: 10% auto 0;
  233. border: 1px solid #74aeff;
  234. color: #74aeff;
  235. border-radius: 2px;
  236. position: relative;
  237. }
  238. .sign-wrap .sign-list__wrap .sign-item .day-send::before, .sign-wrap .sign-list__wrap .sign-item .day-send::after {
  239. content: "";
  240. width: 0;
  241. height: 0;
  242. border-style: solid;
  243. border-width: 6px;
  244. border-color: transparent transparent #74aeff transparent;
  245. position: absolute;
  246. top: 0%;
  247. left: 50%;
  248. -webkit-transform: translate(-50%, -100%);
  249. transform: translate(-50%, -100%);
  250. }
  251. .sign-wrap .sign-list__wrap .sign-item .day-send::after {
  252. border-width: 5px;
  253. border-color: transparent transparent #fff transparent;
  254. -webkit-transform: translate(-50%, -93%);
  255. transform: translate(-50%, -93%);
  256. }
  257. .sign-wrap .sign-list__wrap .sign-item.cur .day-send {
  258. background: #74aeff;
  259. color: #fff;
  260. }
  261. .sign-wrap .sign-list__wrap .sign-item.cur .day-send::after {
  262. border-color: transparent transparent #74aeff transparent;
  263. }
  264. .sign-wrap .sign-list__wrap .sign-item.cur .day-text {
  265. color: #74aeff;
  266. font-weight: bold;
  267. }
  268. .sign-wrap .sign-to__read {
  269. position: relative;
  270. }
  271. .sign-wrap .sign-to__read .to-read {
  272. display: block;
  273. text-align: center;
  274. width: 55%;
  275. margin: 0 auto;
  276. line-height: 35px;
  277. background: #74aeff;
  278. color: #fff;
  279. border-radius: 18px;
  280. font-size: 14px;
  281. font-weight: bold;
  282. }
  283. .sign-wrap .sign-to__read .sign-record {
  284. position: absolute;
  285. color: currentColor;
  286. right: 0;
  287. top: 50%;
  288. -webkit-transform: translateY(-50%);
  289. transform: translateY(-50%);
  290. color: #999;
  291. font-size: 12px;
  292. }
  293. .sign-wrap img {
  294. width: 100%;
  295. }
  296. @media screen and (max-width: 320px) {
  297. .sign-wrap .sign-list__wrap .sign-list__top {
  298. margin-bottom: 0%;
  299. }
  300. }
  301. @media screen and (min-width: 414px) {
  302. .sign-wrap .sign-list__wrap .sign-list__top {
  303. margin-bottom: 8%;
  304. }
  305. }
  306. .sign-wrap .read-today__wrap {
  307. margin-top: 10px;
  308. margin-bottom: 10px;
  309. }
  310. .sign-wrap .read-today__wrap h3 {
  311. font-size: 16px;
  312. color: #333;
  313. text-align: left;
  314. display: -webkit-box;
  315. display: -ms-flexbox;
  316. display: flex;
  317. -webkit-box-pack: start;
  318. -ms-flex-pack: start;
  319. justify-content: flex-start;
  320. -webkit-box-align: center;
  321. -ms-flex-align: center;
  322. align-items: center;
  323. margin-bottom: 14px;
  324. }
  325. .sign-wrap .read-today__wrap h3::before {
  326. content: "";
  327. width: 3px;
  328. height: 16px;
  329. background: #74aeff;
  330. border-radius: 1px;
  331. margin-right: 4px;
  332. }
  333. .sign-wrap .read-today__wrap .book-wrap .book-name {
  334. font-size: 16px;
  335. color: #333;
  336. margin-bottom: 12px;
  337. }
  338. .sign-wrap .read-today__wrap .book-wrap .book-intro {
  339. -webkit-line-clamp: 3;
  340. display: -webkit-box;
  341. -webkit-box-orient: vertical;
  342. overflow: hidden;
  343. color: #999;
  344. font-size: 13px;
  345. }
  346. .sign-wrap .read-today__wrap .book-wrap .other-book {
  347. display: -webkit-box;
  348. display: -ms-flexbox;
  349. display: flex;
  350. -webkit-box-pack: start;
  351. -ms-flex-pack: start;
  352. justify-content: flex-start;
  353. -webkit-box-align: start;
  354. -ms-flex-align: start;
  355. align-items: flex-start;
  356. }
  357. .sign-wrap .read-today__wrap .book-wrap .other-book .one,
  358. .sign-wrap .read-today__wrap .book-wrap .other-book .two {
  359. font-size: 12px;
  360. display: block;
  361. padding: 0.06rem 0.12rem;
  362. border-radius: 3px;
  363. }
  364. .sign-wrap .read-today__wrap .book-wrap .other-book .one {
  365. background: #ffe08d;
  366. color: #846a23;
  367. }
  368. .sign-wrap .read-today__wrap .book-wrap .other-book .two {
  369. background: #ffb8b8;
  370. color: #c44444;
  371. }
  372. .sign-wrap .read-today__wrap .book-wrap .other-book span {
  373. -webkit-box-flex: 1;
  374. -ms-flex: 1;
  375. flex: 1;
  376. text-align: left;
  377. margin-left: 6px;
  378. font-size: 13px;
  379. color: #666;
  380. }
  381. .sign-wrap .read-today__wrap .book-wrap .other-book span a {
  382. color: #74aeff;
  383. }
  384. .sign-wrap .read-today__wrap .book-wrap .other-book:not(:last-child) {
  385. margin: 16px auto;
  386. }
  387. .sign-wrap .x-book__multi {
  388. display: -webkit-box;
  389. display: -ms-flexbox;
  390. display: flex;
  391. -webkit-box-align: center;
  392. -ms-flex-align: center;
  393. align-items: center;
  394. -webkit-box-orient: horizontal;
  395. -webkit-box-direction: normal;
  396. -ms-flex-direction: row;
  397. flex-direction: row;
  398. -webkit-box-pack: justify;
  399. -ms-flex-pack: justify;
  400. justify-content: space-between;
  401. }
  402. .sign-wrap .x-book__coverbox {
  403. position: relative;
  404. }
  405. .sign-wrap .x-book__cover {
  406. -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  407. box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  408. border-radius: 3px;
  409. display: block;
  410. border: 0.05px solid #fff;
  411. -webkit-transition: 0.6s;
  412. transition: 0.6s;
  413. width: 77px;
  414. height: 103px;
  415. }
  416. .sign-wrap .x-book__text--multi {
  417. -webkit-box-sizing: border-box;
  418. box-sizing: border-box;
  419. padding-left: 20px;
  420. position: relative;
  421. text-align: left;
  422. width: calc(100% - 77px);
  423. height: 103px;
  424. }
  425. </style>
  426. <title>签到</title>
  427. </head>
  428. <body>
  429. <main class="sign-wrap">
  430. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_banner.jpg" alt="" class="sign-banner" />
  431. <span class="every-day__get">获得<i>{{$fee}}</i>书币</span>
  432. <div class="wrap-box sign-week__wrap">
  433. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_hf.png" alt="" class="wrap-box__banner" />
  434. <p class="title-text">
  435. 您已连续签到<i>{{$sign_count}}</i>天,明天签到获得<i>{{$tomorrow_fee}}</i>书币
  436. </p>
  437. <div class="sign-progress__wrap">
  438. <svg
  439. xmlns="http://www.w3.org/2000/svg"
  440. version="1.1"
  441. x="0px"
  442. y="0px"
  443. viewBox="0 0 305 130"
  444. >
  445. <path
  446. id="base"
  447. fill="#fff"
  448. stroke="#f1f7ff"
  449. stroke-width="3"
  450. opacity="0.5"
  451. d="m14,25.4375l278,-0.4375l0,83l-259,0"
  452. />
  453. <path
  454. id="fill"
  455. fill="#fff"
  456. stroke="#4895ff"
  457. stroke-width="3"
  458. opacity="0.5"
  459. d="m14,25.4375l278,-0.4375l0,83l-259,0"
  460. />
  461. </svg>
  462. <div class="sign-list__wrap">
  463. <div class="sign-list__top">
  464. <!-- 说明: 图片三天使用sign_3 七天使用sign_5 -->
  465. <!-- 已签到过的item上加入cur的class -->
  466. @for($i =1;$i<=4;$i++)
  467. <div class="sign-item {{($sign_count %7 >=$i) || $sign_count %7 == 0 ? 'cur':''}}">
  468. @if($i == 3)
  469. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_3.png" alt="" />
  470. @elseif($i ==7)
  471. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_7.png" alt="" />
  472. @else
  473. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_c.png" alt="" />
  474. @endif
  475. <span class="day-send">{{$fee_pool[$i]}}书币</span>
  476. <span class="day-text">第{{$day[$i]}}天</span>
  477. </div>
  478. @endfor
  479. </div>
  480. <div class="sign-list__bottom">
  481. @for($j =5;$j<=7;$j++)
  482. <div class="sign-item {{($sign_count %7 >=$j) || ($sign_count %7 ==0 ) ? 'cur':''}}">
  483. @if($j == 3)
  484. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_3.png" alt="" />
  485. @elseif($j ==7)
  486. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_5.png" alt="" />
  487. @else
  488. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_c.png" alt="" />
  489. @endif
  490. <span class="day-send">{{$fee_pool[$j]}}书币</span>
  491. <span class="day-text">第{{$day[$j]}}天</span>
  492. </div>
  493. @endfor
  494. </div>
  495. </div>
  496. </div>
  497. <div class="sign-to__read">
  498. <a href="/continue" class="to-read">继续看书&gt;&gt;</a>
  499. <a href="/record/sign" class="sign-record">签到记录&gt;</a>
  500. </div>
  501. </div>
  502. <div class="wrap-box read-today__wrap">
  503. <h3>今日必读</h3>
  504. <div class="book-wrap">
  505. @if($book1)
  506. <div class="x-book">
  507. <div class="x-book__multi">
  508. <div class="x-book__coverbox">
  509. <a href="{{$book1->url}}"><img src="{{$book1->cover}}" class="x-book__cover"/></a>
  510. </div>
  511. <div class="x-book__text--multi">
  512. <a href="{{$book1->url}}">
  513. <p class="book-name">{{$book1->book_name}}</p>
  514. <p class="book-intro">
  515. {{$book1->intro}}
  516. </p>
  517. </a>
  518. </div>
  519. </div>
  520. </div>
  521. @endif
  522. @if($book2)
  523. @foreach($book2 as $key=>$item)
  524. <p class="other-book"><i class="{{$key%2 == 0? 'one':'two'}}">{{$item->category_name}}</i><span>{{$item->desc}}<a href={{$item->url}}>点击阅读&gt;</a></span></p>
  525. @endforeach
  526. @endif
  527. </div>
  528. </div>
  529. </main>
  530. </body>
  531. <script src="https://cdn.bootcss.com/progressbar.js/1.0.1/progressbar.min.js"></script>
  532. <script>
  533. // 每天有对应的进度条进度
  534. var sign = {{$sign_count}}
  535. sign = sign%7;
  536. if(sign == 0) sign = 7;
  537. var dayWithProgress = [0,0, 0.13, 0.26, 0.39, 0.68, 0.85, 1];
  538. // 可以把签到天数放入元素获取 或者直接js赋值
  539. var bar = new ProgressBar.Path("#fill", {
  540. easing: "easeInOut",
  541. duration: 1400
  542. });
  543. bar.set(0);
  544. bar.animate(dayWithProgress[sign]);
  545. </script>
  546. </html>