Timers and other features for Heroes of the Storm
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.
 
 
 
 
 

85 lines
1.9 KiB

  1. <template>
  2. <div class="battleground" v-if="battleground">
  3. <div class="battleground-background" :style="backgroundCss"/>
  4. <div class="battleground-content">
  5. <div id="objectives" class="objectives">
  6. <div class="objectives-row" v-for="objectiveRow in battleground.objectives">
  7. <template v-for="objective in objectiveRow">
  8. <Objective :objective="objective"></Objective>
  9. </template>
  10. </div>
  11. </div>
  12. <router-link to="/battlegrounds">Back to selector</router-link>
  13. </div>
  14. </div>
  15. </template>
  16. <style lang="sass" scoped>
  17. $border-style: 1px solid $blizzard-font-color
  18. .battleground
  19. &-background, &-content
  20. height: 100vh
  21. width: 100vw
  22. &-background
  23. position: absolute
  24. background-size: cover
  25. background-position: center
  26. filter: blur(2px) brightness(70%)
  27. z-index: -10
  28. .objectives
  29. display: flex
  30. flex-direction: column
  31. height: 100%
  32. &-row
  33. display: flex
  34. justify-content: space-between
  35. flex-grow: 1
  36. &:first-child
  37. border-top: $border-style
  38. border-bottom: $border-style
  39. .objective
  40. &:first-child
  41. border-left: $border-style
  42. border-right: $border-style
  43. </style>
  44. <script>
  45. import BATTLEGROUNDS from '@/gameInfos/battlegrounds'
  46. import Timer from '@/components/Timer'
  47. import Objective from '@/components/Objective'
  48. export default {
  49. name: 'Battleground',
  50. data () {
  51. return {
  52. }
  53. },
  54. computed: {
  55. battlegroundId () {
  56. return this.$route.params.battlegroundId
  57. },
  58. battleground () {
  59. return BATTLEGROUNDS[this.battlegroundId]
  60. },
  61. backgroundCss () {
  62. return {
  63. backgroundImage: `url(${this.battleground.backgroundUrl})`
  64. }
  65. }
  66. },
  67. watch: {
  68. $route (to) {
  69. this.battlegroundId = to.params.battlegroundId
  70. }
  71. },
  72. components: {
  73. Timer,
  74. Objective
  75. }
  76. }
  77. </script>