share.ejs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <!DOCTYPE html>
  2. <html lang="<%= lang %>">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title>Art Color</title>
  8. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>?lang=en" hrefLang="en" />
  9. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>?lang=zh" hrefLang="zh" />
  10. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>?lang=es" hrefLang="es" />
  11. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>?lang=pt" hrefLang="pt" />
  12. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>?lang=ja" hrefLang="ja" />
  13. <link rel="alternate" href="https://art.pcoloring.com/share/<%= id %>" hrefLang="x-default" />
  14. <meta name="description" content="<%= translate.colorRelex[lang] %>">
  15. <meta name="keywords" content="color, paint, app, ios, android, game">
  16. <meta property="og:site_name" content="art.pcoloring.com">
  17. <meta property="og:title" content="Art Color">
  18. <meta property="og:description" content="<%= translate.colorRelex[lang] %>">
  19. <meta property="og:image" content="<%= imageUrl %>">
  20. <meta property="og:type" content="website">
  21. <!-- <meta property="fb:page_id" content="565152927316964"> -->
  22. <!-- MARK: Universal Link / Android App Link 的核心配置 -->
  23. <!-- 这些 meta 标签的值应该是完整的 HTTPS 链接,Facebook 会识别并尝试拉起 App -->
  24. <meta property="og:url" content="<%= applink %>" /> <!-- **Universal Link 路径** -->
  25. <meta property="al:ios:url" content="<%= applink %>" /> <!-- **Universal Link 路径** -->
  26. <meta property="al:ios:app_store_id" content="1575480118" /> <!-- **iOS App Store ID** -->
  27. <meta property="al:ios:app_name" content="Art Color" /> <!-- **iOS 应用名称** -->
  28. <meta property="al:android:package" content="com.pcoloring.art.puzzle.color.by.number" /> <!-- **Android 包名** -->
  29. <meta property="al:android:url" content="<%= applink %>" /> <!-- ** Universal Link 路径** -->
  30. <meta property="al:android:app_name" content="Art Color" /> <!-- **Android 应用名称** -->
  31. <meta name="apple-itunes-app" content="app-id=1575480118">
  32. <link rel="icon" href="/assets/icon/favicon.ico" type="image/x-icon">
  33. <link rel="apple-touch-icon" sizes="180x180" href="/assets/icon/icon.png">
  34. <script type="module" crossorigin src="/assets/share-DDyw1eeR.js"></script>
  35. <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
  36. <link rel="modulepreload" crossorigin href="/assets/WorkLayer-RuTV64WF.js">
  37. <style>
  38. :root {
  39. --primary-color: #ff6b6b;
  40. --secondary-color: #4ecdc4;
  41. --accent-color: #ffd166;
  42. --background-color: #f9f9f9;
  43. --text-color: #333;
  44. --light-text: #666;
  45. --border-color: #e0e0e0;
  46. }
  47. body {
  48. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  49. display: flex;
  50. flex-direction: column;
  51. /* 垂直方向排列子元素 */
  52. height: 100vh;
  53. /* 严格限制高度为视口高度,确保不超出 */
  54. margin: 0;
  55. padding: 20px;
  56. /* 页面内边距 */
  57. box-sizing: border-box;
  58. /* 盒模型为边框盒 */
  59. background-color: var(--background-color);
  60. color: var(--text-color);
  61. line-height: 1.6;
  62. align-items: center;
  63. /* 水平居中所有flex子项 */
  64. }
  65. /* 头部容器 */
  66. .header-container {
  67. width: 100%;
  68. /* 占据全部宽度 */
  69. display: flex;
  70. flex-direction: column;
  71. align-items: center;
  72. justify-content: center;
  73. padding-bottom: 15px;
  74. /* 与下方内容留出间距,略微缩小 */
  75. flex-shrink: 0;
  76. /* 不会收缩 */
  77. }
  78. .app-icon {
  79. display: flex;
  80. justify-content: center;
  81. align-items: center;
  82. margin: 0 auto;
  83. overflow: hidden;
  84. }
  85. .app-icon img {
  86. width: 90px;
  87. /* 图标调小 */
  88. height: 90px;
  89. /* 图标调小 */
  90. border: 3px solid #eeeeee;
  91. border-radius: 10px;
  92. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  93. object-fit: contain;
  94. }
  95. .app-title {
  96. font-size: 1.8rem;
  97. /* 标题调小 */
  98. font-weight: 700;
  99. margin-bottom: 15px;
  100. /* 调整为与图标的间距,略微缩小 */
  101. text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  102. text-align: center;
  103. /* 确保标题在移动端也居中 */
  104. }
  105. /* 图片和 Canvas 容器,占据剩余所有空间 */
  106. .image-canvas-container {
  107. position: relative;
  108. width: 100%;
  109. /* 占据所有可用宽度 */
  110. max-width: 600px;
  111. /* 限制最大宽度,保持美观 */
  112. flex-grow: 1;
  113. /* 占据所有剩余垂直空间 */
  114. min-height: 0;
  115. /* 允许flex-grow在必要时收缩 */
  116. display: flex;
  117. /* 内部使用flex布局来居中图片和canvas */
  118. justify-content: center;
  119. align-items: center;
  120. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  121. /* 添加阴影效果 */
  122. border-radius: 12px;
  123. /* 圆角 */
  124. overflow: hidden;
  125. /* 隐藏超出容器的内容 */
  126. margin-bottom: 15px;
  127. /* 与下方按钮留出间距,略微缩小 */
  128. /* aspect-ratio: 1 / 1; 移除1:1比例,让高度自适应剩余空间 */
  129. }
  130. /* 图片样式:使其响应式并填充容器 */
  131. .image-canvas-container img {
  132. position: absolute;
  133. /* 绝对定位,与canvas重叠 */
  134. display: block;
  135. /* 移除图片底部空白 */
  136. width: 100%;
  137. /* 宽度填充父容器 */
  138. height: 100%;
  139. /* 高度填充父容器 */
  140. object-fit: contain;
  141. /* 保持图片比例,适应容器 */
  142. border-radius: 12px;
  143. /* 与容器相同的圆角 */
  144. z-index: 100;
  145. /* 确保图片在canvas之上 */
  146. }
  147. /* Canvas 样式:绝对定位,与图片完全重叠 */
  148. .image-canvas-container canvas {
  149. position: absolute;
  150. top: 0;
  151. left: 0;
  152. width: 100%;
  153. height: 100%;
  154. border-radius: 12px;
  155. /* 与容器相同的圆角 */
  156. z-index: 50;
  157. /* 在图片之下 */
  158. }
  159. .btn {
  160. display: inline-block;
  161. min-width: 180px;
  162. background-color: var(--primary-color);
  163. color: white;
  164. border: none;
  165. padding: 10px 20px;
  166. border-radius: 20px;
  167. font-size: 1.1rem;
  168. font-weight: 500;
  169. cursor: pointer;
  170. transition: background-color 0.3s ease;
  171. text-decoration: none;
  172. text-align: center;
  173. margin-right: 10px;
  174. margin-bottom: 10px;
  175. }
  176. .btn:hover {
  177. background-color: #ff4d4d;
  178. }
  179. .btn-secondary {
  180. background-color: var(--secondary-color);
  181. }
  182. .btn-secondary:hover {
  183. background-color: #37b0a8;
  184. }
  185. .play-button {
  186. position: absolute;
  187. display: block;
  188. top: 50%;
  189. left: 50%;
  190. transform: translate(-50%, -50%);
  191. width: 80px;
  192. height: 80px;
  193. background-color: rgba(255, 107, 107, 0.8);
  194. border-radius: 50%;
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. transition: all 0.3s ease;
  199. z-index: 110;
  200. /* 确保播放按钮在图片之上 */
  201. }
  202. .play-button:hover {
  203. background-color: rgba(255, 107, 107, 1);
  204. transform: translate(-50%, -50%) scale(1.1);
  205. }
  206. .play-button::after {
  207. content: "";
  208. width: 0;
  209. height: 0;
  210. border-top: 15px solid transparent;
  211. border-bottom: 15px solid transparent;
  212. border-left: 25px solid white;
  213. margin-left: 5px;
  214. }
  215. /* 按钮容器在底部 */
  216. .buttons {
  217. width: 100%;
  218. /* 占据全部宽度 */
  219. max-width: 550px;
  220. /* 限制最大宽度 */
  221. display: flex;
  222. flex-wrap: wrap;
  223. flex-direction: column;
  224. /* 按钮垂直排列 */
  225. justify-content: center;
  226. align-items: center;
  227. margin-top: 15px;
  228. /* 与上方内容留出间距,略微缩小 */
  229. flex-shrink: 0;
  230. /* 不会收缩 */
  231. }
  232. /* MARK: 微信引导层样式 */
  233. .wechat-guide-overlay {
  234. position: fixed;
  235. top: 0;
  236. left: 0;
  237. width: 100%;
  238. height: 100%;
  239. background-color: rgba(0, 0, 0, 0.75);
  240. /* 半透明黑色背景 */
  241. z-index: 9999;
  242. /* 确保在最上层 */
  243. display: none;
  244. /* 默认隐藏 */
  245. justify-content: center;
  246. align-items: center;
  247. color: white;
  248. font-size: 1.5rem;
  249. text-align: center;
  250. padding: 20px;
  251. box-sizing: border-box;
  252. flex-direction: column;
  253. }
  254. .wechat-guide-overlay.active {
  255. display: flex;
  256. /* 显示引导层 */
  257. }
  258. .wechat-guide-arrow {
  259. position: absolute;
  260. top: 10px;
  261. /* 箭头位置靠近右上角 */
  262. right: 20px;
  263. width: 80px;
  264. height: 80px;
  265. background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" transform="rotate(90 12 12)"/></svg>') no-repeat center center;
  266. background-size: contain;
  267. transform: rotate(90deg);
  268. /* 旋转箭头指向右下 */
  269. }
  270. .wechat-guide-text {
  271. margin-top: 100px;
  272. /* 留出箭头空间 */
  273. line-height: 1.8;
  274. }
  275. .wechat-guide-text strong {
  276. color: var(--accent-color);
  277. /* 突出显示关键文字 */
  278. }
  279. @media (max-width: 768px) {
  280. body {
  281. padding: 10px;
  282. /* 移动端减小内边距 */
  283. }
  284. .app-title {
  285. font-size: 1.5rem;
  286. /* 移动端标题进一步调小 */
  287. margin-bottom: 10px;
  288. /* 移动端调整间距 */
  289. }
  290. .app-icon img {
  291. width: 70px;
  292. /* 移动端图标进一步调小 */
  293. height: 70px;
  294. }
  295. .buttons {
  296. margin-top: 15px;
  297. /* 移动端调整间距 */
  298. }
  299. .btn {
  300. min-width: 150px;
  301. /* 移动端按钮小一点 */
  302. font-size: 1rem;
  303. margin-right: 0;
  304. /* 垂直排列时不需要右边距 */
  305. }
  306. }
  307. </style>
  308. </head>
  309. <!-- Google tag (gtag.js) -->
  310. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JBGGVGLHTP"></script>
  311. <script>
  312. window.dataLayer = window.dataLayer || [];
  313. function gtag() { dataLayer.push(arguments); }
  314. gtag('js', new Date());
  315. gtag('config', 'G-JBGGVGLHTP');
  316. </script>
  317. <body>
  318. <div class="header-container">
  319. <div class="app-icon">
  320. <img src="/assets/icon/logo_640x640.webp" alt="Art Color App Logo">
  321. </div>
  322. <h1 class="app-title">🎨 ArtColor 🎨</h1>
  323. </div>
  324. <div class="image-canvas-container">
  325. <img id="poster-img" src="<%= imageUrl %>" alt="Art Color" />
  326. <canvas id="canvas"></canvas>
  327. <div id="play-button" class="play-button"></div>
  328. </div>
  329. <div class="buttons">
  330. <a href="<%= downlink %>" class="btn btn-secondary">
  331. <%= translate.downloadApp[lang] %>
  332. </a>
  333. <a href="<%= applink %>" target="_blank" class="btn btn-primary">
  334. Claim Bonus
  335. </a>
  336. </div>
  337. <!-- MARK: 微信引导层 -->
  338. <div id="wechat-guide-overlay" class="wechat-guide-overlay">
  339. <div class="wechat-guide-arrow" onclick="closeOverlay()"></div>
  340. <p class="wechat-guide-text">
  341. 请点击右上角 <strong>"..."</strong> 菜单<br>
  342. 选择 <strong>"在浏览器中打开"</strong><br>
  343. 即可跳转到 App 或下载页面
  344. </p>
  345. </div>
  346. <script>
  347. const wechatGuideOverlay = document.getElementById('wechat-guide-overlay');
  348. // MARK: 微信环境检测
  349. function isWeChatBrowser() {
  350. const ua = window.navigator.userAgent.toLowerCase();
  351. return ua.includes('micromessenger');
  352. }
  353. function closeOverlay() {
  354. wechatGuideOverlay.classList.remove('active');
  355. }
  356. if (isWeChatBrowser()) {
  357. wechatGuideOverlay.classList.add('active');
  358. console.log("检测到微信浏览器,显示引导层。");
  359. } else {
  360. wechatGuideOverlay.classList.remove('active'); // 确保隐藏
  361. }
  362. </script>
  363. </body>
  364. </html>