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.
 
 
 
 
 

127 lines
2.2 KiB

  1. <template>
  2. <div class="weband">
  3. <section class="cover">
  4. </section>
  5. <section v-for="album in albums" v-bind:key="album.title" class="album" v-on:click="albumSelected(album)">
  6. <div>{{album.title}} | {{album.year}}</div>
  7. <img :src="album.cover"/>
  8. </section>
  9. <section class="icono-2">
  10. </section>
  11. <section class="contact">
  12. <span>contact<span class="point">@</span>{{this.artist.toLowerCase()}}<span class="point">.</span>space</span>
  13. <footer class="flex-center">
  14. dede<span class='point'>.</span>space<span class='pipe'>|</span>{{new Date().getFullYear()}}
  15. </footer>
  16. </section>
  17. <Player v-bind:album="currentAlbum"/>
  18. </div>
  19. </template>
  20. <script>
  21. import Player from './Player.vue'
  22. import * as data from '../data.json';
  23. export default {
  24. name: 'Weband',
  25. props: {
  26. msg: String
  27. },
  28. components: {
  29. Player
  30. },
  31. data: function () {
  32. return {
  33. artist: data.artist,
  34. albums: data.albums,
  35. currentAlbum: data.albums[0]
  36. }
  37. },
  38. methods: {
  39. albumSelected: function(album){
  40. this.currentAlbum = album;
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. @import '../assets/css/_variables.css';
  47. .point {
  48. margin: 0px var(--pretty-margin);
  49. }
  50. .pipe {
  51. margin: 0px calc(3 * var(--pretty-margin));
  52. }
  53. section{
  54. height: 100vh;
  55. background-color: var(--main-color);
  56. color: var(--text-color);
  57. }
  58. section h2 {
  59. font-size: 2rem;
  60. }
  61. section.cover{
  62. background : url(../assets/images/icono_1.png) no-repeat center center;
  63. }
  64. section.album{
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: space-around;
  69. cursor: pointer;
  70. }
  71. section.album img{
  72. max-height: 80vh;
  73. max-width: 80vh;
  74. border : 2px solid var(--secondary-color);
  75. }
  76. section.icono-2{
  77. background : url(../assets/images/icono_2.png) no-repeat center center;
  78. }
  79. section.contact{
  80. display : flex;
  81. flex-direction: column;
  82. justify-content: center;
  83. align-items: center;
  84. position :relative;
  85. color:var(--secondary-color);
  86. }
  87. footer{
  88. font-size: 0.92rem;
  89. position: absolute;
  90. width: 100%;
  91. bottom: 0;
  92. text-align: center;
  93. }
  94. .hidden{
  95. display: none;
  96. }
  97. </style>