You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.4 KiB

  1. @extends('layouts.app')
  2. @push('scripts')
  3. <script src="{{ asset('js/scoreboard.js') }}"></script>
  4. @endpush
  5. @section('content')
  6. <div class="container">
  7. <div class="row">
  8. <div class="col-md-12">
  9. <table class="table scoreboard">
  10. <thead>
  11. <tr>
  12. <th>Team</th>
  13. @foreach($missions as $mission)
  14. <th class="score">
  15. <h3>{{ $mission->id }}</h3>
  16. <a href="{{ route('mission', $mission) }}">{{ $mission->hashtag }}</a>
  17. </th>
  18. @endforeach
  19. <th class="score">Score</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. @foreach($teams as $team)
  24. <tr data-team="{{ $team->slug }}">
  25. <td>
  26. <div class="team">
  27. <span class="team-icon" style="background-color: #{{ $team->color }};"></span>
  28. <span class="team-name"><a href="{{ route('team', $team) }}">{{ $team->name }}</a></span>
  29. </div>
  30. <div class="players">
  31. @foreach($team->players as $player)
  32. <div class="profile float-left">
  33. <a href="https://twitter.com/{{ $player->twitter }}" title="{{ $player->twitter }}"><img src="{{ $player->photo }}" style="border-color: {{ '#'.$team->color }}"></a>
  34. </div>
  35. @endforeach
  36. </div>
  37. </td>
  38. @foreach($missions as $mission)
  39. <td class="score" data-mission="{{ $mission->slug }}">
  40. <div class="team-wrap">
  41. <div class="team">
  42. <span class="team-icon outlined {{ $mission->progress($team)[0] >= 1 ? '' : 'hidden' }} {{ $mission->complete($team) ? '' : 'empty' }}"
  43. style="background-color: #{{ $team->color }}; border-color: #{{ $team->color }};">
  44. @if(!Auth::guest())
  45. <span>{{ $mission->score($team) }}</span>
  46. @endif
  47. </span>
  48. </div>
  49. </div>
  50. </td>
  51. @endforeach
  52. <td class="total score">
  53. <b>{{ $team->total_score() }}</b>
  54. </td>
  55. </tr>
  56. @endforeach
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </div>
  62. @endsection