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.
 
 
 
 
 

104 lines
2.7 KiB

  1. <!--
  2. Copyright © 2021 Adrien Agez <adrien.agez@pm.me>
  3. This file is part of Nexus Timers.
  4. Nexus Timers is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Nexus Timers is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with Nexus Timers. If not, see <https://www.gnu.org/licenses/>.
  14. -->
  15. <template>
  16. <div class="battleground" v-if="battleground">
  17. <div class="battleground-background" :style="backgroundCss"/>
  18. <div class="battleground-content">
  19. <div id="objectives" class="objectives">
  20. <div class="objectives-row" v-for="objectiveRow in battleground.objectives">
  21. <template v-for="objective in objectiveRow">
  22. <Objective :objective="objective"></Objective>
  23. </template>
  24. </div>
  25. </div>
  26. <router-link to="/battlegrounds">Back to selector</router-link>
  27. </div>
  28. </div>
  29. </template>
  30. <style lang="sass" scoped>
  31. $border-style: 1px solid $blizzard-font-color
  32. .battleground
  33. &-background, &-content
  34. height: 100vh
  35. width: 100vw
  36. &-background
  37. position: absolute
  38. background-size: cover
  39. background-position: center
  40. filter: blur(2px) brightness(70%)
  41. z-index: -10
  42. .objectives
  43. display: flex
  44. flex-direction: column
  45. height: 100%
  46. &-row
  47. display: flex
  48. justify-content: space-between
  49. flex-grow: 1
  50. &:first-child
  51. border-top: $border-style
  52. border-bottom: $border-style
  53. .objective
  54. &:first-child
  55. border-left: $border-style
  56. border-right: $border-style
  57. </style>
  58. <script>
  59. import BATTLEGROUNDS from '@/gameInfos/battlegrounds'
  60. import Timer from '@/components/Timer'
  61. import Objective from '@/components/Objective'
  62. export default {
  63. name: 'Battleground',
  64. data () {
  65. return {
  66. }
  67. },
  68. computed: {
  69. battlegroundId () {
  70. return this.$route.params.battlegroundId
  71. },
  72. battleground () {
  73. return BATTLEGROUNDS[this.battlegroundId]
  74. },
  75. backgroundCss () {
  76. return {
  77. backgroundImage: `url(${this.battleground.backgroundUrl})`
  78. }
  79. }
  80. },
  81. watch: {
  82. $route (to) {
  83. this.battlegroundId = to.params.battlegroundId
  84. }
  85. },
  86. components: {
  87. Timer,
  88. Objective
  89. }
  90. }
  91. </script>