Advertisement
Guest User

hehe

a guest
Feb 11th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.93 KB | None | 0 0
  1. @extends('layouts.main')
  2.  
  3. @section('styles')
  4. <style>
  5. .match, .winnings {
  6. float: left;
  7. width: 100%;
  8. min-height: 75px;
  9. background-color: #BBB;
  10. background-repeat: no-repeat;
  11. background-position: right;
  12. border-radius: 5px;
  13. box-shadow: 1px 1px 2px #888;
  14. margin: 5px 0px;
  15. padding: 2px;
  16. }
  17. .match .oitm {
  18. width: 24%;
  19. }
  20. .matchheader {
  21. float: left;
  22. width: 100%;
  23. padding: 0.6em 1%;
  24. border-top: solid 1px #ccc;
  25. background: #e3e3e3;
  26. background: radial-gradient(ellipse at top, #eee 0%,#d7d7d7 70%);
  27. font-size: 100%;
  28. }
  29. .matchright {
  30. width: 28%;
  31. float: left;
  32. margin: 0.5em 1%;
  33. }
  34. .whenm, .eventm {
  35. font-size: 0.8rem;
  36. float: left;
  37. text-shadow: 1px 1px 0 #E5E5E5;
  38. }
  39. .eventm {
  40. float: right;
  41. }
  42. .tournament {
  43. width: 60%;
  44. float: right;
  45. }
  46. .betpoll {
  47. float: left;
  48. min-height: 10px;
  49. float: left;
  50. margin: 0.5em 1.5%;
  51. width: 97%;
  52. }
  53. .betpoll #active {
  54. min-height: 50px;
  55. display: block;
  56. }
  57. .betpoll .oitm {
  58. width: 24%;
  59. }
  60. .betpoll .left {
  61. margin: 0;
  62. }
  63. .betpoll .left::before {
  64. display: none;
  65. }
  66. .winsorloses {
  67. float: left;
  68. width: 98%;
  69. max-width: 400px;
  70. margin: 0.5em 1%;
  71. background: #BBB;
  72. -webkit-border-radius: 5px;
  73. border-radius: 5px;
  74. }
  75. .winsorloses .oitm {
  76. width: 24%;
  77. }
  78. .betheader {
  79. text-overflow: ellipsis;
  80. white-space: nowrap;
  81. overflow: hidden;
  82. margin: 0.5em 2% 0 2%;
  83. width: 96%;
  84. float: left;
  85. }
  86. .team {
  87. width: 60px;
  88. height: 50px;
  89. -webkit-border-radius: 5px;
  90. border-radius: 5px;
  91. }
  92. .teamtext {
  93. background: rgba(187, 187, 187, 0.9);
  94. border-radius: 5px;
  95. padding: 5px;
  96. line-height: 1.4em;
  97. text-align: center;
  98. text-transform: none;
  99. }
  100. .teamtext i {
  101. font-style: normal;
  102. }
  103.  
  104. .matchleft a {
  105. color: #333;
  106. text-decoration: none;
  107. cursor: pointer;
  108. }
  109.  
  110. .format {
  111. font-size: 0.7em;
  112. font-weight: bold;
  113. }
  114. .tournament_bet {
  115. text-align: center;
  116. background-image: url({{asset('images/bg_03.jpg')}});
  117. position: relative;
  118. background-position: center;
  119. background-size: cover;
  120. background-repeat: no-repeat;
  121. /*min-height: 600px;*/
  122. padding: 10px;
  123. }
  124. .tournament_bet th {
  125. background-color: #717171;
  126. color: #ffffff;
  127. font-weight: normal;
  128. padding: 0;
  129. }
  130. .tournament_bet tbody tr td {
  131. vertical-align: middle;
  132. }
  133. .tournament_bet tbody tr td:first-child {
  134. padding: 0;
  135. position: relative;
  136. }
  137. .favorite_team {
  138. position: absolute;
  139. right: 0px;
  140. bottom: 0px;
  141. background-image: url({{asset('images/fav.png')}});
  142. width: 25px;
  143. height: 25px;
  144. }
  145. .sweet-alert {
  146. width: 850px !important;
  147. }
  148. .main-menu-header {
  149. list-style-type: none;
  150. margin: 0;
  151. padding: 0;
  152. overflow: hidden;
  153. background-color: #333;
  154. }
  155.  
  156. .main-menu-header li {
  157. float: left;
  158. }
  159.  
  160. .main-menu-header li a, .sub-menu-btn {
  161. display: inline-block;
  162. color: white;
  163. text-align: center;
  164. padding: 14px 16px;
  165. text-decoration: none;
  166. font-size: 20px;
  167. font-weight: 700;
  168. text-transform: uppercase;
  169. line-height: 35px;
  170. }
  171.  
  172. .main-menu-header li a:hover, .sub-menus:hover .sub-menu-btn {
  173. background-color: #717171;
  174. }
  175.  
  176. .main-menu-header li.sub-menus {
  177. display: inline-block;
  178. }
  179.  
  180. .main-menu-header li a:active, .sub-menus:active{
  181. background-color: #717171;
  182. }
  183.  
  184. .matchLabel {background: #fff; padding-left: 5px; padding-right: 5px}
  185. </style>
  186. <link rel="stylesheet" href="{{ asset('bower_components/bootstrap-sweetalert/dist/sweetalert.css') }}">
  187. @endsection
  188.  
  189. @section('content')
  190. <div class="main-container dark-grey">
  191. <div class="m-container1" id="left">
  192. <div class="main-ct" style="margin-bottom: 0">
  193. <div class="title">EVENTS </div>
  194. <div class="clearfix"></div>
  195. <div class="col-md-12 tournament_bet">
  196.  
  197. <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  198. @foreach($leagues as $key => $league)
  199. <div class="panel panel-default">
  200. <div class="panel-heading" role="tab" id="heading{{$league->id}}">
  201. <h4 class="panel-title" style="text-align: left">
  202. @if($key == 0)
  203. <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{$league->id}}" aria-expanded="true" aria-controls="collapse{{$league->id}}">
  204. {{$league->name}}
  205. </a>
  206. @else
  207. <a {{$league->betting_status == 1 ? '' : 'class="collapsed"'}} role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{$league->id}}" aria-expanded="{{$league->betting_status == 1 ? 'true' : 'false'}}" aria-controls="collapse{{$league->id}}">
  208. {{$league->name}}
  209. </a>
  210. @endif
  211. @if($league->betting_status == 1)
  212. <span class="pull-right green"><strong>Open</strong></span>
  213. @elseif($league->betting_status == -1)
  214. <span class="pull-right">Settled: <strong class="green">{{$league->champion->name}}</strong> (Winner)</span>
  215. @else
  216. <span class="pull-right"><strong>Ongoing</strong></span>
  217. @endif
  218. </h4>
  219. </div>
  220. @if($key == 0)
  221. <div id="collapse{{$league->id}}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{$league->id}}">
  222. @else
  223. <div id="collapse{{$league->id}}" class="panel-collapse collapse {{$league->betting_status == 1 ? 'in' : ''}}" role="tabpanel" aria-labelledby="heading{{$league->id}}">
  224. @endif
  225. <div class="panel-body" style="padding: 1px; background-image: url({{asset('/images/bg_03.jpg')}})">
  226. @foreach($league->teams as $index => $team)
  227. @if($index == 0)
  228. <div class="col-md-6" style="padding-left: 0; padding-right: 1px">
  229. <table border="1" class="table table-responsive table-border" style="text-align: center; margin-bottom: 0">
  230. <thead>
  231. <tr>
  232. <th style="text-align: center; width: 82px;">Team</th>
  233. <th style="text-align: center; font-size: 90%">% of Winning</th>
  234. <th style="text-align: center">Ratio</th>
  235. <th style="text-align: center; font-size: 90%">Possible win per 100</th>
  236. </tr>
  237. </thead>
  238. <tbody>
  239. @endif
  240. @if($index == intVal(round($league->teams->count()/2)))
  241. </tbody>
  242. </table>
  243. </div>
  244. <div class="col-md-6" style="padding-left: 1px; padding-right: 0">
  245. <table border="1" class="table table-responsive table-border" style="text-align: center; margin-bottom: 0">
  246. <thead>
  247. <tr>
  248. <th style="text-align: center; width: 82px;">Team</th>
  249. <th style="text-align: center; font-size: 90%">% of Winning</th>
  250. <th style="text-align: center">Ratio</th>
  251. <th style="text-align: center; font-size: 90%">Possible win per 100</th>
  252. </tr>
  253. </thead>
  254. <tbody>
  255. @endif
  256. <tr>
  257. <td style="position: relative">
  258. <img src="{{asset($team->image)}}" title="{{$team->name}}" style="width: 82px;">
  259. @if($team->pivot->is_favorite)
  260. <span class="favorite_team" title="Favorite team"></span>
  261. @endif
  262. </td>
  263. <td style="vertical-align: middle;">{{ round(tournamentWinPercentagePerTeam($league->id, $team->id), 2) }}%</td>
  264. <td style="vertical-align: middle;">{{ round(tournamentRatioPerTeam($league->id, $team->id), 2) }}</td>
  265. <td style="vertical-align: middle;">
  266. @if(tournamentRatioPerTeam($league->id, $team->id) > 0)
  267. <strong style="color: green">&#8369; {{ number_format((100 * tournamentRatioPerTeam($league->id, $team->id)), 2, '.', ',') }}</strong>
  268. @else
  269. &#8369; 0
  270. @endif
  271. </td>
  272. </tr>
  273. @if($league->teams->count() == ($index+1))
  274. </tbody>
  275. </table>
  276. </div>
  277. @endif
  278. @endforeach
  279. <div style="position: relative">
  280. <img src="{{$league->bottom_image ? url('/') . '/' . $league->bottom_image : asset('images/bottom_tournament_bg.png')}}" style="width: 100%; max-height: 103px;">
  281. <a href="{{url('/tournament') . '/' . $league->id}}" style="position: absolute; bottom: 5px; right: 5px; font-weight: bold; color: black; background-color: orange" class="btn btn-warning">Place Bet</a>
  282. </div>
  283. </div>
  284. </div>
  285. </div>
  286. @endforeach
  287. </div>
  288.  
  289. </div>
  290. </div>
  291. </div>
  292.  
  293. <div class="m-container2" id="right">
  294. <div id="matchesHolder" class="main-ct">
  295. <div class="title">MATCHES </div>
  296. <div class="m-container1" style="width: 98% !important; margin-bottom: 0px;">
  297. <nav>
  298. <ul class="main-menu-header">
  299. <li role="presentation" class="active"><a href="#user-all" class="admin_header_active" id="all" aria-controls="user-all" role="tab" data-toggle="tab">All</a></li>
  300. <li role="presentation"><a href="#user-dota" id="dota2" aria-controls="user-dota" role="tab" data-toggle="tab">Dota2</a></li>
  301. <li role="presentation"><a href="#user-csgo" id="csgo" aria-controls="user-csgo" role="tab" data-toggle="tab">Csgo</a></li>
  302. <li role="presentation"><a href="#user-sports" id="sports" aria-controls="user-sports" role="tab" data-toggle="tab">Sports</a></li>
  303. </ul>
  304. </nav>
  305. </div>
  306. <div class="" style="width: 98% !important;" id="user-all">
  307. <div class="main-ct">
  308. @foreach($matches as $index => $match)
  309. <div class="matchmain">
  310. <div class="infor">
  311. <div class="time">
  312. @if($match->status == 'ongoing')
  313. <span style="color: #72A326; text-shadow: 1px 1px 0px #4A7010; font-weight: bold; font-size: 16px">&nbsp;LIVE</span>
  314. @elseif($match->status == 'settled')
  315. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;SETTLED</span>
  316. @elseif($match->status == 'draw')
  317. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;DRAW - CREDITS RETURNED</span>
  318. @else
  319. <strong class="match_countdown" data-schedule="{{$match->schedule}}">{{$match->schedule->diffForHumans()}}</strong>
  320. @endif
  321. </div>
  322. <div class="series">{{ $match->league->name }}</div>
  323. </div>
  324. @if(in_array($match->status, ['open','ongoing']))
  325. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }})">
  326. @else
  327. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }}); opacity: 0.5">
  328. @endif
  329. <div class="col-sm-10" style="text-align: center; font-weight: bold;">{!!$match->label ? '<span class="matchLabel">' . $match->label . '</span>': ''!!}</div>
  330. <div class="col-sm-10 matchleft">
  331. <a href="{{ url('/') . '/match/' . $match->id }}">
  332. <div style="width: 45%; float: left; text-align: right">
  333. <img class="team2_img" src="{{asset($match->teamA->image)}}" style="float: right;border-radius: 2px; max-width: 30%;">
  334. @if($match->status == 'settled' && $match->teamA->id == $match->team_winner)
  335. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  336. @endif
  337. <div class="teamtext">
  338. <b style="font-size: 0.9vw">{{$match->teamA->name}}</b><br>
  339. <i class="percent-coins">{{number_format($match->teamA->matchWinPercentage($match->id), 2)}}%</i>
  340. </div>
  341. </div>
  342. <div class="vs_div" style="float: left; text-align: center; margin-top: 0.6em">
  343. <span class="format" style="background: #fff;">{{$match->best_of}}</span><br><span style="background: #fff;">vs</span>
  344. </div>
  345. <div style="width: 45%; float: left; text-align: left">
  346. <img class="team2_img" src="{{asset($match->teamB->image)}}" style="float: left;border-radius: 2px; max-width: 30%;">
  347. @if($match->status == 'settled' && $match->teamB->id == $match->team_winner)
  348. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  349. @endif
  350. <div class="teamtext">
  351. <b style="font-size: 0.8vw">{{$match->teamB->name}}</b><br>
  352. <i class="percent-coins">{{number_format($match->teamB->matchWinPercentage($match->id), 2)}}%</i>
  353. </div>
  354. </div>
  355. </a>
  356. </div>
  357. </div>
  358. </div>
  359. @endforeach
  360. </div>
  361. </div>
  362. <div style="text-align: center; margin-bottom: 10px">
  363. <center><button id="loadMoreBtn" type="button" class="btn btn-default btn-sm hidebtn btnall" data-pointer="0" data-loading-text="Loading ... <span class='glyphicon glyphicon-refresh fa-spin'></span>">Show more <i class="fa fa-angle-double-down"></i></button></center>
  364. </div>
  365. </div>
  366.  
  367. <div class="" style="width: 98% !important;" id="user-csgo">
  368. <div class="main-ct" id="user-csgo">
  369. <div class="main-ct">
  370. @foreach(\App\Match::mainMatches()->where('leagues.type','=','csgo')->get()->whereIn('status', ['open','ongoing']) as $match)
  371. <div class="matchmain">
  372. <div class="infor">
  373. <div class="time">
  374. @if($match->status == 'ongoing')
  375. <span style="color: #72A326; text-shadow: 1px 1px 0px #4A7010; font-weight: bold; font-size: 16px">&nbsp;LIVE</span>
  376. @elseif($match->status == 'settled')
  377. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;SETTLED</span>
  378. @elseif($match->status == 'draw')
  379. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;DRAW - CREDITS RETURNED</span>
  380. @else
  381. <strong class="match_countdown" data-schedule="{{$match->schedule}}">{{$match->schedule->diffForHumans()}}</strong>
  382. @endif
  383. </div>
  384. <div class="series">{{ $match->league->name }}</div>
  385. </div>
  386. @if(in_array($match->status, ['open','ongoing']))
  387. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }})">
  388. @else
  389. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }}); opacity: 0.5">
  390. @endif
  391. <div class="col-sm-10" style="text-align: center; font-weight: bold;">{!!$match->label ? '<span class="matchLabel">' . $match->label . '</span>': ''!!}</div>
  392. <div class="col-sm-10 matchleft">
  393. <a href="{{ url('/') . '/match/' . $match->id }}">
  394. <div style="width: 45%; float: left; text-align: right">
  395. <img class="team2_img" src="{{asset($match->teamA->image)}}" style="float: right;border-radius: 2px; max-width: 30%;">
  396. @if($match->status == 'settled' && $match->teamA->id == $match->team_winner)
  397. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  398. @endif
  399. <div class="teamtext">
  400. <b style="font-size: 0.9vw">{{$match->teamA->name}}</b><br>
  401. <i class="percent-coins">{{number_format($match->teamA->matchWinPercentage($match->id), 2)}}%</i>
  402. </div>
  403. </div>
  404. <div class="vs_div" style="float: left; text-align: center; margin-top: 0.6em">
  405. <span class="format" style="background: #fff;">{{$match->best_of}}</span><br><span style="background: #fff;">vs</span>
  406. </div>
  407. <div style="width: 45%; float: left; text-align: left">
  408. <img class="team2_img" src="{{asset($match->teamB->image)}}" style="float: left;border-radius: 2px; max-width: 30%;">
  409. @if($match->status == 'settled' && $match->teamB->id == $match->team_winner)
  410. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  411. @endif
  412. <div class="teamtext">
  413. <b style="font-size: 0.8vw">{{$match->teamB->name}}</b><br>
  414. <i class="percent-coins">{{number_format($match->teamB->matchWinPercentage($match->id), 2)}}%</i>
  415. </div>
  416. </div>
  417. </a>
  418. </div>
  419. </div>
  420. </div>
  421. @endforeach
  422. </div>
  423. </div>
  424. </div>
  425.  
  426.  
  427. <div class="main-ct" id="user-sports">
  428. <div class="main-ct">
  429. @foreach(\App\Match::mainMatches()->where('leagues.type','=','nba')->get()->whereIn('status', ['open','ongoing']) as $match)
  430. <div class="matchmain">
  431. <div class="infor">
  432. <div class="time">
  433. @if($match->status == 'ongoing')
  434. <span style="color: #72A326; text-shadow: 1px 1px 0px #4A7010; font-weight: bold; font-size: 16px">&nbsp;LIVE</span>
  435. @elseif($match->status == 'settled')
  436. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;SETTLED</span>
  437. @elseif($match->status == 'draw')
  438. {{$match->schedule->diffForHumans()}} <span style="color: #606060; font-weight: bold; font-size: 16px">&nbsp;DRAW - CREDITS RETURNED</span>
  439. @else
  440. <strong class="match_countdown" data-schedule="{{$match->schedule}}">{{$match->schedule->diffForHumans()}}</strong>
  441. @endif
  442. </div>
  443. <div class="series">{{ $match->league->name }}</div>
  444. </div>
  445. @if(in_array($match->status, ['open','ongoing']))
  446. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }})">
  447. @else
  448. <div class="match " style="background-image: url({{ url('/public_image') . '/' . $match->league->image }}); opacity: 0.5">
  449. @endif
  450. <div class="col-sm-10" style="text-align: center; font-weight: bold;">{!!$match->label ? '<span class="matchLabel">' . $match->label . '</span>': ''!!}</div>
  451. <div class="col-sm-10 matchleft">
  452. <a href="{{ url('/') . '/match/' . $match->id }}">
  453. <div style="width: 45%; float: left; text-align: right">
  454. <img class="team2_img" src="{{asset($match->teamA->image)}}" style="float: right;border-radius: 2px; max-width: 30%;">
  455. @if($match->status == 'settled' && $match->teamA->id == $match->team_winner)
  456. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  457. @endif
  458. <div class="teamtext">
  459. <b style="font-size: 0.9vw">{{$match->teamA->name}}</b><br>
  460. <i class="percent-coins">{{number_format($match->teamA->matchWinPercentage($match->id), 2)}}%</i>
  461. </div>
  462. </div>
  463. <div class="vs_div" style="float: left; text-align: center; margin-top: 0.6em">
  464. <span class="format" style="background: #fff;">{{$match->best_of}}</span><br><span style="background: #fff;">vs</span>
  465. </div>
  466. <div style="width: 45%; float: left; text-align: left">
  467. <img class="team2_img" src="{{asset($match->teamB->image)}}" style="float: left;border-radius: 2px; max-width: 30%;">
  468. @if($match->status == 'settled' && $match->teamB->id == $match->team_winner)
  469. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  470. @endif
  471. <div class="teamtext">
  472. <b style="font-size: 0.8vw">{{$match->teamB->name}}</b><br>
  473. <i class="percent-coins">{{number_format($match->teamB->matchWinPercentage($match->id), 2)}}%</i>
  474. </div>
  475. </div>
  476. </a>
  477. </div>
  478. </div>
  479. </div>
  480. @endforeach
  481. </div>
  482. </div>
  483. </div>
  484. </div>
  485. </div>
  486. </div>
  487. <div id="popupMessage" class="modal fade" role="dialog">
  488. <div class="modal-dialog">
  489. <div class="modal-content">
  490. <div class="modal-header">
  491. <button type="button" class="close" data-dismiss="modal">&times;</button>
  492. </div>
  493. <div class="modal-body">
  494. <img src="{{asset('/images/pupop_ti.png')}}" width="570" />
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. @endsection
  500. @section('script')
  501. <script id="matches-template" type="text/template">
  502. <div class="matchmain">
  503. <div class="infor">
  504. <div class="time">
  505. @{{& status}}
  506. </div>
  507. <div class="series">@{{league.name}}</div>
  508. </div>
  509. @{{#is_current}}
  510. <div class="match " style="background-image: url({{url('/public_image')}}/@{{league.image}})">
  511. @{{/is_current}}
  512. @{{^is_current}}
  513. <div class="match " style="background-image: url({{url('/public_image')}}/@{{league.image}}); opacity: 0.5">
  514. @{{/is_current}}
  515. @{{#label}}
  516. <div class="col-sm-10" style="text-align: center; font-weight: bold;"><span class="matchLabel">@{{label}}</span></div>
  517. @{{/label}}
  518. <div class="col-sm-10 matchleft">
  519. <a href="{{url('/')}}/match/@{{id}}">
  520. <div style="width: 45%; float: left; text-align: right">
  521. <img class="team2_img" src="{{url('/')}}/@{{team_a.image}}" style="float: right;border-radius: 2px;" />
  522. @{{#team_a_winner}}
  523. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  524. @{{/team_a_winner}}
  525. <div class="teamtext">
  526. <b style="font-size: 0.9vw">@{{team_a.name}}</b><br>
  527. <i class="percent-coins">@{{team_a_winPercentage}}%</i>
  528. </div>
  529. </div>
  530. <div class="vs_div" style="float: left; text-align: center; margin-top: 0.6em">
  531. <span class="format">@{{best_of}}</span><br>vs
  532. </div>
  533. <div style="width: 45%; float: left; text-align: left">
  534. <img class="team2_img" src="{{url('/')}}/@{{team_b.image}}" style="float: left;border-radius: 2px;" />
  535. @{{#team_b_winner}}
  536. <img src="{{asset('images/won.png')}}" style="position: absolute; margin: -10px 0 0 -15px;">
  537. @{{/team_b_winner}}
  538. <div class="teamtext">
  539. <b style="font-size: 0.8vw">@{{team_b.name}}</b><br>
  540. <i class="percent-coins">@{{team_b_winPercentage}}%</i>
  541. </div>
  542. </div>
  543. </a>
  544. </div>
  545. </div>
  546. </div>
  547. </script>
  548. <script type="text/javascript" src="{{ asset('js/moment.min.js')}}"></script>
  549. <script type="text/javascript" src="{{ asset('bower_components/bootstrap-sweetalert/dist/sweetalert.min.js')}}"></script>
  550. <script src="{{ asset('js/mustache.min.js') }}"></script>
  551. <script>
  552. $(function(){
  553. var now = moment(moment().format('YYYY-MM-DD'));
  554. var to_tournament_date = moment("2017-08-03T00:00:00+08:00").fromNow();
  555. $('.tournament-winner-timer').html(to_tournament_date);
  556. })
  557. $(document).ready(function() {
  558. $.each($('.match_countdown'), function(key, index) {
  559. countdown(this, $(this).data('schedule'));
  560. });
  561.  
  562. function countdown(element, time) {
  563. var countDownDate = parseInt(moment(time).format('x'));
  564. var x = setInterval(function() {
  565.  
  566. // Get todays date and time
  567. var now = new Date().getTime();
  568.  
  569. // Find the distance between now an the count down date
  570. var distance = countDownDate - now;
  571.  
  572. // Time calculations for days, hours, minutes and seconds
  573. var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  574. var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  575. var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  576. var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  577.  
  578. // Display the result in the element with id="demo"
  579. element.innerHTML = (days > 0 ? days + "d " : "") + (hours > 0 ? hours + "h " : "") + (minutes > 0 ? minutes + "m " : "") + seconds + "s from now";
  580.  
  581. // If the count down is finished, write some text
  582. if (distance < 0) {
  583. clearInterval(x);
  584. element.innerHTML = "EXPIRED";
  585. }
  586. }, 1000);
  587. }
  588. // $('#popupMessage').modal('show');
  589. $('#loadMoreBtn').click(function() {
  590. $btn = $(this);
  591. $btn.button('loading');
  592. var currIndex = $('#matchesHolder .matchmain:last').index();
  593. var container = $("#matches-template").html();
  594. $.get("{{url('/match/load')}}/" + $btn.data('pointer'))
  595. .done(function(data) {
  596. $btn.button('reset');
  597. $new_contents = '';
  598. $.each(data.matches, function() {
  599. $new_contents += Mustache.render(container, this);
  600. });
  601. $('#matchesHolder').append($new_contents);
  602. // $('html, body').animate({
  603. // scrollTop: $($('#matchesHolder .matchmain')[currIndex]).offset().top
  604. // }, 'fast');
  605. $btn.data('pointer', data.pointer);
  606. });
  607. });
  608. });
  609. // $(window).scroll(function() {
  610. // if($(window).scrollTop() == $(document).height() - $(window).height()) {
  611. // console.log('loading more items...');
  612. // }
  613. // });
  614. </script>
  615. <script>
  616. $(document).ready(function(){
  617. $('#all').click(function(){
  618. $(this).addClass('admin_header_active');
  619. $('#dota2').removeClass('admin_header_active');
  620. $('#csgo').removeClass('admin_header_active');
  621. $('#sports').removeClass('admin_header_active');
  622.  
  623. $('#user-dota').hide();
  624. $('#user-csgo').hide();
  625. $('#user-sports').hide();
  626. $('#user-all').fadeIn();
  627.  
  628. });
  629. $('#dota2').click(function(){
  630. $(this).addClass('admin_header_active');
  631. $('#all').removeClass('admin_header_active');
  632. $('#csgo').removeClass('admin_header_active');
  633. $('#sports').removeClass('admin_header_active');
  634.  
  635. $('#user-csgo').hide();
  636. $('#user-all').hide();
  637. $('#user-sports').hide();
  638. $('#user-dota').fadeIn();
  639.  
  640. });
  641. $('#csgo').click(function(){
  642. $(this).addClass('admin_header_active');
  643. $('#all').removeClass('admin_header_active');
  644. $('#dota2').removeClass('admin_header_active');
  645. $('#sports').removeClass('admin_header_active');
  646.  
  647. $('#user-all').hide();
  648. $('#user-dota').hide();
  649. $('#user-sports').hide();
  650. $('#user-csgo').fadeIn();
  651.  
  652. });
  653. $('#sports').click(function(){
  654. $(this).addClass('admin_header_active');
  655. $('#all').removeClass('admin_header_active');
  656. $('#csgo').removeClass('admin_header_active');
  657. $('#dota2').removeClass('admin_header_active');
  658.  
  659. $('#user-csgo').hide();
  660. $('#user-all').hide();
  661. $('#user-dota').hide();
  662. $('#user-sports').fadeIn();
  663.  
  664. });
  665. })
  666. </script>
  667. @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement