Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -100,9 +100,9 @@ h2{margin:0;font-size:1.5rem;font-weight:600}
|
|
100 |
}
|
101 |
button.upload{all:unset;cursor:pointer;border:1px solid #bbb;padding:8px 14px;border-radius:6px;background:#fff;margin:0 8px}
|
102 |
#viewer{
|
103 |
-
width:
|
104 |
-
height:
|
105 |
-
max-width:
|
106 |
margin:0;
|
107 |
background:#fff;
|
108 |
border:1px solid #ddd;
|
@@ -114,10 +114,40 @@ button.upload{all:unset;cursor:pointer;border:1px solid #bbb;padding:8px 14px;bo
|
|
114 |
z-index:1000; /* μ΅μμ νμ */
|
115 |
box-shadow:0 4px 20px rgba(0,0,0,0.15);
|
116 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
</style></head><body>
|
118 |
|
119 |
<header>
|
120 |
-
<button id="homeBtn" title="νμΌλ‘"
|
121 |
<h2>My FlipBook Projects</h2>
|
122 |
</header>
|
123 |
|
@@ -318,9 +348,51 @@ function createFlipBook(pages) {
|
|
318 |
/* π λ΄μ₯ μ¬μ΄λ */
|
319 |
sound: true,
|
320 |
assets: {flipMp3: 'static/turnPage2.mp3', hardFlipMp3: 'static/turnPage2.mp3'},
|
321 |
-
controlsProps: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
});
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
console.log('FlipBook μμ± μλ£');
|
325 |
} catch (error) {
|
326 |
console.error('FlipBook μμ± μ€ μ€λ₯ λ°μ:', error);
|
@@ -348,10 +420,11 @@ function toggle(showHome){
|
|
348 |
$id('homeBtn').style.position = 'fixed';
|
349 |
$id('homeBtn').style.top = '20px';
|
350 |
$id('homeBtn').style.left = '20px';
|
351 |
-
$id('homeBtn').style.zIndex = '
|
352 |
$id('homeBtn').style.fontSize = '24px'; // ν¬κΈ° μ¦κ°
|
353 |
$id('homeBtn').style.width = '48px';
|
354 |
$id('homeBtn').style.height = '48px';
|
|
|
355 |
|
356 |
// λ°°κ²½ μ€λ²λ μ΄ μΆκ°
|
357 |
document.body.style.backgroundColor = '#3a3a3a';
|
@@ -363,6 +436,7 @@ function toggle(showHome){
|
|
363 |
$id('homeBtn').style.fontSize = '';
|
364 |
$id('homeBtn').style.width = '';
|
365 |
$id('homeBtn').style.height = '';
|
|
|
366 |
|
367 |
// λ°°κ²½ οΏ½οΏ½λλλ‘
|
368 |
document.body.style.backgroundColor = '#f0f0f0';
|
|
|
100 |
}
|
101 |
button.upload{all:unset;cursor:pointer;border:1px solid #bbb;padding:8px 14px;border-radius:6px;background:#fff;margin:0 8px}
|
102 |
#viewer{
|
103 |
+
width:88%;
|
104 |
+
height:88vh; /* μ 체 νλ©΄ λμ΄μ 88%λ‘ μ‘°μ (κΈ°μ‘΄ 80%μμ 10% μ¦κ°) */
|
105 |
+
max-width:88%; /* μ΅λ λλΉ 88%λ‘ μ ν (κΈ°μ‘΄ 80%μμ 10% μ¦κ°) */
|
106 |
margin:0;
|
107 |
background:#fff;
|
108 |
border:1px solid #ddd;
|
|
|
114 |
z-index:1000; /* μ΅μμ νμ */
|
115 |
box-shadow:0 4px 20px rgba(0,0,0,0.15);
|
116 |
}
|
117 |
+
|
118 |
+
/* FlipBook 컨νΈλ‘€λ° κ΄λ ¨ μ€νμΌ μ€λ²λΌμ΄λ */
|
119 |
+
.flipbook-container .fb3d-menu-bar {
|
120 |
+
z-index: 2000 !important; /* 컨νΈλ‘€λ°κ° λ€λ₯Έ μμλ³΄λ€ μμ μ€λλ‘ ν¨ */
|
121 |
+
opacity: 1 !important; /* νμ νμλλλ‘ ν¨ */
|
122 |
+
bottom: 0 !important; /* νλ¨μ κ³ μ */
|
123 |
+
background-color: rgba(0,0,0,0.7) !important; /* λ°°κ²½μ μ€μ */
|
124 |
+
border-radius: 0 0 8px 8px !important; /* νλ¨ λͺ¨μλ¦¬λ§ λ₯κΈκ² */
|
125 |
+
padding: 8px 0 !important; /* μν ν¨λ© μΆκ° */
|
126 |
+
}
|
127 |
+
|
128 |
+
.flipbook-container .fb3d-menu-bar > ul > li > img,
|
129 |
+
.flipbook-container .fb3d-menu-bar > ul > li > div {
|
130 |
+
opacity: 1 !important; /* λ©λ΄ μμ΄μ½ νμ νμ */
|
131 |
+
transform: scale(1.2) !important; /* μμ΄μ½ ν¬κΈ° μ½κ° ν€μ */
|
132 |
+
}
|
133 |
+
|
134 |
+
.flipbook-container .fb3d-menu-bar > ul > li {
|
135 |
+
margin: 0 8px !important; /* λ©λ΄ μμ΄ν
κ°κ²© μ‘°μ */
|
136 |
+
}
|
137 |
+
|
138 |
+
/* λ©λ΄ ν΄ν μ€νμΌ κ°μ */
|
139 |
+
.flipbook-container .fb3d-menu-bar > ul > li > span {
|
140 |
+
background-color: rgba(0,0,0,0.8) !important;
|
141 |
+
color: white !important;
|
142 |
+
border-radius: 4px !important;
|
143 |
+
padding: 4px 8px !important;
|
144 |
+
font-size: 12px !important;
|
145 |
+
bottom: 45px !important; /* ν΄ν μμΉ μ‘°μ */
|
146 |
+
}
|
147 |
</style></head><body>
|
148 |
|
149 |
<header>
|
150 |
+
<button id="homeBtn" title="νμΌλ‘">π </button>
|
151 |
<h2>My FlipBook Projects</h2>
|
152 |
</header>
|
153 |
|
|
|
348 |
/* π λ΄μ₯ μ¬μ΄λ */
|
349 |
sound: true,
|
350 |
assets: {flipMp3: 'static/turnPage2.mp3', hardFlipMp3: 'static/turnPage2.mp3'},
|
351 |
+
controlsProps: {
|
352 |
+
enableFullscreen: true,
|
353 |
+
enableToc: true,
|
354 |
+
enableDownload: false,
|
355 |
+
enablePrint: false,
|
356 |
+
enableZoom: true,
|
357 |
+
enableShare: false,
|
358 |
+
enableSearch: true,
|
359 |
+
enableAutoPlay: true,
|
360 |
+
enableAnnotation: false,
|
361 |
+
enableSound: true,
|
362 |
+
enableLightbox: false,
|
363 |
+
layout: 10, // λ μ΄μμ μ΅μ
|
364 |
+
skin: 'light', // μ€ν¨ μ€νμΌ
|
365 |
+
autoNavigationTime: 3600, // μλ λκΉ μκ°(μ΄)
|
366 |
+
hideControls: false, // 컨νΈλ‘€ μ¨κΉ λΉνμ±ν
|
367 |
+
paddingTop: 10, // μλ¨ ν¨λ©
|
368 |
+
paddingLeft: 10, // μ’μΈ‘ ν¨λ©
|
369 |
+
paddingRight: 10, // μ°μΈ‘ ν¨λ©
|
370 |
+
paddingBottom: 10, // νλ¨ ν¨λ©
|
371 |
+
pageTextureSize: 1024, // νμ΄μ§ ν
μ€μ² ν¬κΈ°
|
372 |
+
thumbnails: true, // μ¬λ€μΌ νμ±ν
|
373 |
+
autoHideControls: false, // μλ μ¨κΉ λΉνμ±ν
|
374 |
+
controlsTimeout: 8000 // 컨νΈλ‘€ νμ μκ° μ°μ₯
|
375 |
+
}
|
376 |
});
|
377 |
|
378 |
+
// FlipBook μμ± ν 컨νΈλ‘€λ° κ°μ νμ
|
379 |
+
setTimeout(() => {
|
380 |
+
try {
|
381 |
+
// 컨νΈλ‘€λ° κ΄λ ¨ μμ μ°ΎκΈ° λ° μ€νμΌ μ μ©
|
382 |
+
const menuBars = document.querySelectorAll('.flipbook-container .fb3d-menu-bar');
|
383 |
+
if (menuBars && menuBars.length > 0) {
|
384 |
+
menuBars.forEach(menuBar => {
|
385 |
+
menuBar.style.display = 'block';
|
386 |
+
menuBar.style.opacity = '1';
|
387 |
+
menuBar.style.visibility = 'visible';
|
388 |
+
menuBar.style.zIndex = '9999';
|
389 |
+
});
|
390 |
+
}
|
391 |
+
} catch (e) {
|
392 |
+
console.warn('컨νΈλ‘€λ° μ€νμΌ μ μ© μ€ μ€λ₯:', e);
|
393 |
+
}
|
394 |
+
}, 1000);
|
395 |
+
|
396 |
console.log('FlipBook μμ± μλ£');
|
397 |
} catch (error) {
|
398 |
console.error('FlipBook μμ± μ€ μ€λ₯ λ°μ:', error);
|
|
|
420 |
$id('homeBtn').style.position = 'fixed';
|
421 |
$id('homeBtn').style.top = '20px';
|
422 |
$id('homeBtn').style.left = '20px';
|
423 |
+
$id('homeBtn').style.zIndex = '9999'; // μ΅μμ z-indexλ‘ λ³κ²½
|
424 |
$id('homeBtn').style.fontSize = '24px'; // ν¬κΈ° μ¦κ°
|
425 |
$id('homeBtn').style.width = '48px';
|
426 |
$id('homeBtn').style.height = '48px';
|
427 |
+
$id('homeBtn').style.boxShadow = '0 2px 10px rgba(0,0,0,0.2)'; // κ·Έλ¦Όμ μΆκ°
|
428 |
|
429 |
// λ°°κ²½ μ€λ²λ μ΄ μΆκ°
|
430 |
document.body.style.backgroundColor = '#3a3a3a';
|
|
|
436 |
$id('homeBtn').style.fontSize = '';
|
437 |
$id('homeBtn').style.width = '';
|
438 |
$id('homeBtn').style.height = '';
|
439 |
+
$id('homeBtn').style.boxShadow = '';
|
440 |
|
441 |
// λ°°κ²½ οΏ½οΏ½λλλ‘
|
442 |
document.body.style.backgroundColor = '#f0f0f0';
|