seawolf2357 commited on
Commit
9b92b66
·
1 Parent(s): 1244f5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +52 -166
app.py CHANGED
@@ -837,122 +837,41 @@ HTML = """
837
  min-height: 100vh;
838
  }
839
 
840
- /* HOME Button Container - Z-Image Style */
841
- .home-button-container {
842
- position: fixed;
843
- top: 15px;
844
- left: 50%;
845
- transform: translateX(-50%);
846
- display: flex;
847
- justify-content: center;
848
- align-items: center;
849
- gap: 15px;
850
- padding: 12px 25px;
851
- background: linear-gradient(135deg, #10B981 0%, #059669 100%);
852
- border: 4px solid #1F2937;
853
- border-radius: 12px;
854
- box-shadow: 6px 6px 0 #1F2937;
855
- z-index: 9998;
856
- }
857
-
858
- .home-button {
859
- display: inline-flex;
860
- align-items: center;
861
- gap: 8px;
862
- padding: 10px 25px;
863
- background: linear-gradient(135deg, #FACC15 0%, #F59E0B 100%);
864
- color: #1F2937;
865
- font-family: 'Bangers', cursive;
866
- font-size: 1.4rem;
867
- letter-spacing: 2px;
868
- text-decoration: none;
869
- border: 3px solid #1F2937;
870
- border-radius: 8px;
871
- box-shadow: 4px 4px 0 #1F2937;
872
- transition: all 0.2s ease;
873
- cursor: pointer;
874
- }
875
-
876
- .home-button:hover {
877
- background: linear-gradient(135deg, #FDE047 0%, #FACC15 100%);
878
- transform: translate(-2px, -2px);
879
- box-shadow: 6px 6px 0 #1F2937;
880
- text-decoration: none;
881
- color: #1F2937;
882
- }
883
-
884
- .home-button:active {
885
- transform: translate(2px, 2px);
886
- box-shadow: 2px 2px 0 #1F2937;
887
- }
888
-
889
- .url-display {
890
- font-family: 'Comic Neue', cursive;
891
- font-size: 1.1rem;
892
- font-weight: 700;
893
- color: #FFF;
894
- background: rgba(0,0,0,0.3);
895
- padding: 8px 16px;
896
- border-radius: 6px;
897
- border: 2px solid rgba(255,255,255,0.3);
898
- }
899
-
900
- /* Header Info - Comic Style */
901
  .header-info {
902
  position: fixed;
903
- top: 85px;
904
  left: 50%;
905
  transform: translateX(-50%);
906
  text-align: center;
907
  z-index: 100;
908
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
909
- border: 4px solid #1F2937;
910
- padding: 15px 35px;
911
- border-radius: 12px;
912
- box-shadow: var(--shadow-lg);
913
  }
914
 
915
  .header-info .title {
916
  font-family: 'Bangers', cursive;
917
- font-size: 2rem;
918
  color: #FFF;
919
- text-shadow: 3px 3px 0 #1F2937;
920
- letter-spacing: 3px;
921
- margin-bottom: 6px;
922
- }
923
-
924
- .header-info .description {
925
- font-family: 'Comic Neue', cursive;
926
- font-size: 0.95rem;
927
- font-weight: 700;
928
- color: #FEF9C3;
929
- max-width: 500px;
930
- }
931
-
932
- .stats-badge {
933
- display: inline-block;
934
- background: #FACC15;
935
- color: #1F2937;
936
- padding: 5px 12px;
937
- border-radius: 20px;
938
- font-size: 0.85rem;
939
- margin: 3px;
940
- font-weight: 700;
941
- border: 2px solid #1F2937;
942
- box-shadow: 2px 2px 0 #1F2937;
943
  }
944
 
945
  /* Floating AI Button - Comic Style */
946
  .floating-ai {
947
  position: fixed;
948
- top: 20px;
949
  right: 20px;
950
- width: 65px;
951
- height: 65px;
952
  border-radius: 50%;
953
  background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
954
- border: 4px solid #1F2937;
955
- box-shadow: 5px 5px 0 #1F2937;
956
  z-index: 9999;
957
  display: flex;
958
  justify-content: center;
@@ -964,12 +883,12 @@ HTML = """
964
 
965
  .floating-ai:hover {
966
  transform: translate(-2px, -2px);
967
- box-shadow: 7px 7px 0 #1F2937;
968
  }
969
 
970
  .floating-ai:active {
971
  transform: translate(2px, 2px);
972
- box-shadow: 3px 3px 0 #1F2937;
973
  }
974
 
975
  .floating-ai .icon {
@@ -978,22 +897,22 @@ HTML = """
978
  align-items: center;
979
  width: 100%;
980
  height: 100%;
981
- font-size: 26px;
982
  color: white;
983
- text-shadow: 2px 2px 0 #1F2937;
984
  transition: var(--transition);
985
  }
986
 
987
  .floating-ai .ai-title {
988
  position: absolute;
989
- right: 75px;
990
  background: #FFF;
991
- padding: 10px 20px;
992
  border-radius: 8px;
993
- border: 3px solid #1F2937;
994
- box-shadow: 4px 4px 0 #1F2937;
995
  font-family: 'Bangers', cursive;
996
- font-size: 1.1rem;
997
  letter-spacing: 1px;
998
  white-space: nowrap;
999
  pointer-events: none;
@@ -1010,20 +929,19 @@ HTML = """
1010
 
1011
  /* Viewer Container - Comic Style */
1012
  #viewer {
1013
- width: 90%;
1014
- height: 78vh;
1015
- max-width: 90%;
1016
  margin: 0;
1017
  background: var(--card-bg);
1018
  border: 4px solid #1F2937;
1019
  border-radius: var(--radius-md);
1020
  position: fixed;
1021
- top: 58%;
1022
  left: 50%;
1023
  transform: translate(-50%, -50%);
1024
  z-index: 1000;
1025
  box-shadow: var(--shadow-lg);
1026
- max-height: calc(78vh - 40px);
1027
  overflow: hidden;
1028
  }
1029
 
@@ -1477,45 +1395,25 @@ HTML = """
1477
  }
1478
 
1479
  @media (max-width: 768px) {
1480
- .home-button-container {
1481
- padding: 10px 15px;
1482
- gap: 10px;
1483
- flex-wrap: wrap;
1484
- }
1485
-
1486
- .home-button {
1487
- font-size: 1.1rem;
1488
- padding: 8px 18px;
1489
- }
1490
-
1491
- .url-display {
1492
- font-size: 0.9rem;
1493
- padding: 6px 12px;
1494
- }
1495
-
1496
  .header-info {
1497
- top: 80px;
1498
- padding: 12px 20px;
1499
- max-width: 90%;
1500
  }
1501
 
1502
  .header-info .title {
1503
- font-size: 1.5rem;
1504
- }
1505
-
1506
- .header-info .description {
1507
- font-size: 0.8rem;
1508
  }
1509
 
1510
  .floating-ai {
1511
- width: 55px;
1512
- height: 55px;
1513
- top: 15px;
1514
- right: 15px;
1515
  }
1516
 
1517
  .floating-ai .icon {
1518
- font-size: 22px;
1519
  }
1520
 
1521
  #aiChatContainer {
@@ -1523,9 +1421,9 @@ HTML = """
1523
  }
1524
 
1525
  #viewer {
1526
- width: 95%;
1527
- height: 72vh;
1528
- top: 60%;
1529
  }
1530
 
1531
  .footer-comic {
@@ -1535,23 +1433,9 @@ HTML = """
1535
  </style>
1536
  </head>
1537
  <body>
1538
- <!-- HOME Button Container - Z-Image Style -->
1539
- <div class="home-button-container">
1540
- <a href="https://ginigen.ai" target="_blank" class="home-button">
1541
- 🏠 HOME
1542
- </a>
1543
- <span class="url-display">🌐 ginigen.ai</span>
1544
- </div>
1545
-
1546
- <!-- Header Info - Comic Style -->
1547
  <div class="header-info">
1548
- <div class="title">📚 AI 플립북 📚</div>
1549
- <div class="description">나만의 PDF 전자책을 더욱 가치있게! 입체적인 비주얼과 AI챗봇을 통해 상호 인터렉티브를 지원합니다.</div>
1550
- <div style="margin-top:10px">
1551
- <span class="stats-badge">⚡ 빠른 로딩</span>
1552
- <span class="stats-badge">🤖 AI 챗봇</span>
1553
- <span class="stats-badge">📖 3D 플립북</span>
1554
- </div>
1555
  </div>
1556
 
1557
  <!-- Floating AI Button - Comic Style -->
@@ -1895,18 +1779,20 @@ HTML = """
1895
 
1896
  let width, height;
1897
  if (aspectRatio > 1) {
1898
- height = Math.min(windowHeight * 0.78, windowHeight - 150);
 
1899
  width = height * aspectRatio * 0.75;
1900
- if (width > windowWidth * 0.9) {
1901
- width = windowWidth * 0.9;
1902
  height = width / (aspectRatio * 0.75);
1903
  }
1904
  } else {
1905
- width = Math.min(windowWidth * 0.95, windowWidth - 20);
1906
- height = width / aspectRatio * 0.85;
1907
- if (height > windowHeight * 0.72) {
1908
- height = windowHeight * 0.72;
1909
- width = height * aspectRatio * 0.85;
 
1910
  }
1911
  }
1912
 
 
837
  min-height: 100vh;
838
  }
839
 
840
+ /* Header Info - Compact Comic Style */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
  .header-info {
842
  position: fixed;
843
+ top: 10px;
844
  left: 50%;
845
  transform: translateX(-50%);
846
  text-align: center;
847
  z-index: 100;
848
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
849
+ border: 3px solid #1F2937;
850
+ padding: 8px 25px;
851
+ border-radius: 10px;
852
+ box-shadow: 4px 4px 0 #1F2937;
853
  }
854
 
855
  .header-info .title {
856
  font-family: 'Bangers', cursive;
857
+ font-size: 1.3rem;
858
  color: #FFF;
859
+ text-shadow: 2px 2px 0 #1F2937;
860
+ letter-spacing: 2px;
861
+ margin: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  }
863
 
864
  /* Floating AI Button - Comic Style */
865
  .floating-ai {
866
  position: fixed;
867
+ top: 10px;
868
  right: 20px;
869
+ width: 50px;
870
+ height: 50px;
871
  border-radius: 50%;
872
  background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
873
+ border: 3px solid #1F2937;
874
+ box-shadow: 4px 4px 0 #1F2937;
875
  z-index: 9999;
876
  display: flex;
877
  justify-content: center;
 
883
 
884
  .floating-ai:hover {
885
  transform: translate(-2px, -2px);
886
+ box-shadow: 6px 6px 0 #1F2937;
887
  }
888
 
889
  .floating-ai:active {
890
  transform: translate(2px, 2px);
891
+ box-shadow: 2px 2px 0 #1F2937;
892
  }
893
 
894
  .floating-ai .icon {
 
897
  align-items: center;
898
  width: 100%;
899
  height: 100%;
900
+ font-size: 20px;
901
  color: white;
902
+ text-shadow: 1px 1px 0 #1F2937;
903
  transition: var(--transition);
904
  }
905
 
906
  .floating-ai .ai-title {
907
  position: absolute;
908
+ right: 58px;
909
  background: #FFF;
910
+ padding: 8px 14px;
911
  border-radius: 8px;
912
+ border: 2px solid #1F2937;
913
+ box-shadow: 3px 3px 0 #1F2937;
914
  font-family: 'Bangers', cursive;
915
+ font-size: 0.95rem;
916
  letter-spacing: 1px;
917
  white-space: nowrap;
918
  pointer-events: none;
 
929
 
930
  /* Viewer Container - Comic Style */
931
  #viewer {
932
+ width: 94%;
933
+ height: 90vh;
934
+ max-width: 94%;
935
  margin: 0;
936
  background: var(--card-bg);
937
  border: 4px solid #1F2937;
938
  border-radius: var(--radius-md);
939
  position: fixed;
940
+ top: 50%;
941
  left: 50%;
942
  transform: translate(-50%, -50%);
943
  z-index: 1000;
944
  box-shadow: var(--shadow-lg);
 
945
  overflow: hidden;
946
  }
947
 
 
1395
  }
1396
 
1397
  @media (max-width: 768px) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1398
  .header-info {
1399
+ top: 8px;
1400
+ padding: 6px 15px;
1401
+ max-width: 70%;
1402
  }
1403
 
1404
  .header-info .title {
1405
+ font-size: 1.1rem;
 
 
 
 
1406
  }
1407
 
1408
  .floating-ai {
1409
+ width: 45px;
1410
+ height: 45px;
1411
+ top: 8px;
1412
+ right: 10px;
1413
  }
1414
 
1415
  .floating-ai .icon {
1416
+ font-size: 18px;
1417
  }
1418
 
1419
  #aiChatContainer {
 
1421
  }
1422
 
1423
  #viewer {
1424
+ width: 98%;
1425
+ height: 92vh;
1426
+ top: 50%;
1427
  }
1428
 
1429
  .footer-comic {
 
1433
  </style>
1434
  </head>
1435
  <body>
1436
+ <!-- Header Info - Compact Comic Style -->
 
 
 
 
 
 
 
 
1437
  <div class="header-info">
1438
+ <div class="title">📚 AI 플립북</div>
 
 
 
 
 
 
1439
  </div>
1440
 
1441
  <!-- Floating AI Button - Comic Style -->
 
1779
 
1780
  let width, height;
1781
  if (aspectRatio > 1) {
1782
+ // 가로 모드: 높이 기준으로 90% 사용
1783
+ height = Math.min(windowHeight * 0.88, windowHeight - 60);
1784
  width = height * aspectRatio * 0.75;
1785
+ if (width > windowWidth * 0.94) {
1786
+ width = windowWidth * 0.94;
1787
  height = width / (aspectRatio * 0.75);
1788
  }
1789
  } else {
1790
+ // 세로 모드: 너비 기준으로 98% 사용
1791
+ width = Math.min(windowWidth * 0.98, windowWidth - 10);
1792
+ height = width / aspectRatio * 0.9;
1793
+ if (height > windowHeight * 0.9) {
1794
+ height = windowHeight * 0.9;
1795
+ width = height * aspectRatio * 0.9;
1796
  }
1797
  }
1798