Просмотр исходного кода

applied basic style to gallery function

tags/0.9.0
Alej 6 лет назад
Родитель
Сommit
5484ad4a69
2 измененных файлов: 18 добавлений и 6 удалений
  1. 17
    5
      vue-theme/src/components/gallery.vue
  2. 1
    1
      vue-theme/src/pages/single.vue

+ 17
- 5
vue-theme/src/components/gallery.vue Просмотреть файл

@@ -2,10 +2,10 @@
2 2
 .gallery.f-col.center(v-if="fullscreengallery")
3 3
     button(@click="hideGallery") hide
4 4
     ul
5
-        li
6
-            h1 hello world
7
-        li
8
-            h1 hello world again
5
+        li(v-for="image of images")
6
+                div
7
+                    h1 {{ image }}
8
+
9 9
     .controls.f-row
10 10
         button(@click="hideGallery") <<<
11 11
         button(@click="hideGallery") >>>
@@ -14,6 +14,7 @@
14 14
 <script>
15 15
 export default {
16 16
     props: {
17
+        images: { type: Array },
17 18
         fullscreengallery: { type: Boolean }
18 19
     },
19 20
     methods: {
@@ -30,7 +31,7 @@ export default {
30 31
     top: 0
31 32
     left: 0
32 33
     width: 100%
33
-    height: 100vw
34
+    height: 100vh
34 35
     background-color: blue
35 36
     opacity: 75%
36 37
     z-index: 1001
@@ -40,6 +41,17 @@ export default {
40 41
         z-index: 1011
41 42
     ul
42 43
         list-style: none
44
+        div
45
+            position: inherit
46
+            width: 90vw
47
+            height: 80vh        
48
+            background: #00FF0A
49
+            border: 15px solid #e2e2e2
50
+            padding: 5px
51
+            box-sizing: border-box
43 52
         h1
53
+            text-box:right
54
+            text-align: inherit
44 55
             color: green
56
+            position: inherit
45 57
 </style>

+ 1
- 1
vue-theme/src/pages/single.vue Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 <template lang="pug">
2 2
 .page--single.f-row.between
3
-    gallery(:fullscreengallery="fullscreengallery" v-on:close="fullscreengallery = false")
3
+    gallery(:fullscreengallery="fullscreengallery" v-on:close="fullscreengallery = false" :images="['hi','hello','it works']")
4 4
     article.f-grow.shadow
5 5
         header
6 6
             h1 {{ type }}:{{ $route.params.slug }} single

Загрузка…
Отмена
Сохранить