-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponsive-demo.html
More file actions
235 lines (210 loc) · 9.95 KB
/
responsive-demo.html
File metadata and controls
235 lines (210 loc) · 9.95 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GALAX - Responsive Demo</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/components.css">
<link rel="stylesheet" href="css/animations.css">
<link rel="stylesheet" href="css/responsive.css">
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
min-height: 100vh;
}
.demo-info {
background: white;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.device-info {
background: #f8f9fa;
padding: 15px;
border-radius: 8px;
margin: 10px 0;
font-family: monospace;
}
.demo-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 70vh;
}
</style>
</head>
<body>
<div class="demo-info">
<h1>🎮 GALAX Responsive Demo</h1>
<p>This demo shows the responsive behavior of Project-GALAX across different devices.</p>
<div class="device-info" id="deviceInfo">
<strong>Device Detection:</strong> Loading...
</div>
<h3>Features:</h3>
<ul>
<li><strong>Desktop:</strong> Sidebar navigation, integrated sprite animation viewer</li>
<li><strong>Mobile:</strong> Bottom navigation, fullscreen sprite viewer</li>
<li><strong>Tablet:</strong> Optimized layout with touch-friendly controls</li>
<li><strong>Auto-detection:</strong> Automatically switches layouts based on device capabilities</li>
</ul>
<div style="margin-top: 20px;">
<button onclick="openMainApp()" style="background: #4ecdc4; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-size: 16px;">
🚀 Open Main Application
</button>
<button onclick="forceDesktop()" style="background: #ff6b47; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-size: 16px; margin-left: 10px;">
💻 Force Desktop Layout
</button>
<button onclick="forceMobile()" style="background: #9c27b0; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-size: 16px; margin-left: 10px;">
📱 Force Mobile Layout
</button>
</div>
</div>
<div class="demo-container">
<div class="app-container" id="demoApp">
<div class="screen main-screen active">
<!-- Desktop Sidebar -->
<div class="sidebar">
<div class="sidebar-header">
<div class="logo-letters">
<div class="logo-letter">G</div>
<div class="logo-letter">A</div>
<div class="logo-letter">L</div>
<div class="logo-letter">A</div>
<div class="logo-letter">X</div>
</div>
<p>Social Community</p>
</div>
<div class="sidebar-nav">
<div class="sidebar-nav-item active">
<div class="nav-icon">💬</div>
<div class="nav-label">Chats</div>
</div>
<div class="sidebar-nav-item">
<div class="nav-icon">📰</div>
<div class="nav-label">News</div>
</div>
<div class="sidebar-nav-item">
<div class="nav-icon">🎮</div>
<div class="nav-label">Games</div>
</div>
<div class="sidebar-nav-item">
<div class="nav-icon">👤</div>
<div class="nav-label">Profile</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content">
<!-- Mobile Header -->
<div class="header">
<div class="header-info">
<div class="user-avatar" style="background: #4ecdc4; width: 40px; height: 40px; border-radius: 50%;"></div>
<div>
<div style="font-weight: bold;">Demo User</div>
<div style="font-size: 12px; color: #666;">Online</div>
</div>
</div>
</div>
<!-- Desktop Content Header -->
<div class="content-header">
<h2>Responsive Demo</h2>
</div>
<!-- Content Body -->
<div class="content-body">
<div style="padding: 20px; text-align: center;">
<h3>🎮 Sprite Animation Integration</h3>
<p>The Games tab features full integration with the LPC sprite animation system.</p>
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px; margin: 20px 0;">
<h4>Responsive Features:</h4>
<ul style="text-align: left; max-width: 400px; margin: 0 auto;">
<li><strong>Desktop:</strong> Side-by-side sprite viewer and controls</li>
<li><strong>Mobile:</strong> Fullscreen sprite viewer with touch controls</li>
<li><strong>Tablet:</strong> Optimized touch-friendly interface</li>
<li><strong>Auto-scaling:</strong> Adapts to any screen size</li>
</ul>
</div>
<button onclick="testSpriteAnimation()" style="background: #4ecdc4; color: white; border: none; padding: 15px 30px; border-radius: 8px; cursor: pointer; font-size: 16px; margin: 10px;">
🎭 Test Sprite Animation
</button>
</div>
</div>
</div>
<!-- Mobile Bottom Navigation -->
<div class="bottom-nav">
<button class="nav-item active">
<div class="nav-icon">💬</div>
<div class="nav-label">Chats</div>
</button>
<button class="nav-item">
<div class="nav-icon">📰</div>
<div class="nav-label">News</div>
</button>
<button class="nav-item">
<div class="nav-icon">🎮</div>
<div class="nav-label">Games</div>
</button>
<button class="nav-item">
<div class="nav-icon">👤</div>
<div class="nav-label">Profile</div>
</button>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script src="js/utils/responsive.js"></script>
<script src="js/components/sprite-animation.js"></script>
<script>
// Demo functions
function updateDeviceInfo() {
const deviceInfo = document.getElementById('deviceInfo');
const info = window.ResponsiveUtils.getDeviceInfo();
deviceInfo.innerHTML = `
<strong>Device Detection:</strong><br>
Device Type: ${info.deviceType}<br>
Screen Size: ${info.screenSize}<br>
Touch Device: ${info.touchDevice}<br>
Viewport: ${info.viewport.width}x${info.viewport.height}<br>
Orientation: ${info.orientation}
`;
}
function openMainApp() {
window.open('index.html', '_blank');
}
function forceDesktop() {
const container = document.querySelector('.app-container');
container.classList.remove('mobile-layout', 'tablet-layout');
container.classList.add('desktop-layout');
document.body.classList.add('device-desktop');
}
function forceMobile() {
const container = document.querySelector('.app-container');
container.classList.remove('desktop-layout', 'tablet-layout');
container.classList.add('mobile-layout');
document.body.classList.add('device-mobile');
}
function testSpriteAnimation() {
try {
new SpriteAnimationManager();
} catch (error) {
alert('Sprite animation requires the full application environment. Please use "Open Main Application" button.');
}
}
// Initialize demo
document.addEventListener('DOMContentLoaded', () => {
setTimeout(updateDeviceInfo, 100);
});
// Update device info on layout changes
window.addEventListener('layoutChange', updateDeviceInfo);
window.addEventListener('resize', () => {
setTimeout(updateDeviceInfo, 100);
});
</script>
</body>
</html>