-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
88 lines (76 loc) · 3.81 KB
/
index.html
File metadata and controls
88 lines (76 loc) · 3.81 KB
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
80
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>Studio Ghibli API</title>
<link href="https://fonts.googleapis.com/css?family=Lato%7CRaleway" rel="stylesheet" />
<link href="css/grid.css" rel="stylesheet" />
<link href="css/main.css" rel="stylesheet" />
<!-- Glide.js styles -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@glidejs/glide/dist/css/glide.core.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@glidejs/glide/dist/css/glide.theme.min.css" />
<script defer src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@glidejs/glide"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script defer src="js/main.js" type="module"></script>
<script src="js/mobileSwiper.js"></script>
</head>
<body>
<div id="app">
<main class="full-width-grid-con">
<section class="grid-con">
<h1 class="hidden">Movie Information</h1>
<h1 class="col-span-full title">Select your Studio Ghibli Movie Sketch!</h1>
<!-- Show this section if a movie is selected -->
<div v-if="selectedMovie" class="movie-info col-span-full m-col-span-6" ref="movieInfo">
<img :src="`images/${selectedMovie.movie_image}`" alt="poster" />
<h1>{{ selectedMovie.title }}</h1>
<p><strong>Director:</strong> {{ selectedMovie.director }}</p>
<p><strong>Writer:</strong> {{ selectedMovie.writer }}</p>
<p><strong>Release Date:</strong> {{ selectedMovie.release_date }}</p>
</div>
<!-- Show this section with a placeholder if no movie is selected -->
<div v-else class="movie-info col-span-full m-col-span-6" ref="movieInfo">
<img src="images/ghibli-sketch-book.png" alt="ghibli sketch book" />
<h1>Select a sketch to see the details!</h1>
</div>
<h1 class="hidden">Movie sketches to click on</h1>
<div class="col-span-full m-col-span-6" id="movie-sketches-section">
<!-- Mobile Slider View -->
<div class="glide" v-if="windowWidth < 712">
<div class="glide__track" data-glide-el="track">
<ul class="glide__slides">
<li class="glide__slide sketch" v-for="movie in movies" :key="movie.id" @click="getMovie(movie.id)">
<h3>{{ movie.title }}</h3>
<img :src="`images/${movie.posterSketch}`" alt="" />
</li>
</ul>
</div>
<div class="glide__arrows" data-glide-el="controls">
<button class="glide__arrow glide__arrow--left" data-glide-dir="<">prev</button>
<button class="glide__arrow glide__arrow--right" data-glide-dir=">">next</button>
</div>
<div class="glide__bullets" data-glide-el="controls[nav]">
<button class="glide__bullet" v-for="(movie, index) in movies" :key="index" :data-glide-dir="`=${index}`"></button>
</div>
</div>
<!-- Desktop Grid View -->
<ul class="grid-con" v-else>
<li class="sketch col-span-full m-col-span-6 l-col-span-6" v-for="movie in movies" :key="movie.id" @click="getMovie(movie.id)">
<h3>{{ movie.title }}</h3>
<img :src="`images/${movie.posterSketch}`" alt="" />
</li>
</ul>
</div>
</main>
<footer>
<section class="full-width-grid-con">
<div class="grid-con">
<h1 class="col-span-full">© All rights reserved Studio Ghibli</h1>
</div>
</section>
</footer>
</div>
</body>
</html>