index.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>LineFunQueue 原型预览</title>
  7. <style>
  8. :root {
  9. --primary-color: #4d79ff;
  10. --secondary-color: #f0f4ff;
  11. --text-color: #2c3e50;
  12. --background-color: #f5f7fa;
  13. --border-color: #e2e8f0;
  14. }
  15. body {
  16. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  17. margin: 0;
  18. padding: 20px;
  19. background-color: var(--background-color);
  20. color: var(--text-color);
  21. line-height: 1.5;
  22. }
  23. .header {
  24. text-align: center;
  25. padding: 20px;
  26. margin-bottom: 20px;
  27. border-bottom: 1px solid var(--border-color);
  28. }
  29. .header h1 {
  30. margin: 0;
  31. color: var(--primary-color);
  32. font-size: 28px;
  33. }
  34. .header p {
  35. margin: 10px 0 0;
  36. color: #64748b;
  37. font-size: 16px;
  38. }
  39. .controls {
  40. display: flex;
  41. justify-content: space-between;
  42. align-items: center;
  43. margin-bottom: 20px;
  44. padding: 10px 15px;
  45. background-color: white;
  46. border-radius: 8px;
  47. box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  48. }
  49. .scale-controls {
  50. display: flex;
  51. gap: 10px;
  52. }
  53. .scale-btn {
  54. background-color: white;
  55. border: 1px solid var(--border-color);
  56. color: var(--text-color);
  57. padding: 5px 12px;
  58. border-radius: 4px;
  59. cursor: pointer;
  60. font-size: 14px;
  61. }
  62. .scale-btn.active {
  63. background-color: var(--primary-color);
  64. color: white;
  65. border-color: var(--primary-color);
  66. }
  67. .layout-controls {
  68. display: flex;
  69. gap: 10px;
  70. }
  71. .layout-btn {
  72. background-color: white;
  73. border: 1px solid var(--border-color);
  74. color: var(--text-color);
  75. padding: 5px 12px;
  76. border-radius: 4px;
  77. cursor: pointer;
  78. font-size: 14px;
  79. }
  80. .layout-btn.active {
  81. background-color: var(--primary-color);
  82. color: white;
  83. border-color: var(--primary-color);
  84. }
  85. .scale-info {
  86. font-size: 14px;
  87. color: #64748b;
  88. margin-left: 10px;
  89. }
  90. .prototypes {
  91. display: grid;
  92. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  93. gap: 20px;
  94. margin-bottom: 30px;
  95. }
  96. .prototypes.compact {
  97. grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  98. }
  99. .prototype {
  100. background-color: white;
  101. border-radius: 8px;
  102. overflow: hidden;
  103. box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  104. transition: transform 0.2s, box-shadow 0.2s;
  105. position: relative;
  106. }
  107. .prototype:hover {
  108. transform: translateY(-3px);
  109. box-shadow: 0 8px 15px rgba(0,0,0,0.05);
  110. }
  111. .prototype-title {
  112. padding: 12px 15px;
  113. font-weight: 600;
  114. border-bottom: 1px solid var(--border-color);
  115. display: flex;
  116. justify-content: space-between;
  117. align-items: center;
  118. }
  119. .prototype-tags {
  120. display: flex;
  121. gap: 5px;
  122. }
  123. .prototype-tag {
  124. font-size: 11px;
  125. padding: 2px 6px;
  126. border-radius: 4px;
  127. font-weight: normal;
  128. }
  129. .tag-host {
  130. background-color: #fff9db;
  131. color: #f59f00;
  132. }
  133. .tag-player {
  134. background-color: #e3fafc;
  135. color: #0c8599;
  136. }
  137. .device-container {
  138. position: relative;
  139. padding: 10px;
  140. margin: 0 auto;
  141. width: 100%;
  142. overflow: hidden;
  143. box-sizing: border-box;
  144. }
  145. .device {
  146. position: relative;
  147. margin: 0 auto;
  148. width: 100%;
  149. border-radius: 30px;
  150. background: #111;
  151. box-shadow: 0 0 0 2px #303030;
  152. overflow: hidden;
  153. padding-bottom: 210%;
  154. }
  155. .device-screen {
  156. position: absolute;
  157. top: 5%;
  158. left: 5%;
  159. width: 90%;
  160. height: 90%;
  161. background: white;
  162. overflow: hidden;
  163. border-radius: 3px;
  164. }
  165. .screen-iframe {
  166. width: 100%;
  167. height: 100%;
  168. border: none;
  169. overflow: hidden;
  170. transform-origin: 0 0;
  171. background: white;
  172. }
  173. .footer {
  174. text-align: center;
  175. padding-top: 20px;
  176. margin-top: 20px;
  177. border-top: 1px solid var(--border-color);
  178. color: #64748b;
  179. font-size: 14px;
  180. }
  181. </style>
  182. </head>
  183. <body>
  184. <div class="header">
  185. <h1>LineFunQueue 原型预览</h1>
  186. <p>排队互动游戏平台 UI 原型</p>
  187. </div>
  188. <div class="controls">
  189. <div class="scale-controls">
  190. <button class="scale-btn" data-scale="0.5">小</button>
  191. <button class="scale-btn active" data-scale="0.6">中</button>
  192. <button class="scale-btn" data-scale="0.7">大</button>
  193. <span class="scale-info">缩放: <span id="scaleValue">0.6</span></span>
  194. </div>
  195. <div class="layout-controls">
  196. <button class="layout-btn active" data-layout="normal">标准布局</button>
  197. <button class="layout-btn" data-layout="compact">紧凑布局</button>
  198. </div>
  199. </div>
  200. <div class="prototypes" id="prototypes">
  201. <!-- 游戏广场 -->
  202. <div class="prototype">
  203. <div class="prototype-title">
  204. 游戏广场
  205. </div>
  206. <div class="device-container">
  207. <div class="device">
  208. <div class="device-screen">
  209. <iframe src="pages/game-plaza.html" class="screen-iframe"></iframe>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <!-- 游戏详情 -->
  215. <div class="prototype">
  216. <div class="prototype-title">
  217. 游戏详情
  218. </div>
  219. <div class="device-container">
  220. <div class="device">
  221. <div class="device-screen">
  222. <iframe src="pages/game-detail.html" class="screen-iframe"></iframe>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. <!-- 创建房间 -->
  228. <div class="prototype">
  229. <div class="prototype-title">
  230. 创建房间
  231. </div>
  232. <div class="device-container">
  233. <div class="device">
  234. <div class="device-screen">
  235. <iframe src="pages/room-create.html" class="screen-iframe"></iframe>
  236. </div>
  237. </div>
  238. </div>
  239. </div>
  240. <!-- 加入房间 -->
  241. <div class="prototype">
  242. <div class="prototype-title">
  243. 加入房间
  244. </div>
  245. <div class="device-container">
  246. <div class="device">
  247. <div class="device-screen">
  248. <iframe src="pages/room-join.html" class="screen-iframe"></iframe>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. <!-- 等待房间 - 主持人 -->
  254. <div class="prototype">
  255. <div class="prototype-title">
  256. 等待房间
  257. <div class="prototype-tags">
  258. <span class="prototype-tag tag-host">主持人</span>
  259. </div>
  260. </div>
  261. <div class="device-container">
  262. <div class="device">
  263. <div class="device-screen">
  264. <iframe src="pages/room-waiting.html?nocheck=1" class="screen-iframe"></iframe>
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. <!-- 等待房间 - 玩家 -->
  270. <div class="prototype">
  271. <div class="prototype-title">
  272. 等待房间
  273. <div class="prototype-tags">
  274. <span class="prototype-tag tag-player">玩家</span>
  275. </div>
  276. </div>
  277. <div class="device-container">
  278. <div class="device">
  279. <div class="device-screen">
  280. <iframe src="pages/room-waiting-player.html" class="screen-iframe"></iframe>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <!-- 海龟汤 - 主持人视图 -->
  286. <div class="prototype">
  287. <div class="prototype-title">
  288. 海龟汤
  289. <div class="prototype-tags">
  290. <span class="prototype-tag tag-host">主持人</span>
  291. </div>
  292. </div>
  293. <div class="device-container">
  294. <div class="device">
  295. <div class="device-screen">
  296. <iframe src="pages/game-turtle-host.html" class="screen-iframe"></iframe>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <!-- 海龟汤 - 玩家视图 -->
  302. <div class="prototype">
  303. <div class="prototype-title">
  304. 海龟汤
  305. <div class="prototype-tags">
  306. <span class="prototype-tag tag-player">玩家</span>
  307. </div>
  308. </div>
  309. <div class="device-container">
  310. <div class="device">
  311. <div class="device-screen">
  312. <iframe src="pages/game-turtle-player.html" class="screen-iframe"></iframe>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. <!-- 游戏历史 -->
  318. <div class="prototype">
  319. <div class="prototype-title">
  320. 游戏历史
  321. </div>
  322. <div class="device-container">
  323. <div class="device">
  324. <div class="device-screen">
  325. <iframe src="pages/game-history.html" class="screen-iframe"></iframe>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <!-- 个人中心 -->
  331. <div class="prototype">
  332. <div class="prototype-title">
  333. 个人中心
  334. </div>
  335. <div class="device-container">
  336. <div class="device">
  337. <div class="device-screen">
  338. <iframe src="pages/profile.html" class="screen-iframe"></iframe>
  339. </div>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. <div class="footer">
  345. <p>© 2023 排队互动游戏平台 | 原型设计</p>
  346. </div>
  347. <script>
  348. document.addEventListener('DOMContentLoaded', function() {
  349. // 初始设置
  350. const scaleValue = document.getElementById('scaleValue');
  351. const iframes = document.querySelectorAll('.screen-iframe');
  352. const prototypes = document.getElementById('prototypes');
  353. // 默认缩放值
  354. let currentScale = 0.6;
  355. // 应用缩放到所有iframe
  356. function applyScale(scale) {
  357. iframes.forEach(iframe => {
  358. iframe.style.transform = `scale(${scale})`;
  359. iframe.style.width = `${(100 / scale)}%`;
  360. iframe.style.height = `${(100 / scale)}%`;
  361. });
  362. scaleValue.textContent = scale;
  363. currentScale = scale;
  364. }
  365. // 初始应用默认缩放
  366. applyScale(currentScale);
  367. // 缩放按钮点击事件
  368. document.querySelectorAll('.scale-btn').forEach(button => {
  369. button.addEventListener('click', function() {
  370. const scale = parseFloat(this.getAttribute('data-scale'));
  371. // 更新活动按钮状态
  372. document.querySelectorAll('.scale-btn').forEach(btn => {
  373. btn.classList.remove('active');
  374. });
  375. this.classList.add('active');
  376. // 应用新缩放
  377. applyScale(scale);
  378. });
  379. });
  380. // 布局按钮点击事件
  381. document.querySelectorAll('.layout-btn').forEach(button => {
  382. button.addEventListener('click', function() {
  383. const layout = this.getAttribute('data-layout');
  384. // 更新活动按钮状态
  385. document.querySelectorAll('.layout-btn').forEach(btn => {
  386. btn.classList.remove('active');
  387. });
  388. this.classList.add('active');
  389. // 应用布局
  390. if (layout === 'compact') {
  391. prototypes.classList.add('compact');
  392. } else {
  393. prototypes.classList.remove('compact');
  394. }
  395. });
  396. });
  397. });
  398. </script>
  399. </body>
  400. </html>