-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
206 lines (184 loc) · 8.16 KB
/
index.html
File metadata and controls
206 lines (184 loc) · 8.16 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, maximum-scale=5.0">
<title>BYB 2025 Product Catalog</title>
<link rel="stylesheet" href="flipbook-js/flipbook.css">
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
font-family: sans-serif;
-webkit-touch-callout: default;
-webkit-user-select: text;
user-select: text;
}
body {
display: flex;
flex-direction: column;
background-color: #f0f0f0;
/* Enable smooth scrolling */
-webkit-overflow-scrolling: touch;
}
/* Flipbook container takes up most of the screen */
#flipbook {
flex: 1;
width: 100%;
max-width: 1231px;
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
min-height: 0; /* Allow flex item to shrink */
max-height: calc(100vh - 80px); /* Leave room for download button */
}
/* Desktop-specific sizing to prevent images from being too large */
@media (min-width: 769px) {
#flipbook {
max-height: min(calc(100vh - 100px), 1400px); /* Cap height on desktop */
max-width: min(1231px, 90vw); /* Allow some scaling down on smaller desktops */
}
}
/* Download button at the bottom */
#download-btn {
padding: 15px 30px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
text-decoration: none;
text-align: center;
margin: 10px auto;
display: block;
max-width: 300px;
flex-shrink: 0;
}
#download-btn:hover {
background-color: #0056b3;
}
/* Responsive design */
@media (max-width: 768px) {
#download-btn {
padding: 12px 20px;
font-size: 14px;
margin: 10px auto 20px auto; /* Add more bottom margin on mobile */
position: relative;
z-index: 10; /* Ensure it stays above other elements */
}
#flipbook {
max-height: calc(100vh - 100px); /* Leave more room on mobile */
}
}
@media (max-height: 600px) {
#download-btn {
padding: 8px 15px;
font-size: 14px;
margin: 5px auto 10px auto; /* Add bottom margin for low-height screens */
}
#flipbook {
max-height: calc(100vh - 60px); /* Leave room for download button on short screens */
}
}
/* Ensure images fill the pages properly */
.stf__item img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
/* Prevent text selection */
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
/* Override page-flip centering to work with our layout */
.stf__parent {
position: relative !important;
left: auto !important;
top: auto !important;
transform: none !important;
}
</style>
</head>
<body>
<div class="c-flipbook" id="flipbook">
<div class="c-flipbook__page"><img src="./byb.2025_Page_01.png" alt="Page 1"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_02.png" alt="Page 2"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_03.png" alt="Page 3"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_04.png" alt="Page 4"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_05.png" alt="Page 5"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_06.png" alt="Page 6"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_07.png" alt="Page 7"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_08.png" alt="Page 8"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_09.png" alt="Page 9"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_10.png" alt="Page 10"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_11.png" alt="Page 11"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_12.png" alt="Page 12"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_13.png" alt="Page 13"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_14.png" alt="Page 14"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_15.png" alt="Page 15"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_16.png" alt="Page 16"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_17.png" alt="Page 17"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_18.png" alt="Page 18"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_19.png" alt="Page 19"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_20.png" alt="Page 20"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_21.png" alt="Page 21"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_22.png" alt="Page 22"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_23.png" alt="Page 23"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_24.png" alt="Page 24"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_25.png" alt="Page 25"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_26.png" alt="Page 26"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_27.png" alt="Page 27"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_28.png" alt="Page 28"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_29.png" alt="Page 29"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_30.png" alt="Page 30"></div>
<div class="c-flipbook__page"><img src="./byb.2025_Page_31.png" alt="Page 31"></div>
</div>
<a id="download-btn" href="byb.2025.catalog.pdf" download="byb.2025.catalog.pdf">Download PDF</a>
<script src="flipbook-js/flipbook.umd.min.js"></script>
<script>
// Initialize the flipbook when page loads
document.addEventListener('DOMContentLoaded', () => {
const pageFlip = new St.PageFlip(
document.getElementById('flipbook'),
{
// Use smaller virtual page size so library can switch
// between portrait (1 page) and landscape (2 pages)
width: 400,
height: 600,
size: "fixed",
autoSize: false,
showCover: false,
flippingTime: 600,
usePortrait: true,
mobileScrollSupport: true
}
);
// Get all page elements
const pages = document.querySelectorAll('.c-flipbook__page');
// Load pages from HTML elements
pageFlip.loadFromHTML(pages);
// Force update after loading
pageFlip.update();
// Add event listeners
pageFlip.on('init', (e) => {
console.log('Flipbook initialized');
});
pageFlip.on('flip', (e) => {
console.log('Page flipped to:', e.data);
});
// Fallback: ensure first page is visible after a short delay
setTimeout(() => {
pageFlip.update();
console.log('Fallback update called');
}, 500);
});
</script>
</body>
</html>