-
Notifications
You must be signed in to change notification settings - Fork 12
/
gallery.html
147 lines (142 loc) · 5.95 KB
/
gallery.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ComicMachine | Gallery</title>
<link rel="icon" type="image/png" href="favicon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<script defer type="module" src="gallery.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
.image-preview-container {
position: relative;
width: 50px;
height: 50px;
}
.image-preview {
width: 50px;
height: 50px;
object-fit: cover;
border-radius: 50%;
cursor: pointer;
}
.image-preview-full {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1000;
background-color: white;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.image-preview-full img {
max-width: 80vw;
max-height: 80vh;
object-fit: contain;
}
.image-preview-container:hover .image-preview-full {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light px-3">
<a class="navbar-brand" href="index.html">
<img src="logo.png" width="30" height="30" class="d-inline-block align-top" alt="Logo">
ComicMachine
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="gallery.html">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="fonts.html">Fonts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About</a>
</li>
</ul>
</div>
</nav>
<div class="container mt-5">
<h1 class="text-center mb-4">Gallery Creator</h1>
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<button id="openModalButton" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#galleryModal">Add to Gallery</button>
<select id="collectionSelect" class="form-select d-inline-block" style="width: auto;">
<option value="">All Collections</option>
</select>
</div>
<div>
<button id="exportButton" class="btn btn-success me-2">Export</button>
<button id="importButton" class="btn btn-warning">Import</button>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead class="table-light">
<tr>
<th>ID</th>
<th>Image Preview</th>
<th>Collection Name</th>
<th>Image Name</th>
<th>Image Tags</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="galleryTableBody">
<!-- Table rows will be added here -->
</tbody>
</table>
</div>
<nav aria-label="Gallery pagination">
<ul class="pagination justify-content-center" id="paginationContainer">
<!-- Pagination controls will be added here -->
</ul>
</nav>
</div>
<!-- Modal -->
<div class="modal fade" id="galleryModal" tabindex="-1" aria-labelledby="galleryModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="galleryModalLabel">Add New Image</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="galleryForm">
<div class="mb-3">
<input type="text" id="collectionName" class="form-control" placeholder="Collection Name" required>
<div id="collectionSuggestions" class="mt-2"></div>
</div>
<div class="mb-3">
<input type="text" id="imageName" class="form-control" placeholder="Image Name" required>
</div>
<div class="mb-3">
<input type="text" id="imageTags" class="form-control" placeholder="Image Tags (comma-separated)" required>
</div>
<div class="mb-3">
<input type="file" id="imageFile" class="form-control" accept="image/*" required>
</div>
<div class="text-end">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Add</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>