File size: 5,108 Bytes
4d9d3b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tabletop Gallery Explorer</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gradient-to-br from-amber-50 to-orange-50 dark:from-gray-900 dark:to-gray-800 transition-colors duration-500">
    <!-- Header -->
    <header class="fixed top-0 left-0 right-0 z-50 bg-white/90 dark:bg-gray-800/90 backdrop-blur-md border-b border-amber-200 dark:border-gray-700">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <h1 class="text-2xl font-bold bg-gradient-to-r from-amber-600 to-orange-600 bg-clip-text text-transparent">
                Tabletop Gallery
            </h1>
            <nav class="flex items-center gap-4">
                <button id="searchBtn" class="p-2 rounded-lg hover:bg-amber-100 dark:hover:bg-gray-700 transition-colors">
                    <i data-feather="search" class="w-5 h-5"></i>
                </button>
                <button id="viewModeBtn" class="p-2 rounded-lg hover:bg-amber-100 dark:hover:bg-gray-700 transition-colors">
                    <i data-feather="grid" class="w-5 h-5"></i>
                </button>
                <button id="themeToggle" class="p-2 rounded-lg hover:bg-amber-100 dark:hover:bg-gray-700 transition-colors">
                    <i data-feather="sun" class="w-5 h-5 hidden dark:block"></i>
                    <i data-feather="moon" class="w-5 h-5 block dark:hidden"></i>
                </button>
            </nav>
        </div>
    </header>

    <!-- Main Tabletop Canvas -->
    <main class="relative h-screen overflow-hidden pt-16">
        <div id="tabletop" class="absolute inset-0 cursor-grab active:cursor-grabbing">
            <!-- Infinite Surface -->
            <div id="surface" class="absolute w-[300vw] h-[300vh] top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
                <!-- Surface Texture -->
                <div class="absolute inset-0 opacity-20">
                    <div class="wood-grain"></div>
                </div>
                
                <!-- Content Objects Container -->
                <div id="objectsContainer" class="relative w-full h-full">
                    <!-- Objects will be dynamically generated here -->
                </div>
            </div>
        </div>

        <!-- Zoom Controls -->
        <div class="fixed bottom-6 right-6 flex flex-col gap-2 z-40">
            <button id="zoomIn" class="p-3 bg-white dark:bg-gray-800 rounded-full shadow-lg hover:shadow-xl transition-all">
                <i data-feather="zoom-in" class="w-5 h-5"></i>
            </button>
            <button id="zoomOut" class="p-3 bg-white dark:bg-gray-800 rounded-full shadow-lg hover:shadow-xl transition-all">
                <i data-feather="zoom-out" class="w-5 h-5"></i>
            </button>
            <button id="resetView" class="p-3 bg-white dark:bg-gray-800 rounded-full shadow-lg hover:shadow-xl transition-all">
                <i data-feather="home" class="w-5 h-5"></i>
            </button>
        </div>
    </main>

    <!-- Magazine View Modal -->
    <div id="magazineModal" class="fixed inset-0 bg-black/90 z-50 hidden items-center justify-center p-4">
        <div class="relative max-w-4xl w-full h-full flex items-center justify-center">
            <button id="closeMagazine" class="absolute top-4 right-4 p-3 bg-white/20 rounded-full hover:bg-white/30 transition-colors z-10">
                <i data-feather="x" class="w-6 h-6 text-white"></i>
            </button>
            <div id="magazineContent" class="w-full max-h-[90vh] overflow-hidden">
                <!-- Magazine content will be loaded here -->
            </div>
        </div>
    </div>

    <!-- Search Modal -->
    <div id="searchModal" class="fixed inset-0 bg-black/50 z-50 hidden items-center justify-center p-4">
        <div class="bg-white dark:bg-gray-800 rounded-2xl p-6 max-w-2xl w-full">
            <div class="flex items-center gap-4 mb-4">
                <i data-feather="search" class="w-5 h-5 text-gray-400"></i>
                <input type="text" id="searchInput" placeholder="Search magazines, resources, or art..." 
                       class="flex-1 bg-transparent outline-none text-lg dark:text-white">
            </div>
            <div id="searchResults" class="space-y-2">
                <!-- Search results will appear here -->
            </div>
        </div>
    </div>

    <!-- Component Scripts -->
    <script src="components/tabletop-object.js"></script>
    <script src="components/magazine-viewer.js"></script>
    
    <!-- Main Scripts -->
    <script src="script.js"></script>
    <script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>