-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·79 lines (69 loc) · 3.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>list trotual tailwind</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="practice/dist/output.css" rel="stylesheet">
<!-- <script src="practice/live.js"></script>-->
<script src="https://unpkg.com/vue@3"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.0.0-alpha.1/axios.min.js"
integrity="sha512-xIPqqrfvUAc/Cspuj7Bq0UtHNo/5qkdyngx6Vwt+tmbvTLDszzXM0G6c91LXmGrRx8KEPulT+AfOOez+TeVylg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<div id="app" class="relative">
<div class="container mx-auto bg-blue-100/70 flex flex-wrap place-content-around gap-3 py-3 group"
v-for="(item,key) in list">
<h1 class="font-extrabold text-3xl mx-6 w-full group-hover:static group-hover:top-0">
<span class="border border-2 rounded-full "
:class="{'px-1':item.Meta.id.toString().length ==2,'py-1':item.Meta.id.toString().length ==2,'px-2':item.Meta.id.toString().length ==1}">{{item.Meta.id}}</span>
{{item.Meta.name}}</h1>
<template v-for="(cardItem,cardKey) in item">
<div class="hover:shadow-xl hover:shadow-blue-300/70 group relative shadow-lg shadow-blue-300/30 bg-orange-100 w-full max-w-xs rounded-lg"
v-if="cardKey !== 'Meta'">
<div>
<iframe v-if="cardItem.youtube" :src="cardItem.youtube"
class="rounded-t-lg w-full object-contain"
frameborder="0" allowfullscreen></iframe>
<img v-else :src="'practice/src/'+item.Meta.id+'_'+key+'/'+cardItem.id+'_'+cardKey+'.jpg'"
class="rounded-t-lg" alt="">
<!-- <img src="practice/dist/img/image-1.jpg" class="rounded-t-lg" alt="">-->
</div>
<a class=" text-center text-3xl " :href="'practice/src/'+item.Meta.id+'_'+key+'/'+cardItem.id+'_'+cardKey+'.html'">
<div class="w-full bg-amber-200 my-2 py-2 whitespace-pre-wrap break-words">{{cardItem.name}}</div>
</a>
<a class=" text-center text-3xl " :href="'practice/src/'+item.Meta.id+'_'+key+'/'+cardItem.id+'_'+cardKey+'.html'">
<div class="w-full bg-amber-200 my-2 py-2">practice</div>
</a>
<div :class="{'px-1':cardItem.id.length ==2,'px-2':cardItem.id.length ==1}" class="bg-blue-100 group-hover:bg-blue-100/70 border border-2 group-hover:border-blue-100 absolute bottom-0 bg-stone-300/80
rounded-full text-2xl group-hover:animate-bounce group-hover:ml-2">{{cardItem.id}}
</div>
</div>
</template>
</div>
</div>
<script>
const {createApp} = Vue
createApp({
data() {
return {
list: {}
}
},
mounted() {
axios
.get('./practice/src/list.json')
.then(response => (this.list = response.data))
},
method: {
// a computed getter
path: function () {
// `this` points to the component instance
return 'aaaaaaaa';
}
}
}).mount('#app')
</script>
</body>
</html>