-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
151 lines (151 loc) · 8.44 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.less">
<link rel="preload" href="/assets/pl-title.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="/assets/pl-text.ttf" as="font" type="font/ttf" crossorigin>
<link rel="preload" href="/assets/pl-picarats.ttf" as="font" type="font/ttf" crossorigin>
<meta property="og:title" content="Les énigmes du Professeur Layton" />
<meta property="og:url" content="https://layton.ldgr.fr/" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Résous les énigmes et mini-jeux des jeux Nintendo DS Professeur Layton !" />
<meta property="og:image" content="/layton.jpg" />
<title>Les énigmes du Professeur Layton</title>
</head>
<body>
<div id="loading">
<svg><use href="/assets/icons-sprite.svg#gear"></use></svg>
</div>
<main>
<nintendo-ds id="nds">
<div class="settings-fold" slot="settings">
<button id="settings-fold" title="Afficher le jeu">
<svg class="icon"><use href="/assets/icons-sprite.svg#show"></use></svg>
</button>
</div>
</nintendo-ds>
<div id="games" class="state">
<pl-tabs id="game-tabs" class="game-container" data-no-action>
<nav class="game-nav" slot="nav">
<% games.forEach(game => { %>
<div class="game-nav-item cartridge" for="<%= game.id %>">
<img class="game-nav-img" src="/assets/<%= game.id %>/titre.png">
<div class="game-nav-title"><%= game.id %></div>
<div class="dots"><i class="dot tl"></i><i class="dot tr"></i></div>
</div>
<% }) %>
</nav>
<div class="game-content" slot="content">
<% games.forEach(game => { %>
<div id="<%= game.id %>" class="game">
<img class="game-img" src="/assets/<%= game.id %>/titre.png">
<pl-collapse class="show">
<button class="collapse-button" slot="button">Énigmes</button>
<div class="collapse-content">
<div class="game-puzzles-filter">
<input class="puzzle-filter-name input" type="text" title="Rechercher" placeholder="Rechercher...">
<% Object.keys(translations).forEach(label=> { %>
<pl-select data-type="<%= label %>">
<button class="button" slot="button" title="<%= translations[label] %>">
<svg class="icon"><use href="/assets/icons-sprite.svg#puzzle-<%= label %>"></use></svg>
<span><%= translations[label] %></span>
</button>
<% Array.from(new Set(game.puzzles.filter(p => p[label]).map(p => p[label]))).forEach(item => { %>
<span><%= item %></span>
<% }) %>
</pl-select>
<% }) %>
<button class="puzzle-filter-reset button" disabled><span>Réinitialiser</span></button>
</div>
<small class="filter-results"><%= game.puzzles.length %> résultats</small>
<div class="game-puzzles">
<% game.puzzles.forEach((puzzle, i) => { %>
<div id="<%= game.id %>-<%= puzzle.number %>" class="cartridge puzzle">
<h2 class="puzzle-name"><%= puzzle.number %> - <%= puzzle.name %></h2>
<div class="puzzle-content">
<div class="puzzle-image"
style="
background-image: url('/assets/<%= game.id %>/puzzles.jpg');
--pos-x: <%= -256 * (i % 10) %>px;
--pos-y: <%= -192 * Math.floor(i / 10) %>px;
"
></div>
<span class="puzzle-picarats badge" title="<%= puzzle.picarats %> picarats"><%= puzzle.picarats %></span>
<img class="pin" src="/assets/solved.png" title="Énigme résolue !">
<button class="puzzle-play">
<svg><use href="/assets/icons-sprite.svg#solve"></use></svg>
</button>
</div>
<div class="puzzle-infos">
<% Object.keys(translations).forEach(label => { %>
<% if (puzzle[label]) { %>
<div class="puzzle-info puzzle-info-<%= label %>">
<span class="puzzle-info-label badge" title="<%= translations[label] %>">
<svg class="icon"><use href="/assets/icons-sprite.svg#puzzle-<%= label %>"></use></svg>
</span>
<span class="puzzle-info-value"><%= puzzle[label] %></span>
</div>
<% } %>
<% }) %>
</div>
<div class="dots"><i class="dot tl"></i><i class="dot tr"></i><i class="dot bl"></i><i class="dot br"></i>
</div>
</div>
<% }) %>
</div>
</div>
</pl-collapse>
<pl-collapse class="show">
<button class="collapse-button" slot="button">Mini-jeux</button>
<div class="collapse-content">
<div class="game-puzzles">
<% game.minigames.forEach((minigame, i) => { %>
<div id="<%= game.id %>-<%= minigame.id %><%= minigame.number != null ? `-${minigame.number}`: '' %>" class="cartridge minigame">
<h2 class="puzzle-name"><%= minigame.name %><%= minigame.number != null ? ` - ${minigame.number}` : '' %></h2>
<div class="puzzle-content">
<div class="puzzle-image"
style="
background-image: url('/assets/<%= game.id %>/minigames.jpg');
--pos-x: <%= -256 * (i % 10) %>px;
--pos-y: <%= -192 * Math.floor(i / 10) %>px;
"
></div>
<img class="pin" src="/assets/solved.png" title="Énigme résolue !">
<button class="puzzle-play">
<svg><use href="/assets/icons-sprite.svg#solve"></use></svg>
</button>
</div>
<div class="puzzle-infos">
<% Object.keys(minigame.infos ?? {}).forEach(label => { %>
<div class="puzzle-info puzzle-info-<%= label %>">
<span class="puzzle-info-label badge" title="<%= translations[label] %>">
<svg class="icon"><use href="/assets/icons-sprite.svg#minigame-<%= label %>"></use></svg>
</span>
<span class="puzzle-info-value"><%= minigame[label] %></span>
</div>
<% }) %>
</div>
<div class="dots"><i class="dot tl"></i><i class="dot tr"></i><i class="dot bl"></i><i class="dot br"></i>
</div>
</div>
<% }) %>
</div>
</div>
</pl-collapse>
</div>
<% }) %>
</div>
</pl-tabs>
</div>
</main>
<footer>
<div><span>Made with ♥ by </span><a class="link" href="https://github.com/Dastan21/layton-puzzles" target="_blank">Dastan</a></div>
<div><span>Support me on </span><a class="link" href="https://ko-fi.com/dastan" target="_blank">Ko-fi</a></div>
</footer>
<script type="module" src="/src/app.ts"></script>
<script type="module" src="/cores/nds.js"></script>
</body>
</html>