share-simple.ejs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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="og:url" content="<%= applink %>" />
  22. <meta property="al:ios:url" content="<%= applink %>" />
  23. <meta property="al:ios:app_store_id" content="1575480118" />
  24. <meta property="al:ios:app_name" content="Art Color" />
  25. <meta property="al:android:package" content="com.pcoloring.art.puzzle.color.by.number" />
  26. <meta property="al:android:url" content="<%= applink %>" />
  27. <meta property="al:android:app_name" content="Art Color" />
  28. <meta name="apple-itunes-app" content="app-id=1575480118">
  29. <link rel="icon" href="/assets/icon/favicon.ico" type="image/x-icon">
  30. <link rel="apple-touch-icon" sizes="180x180" href="/assets/icon/icon.png">
  31. <style>
  32. :root {
  33. --primary-color: #ff6b6b;
  34. --secondary-color: #4ecdc4;
  35. --accent-color: #ffd166;
  36. --background-color: #f9f9f9;
  37. --text-color: #333;
  38. --light-text: #666;
  39. --border-color: #e0e0e0;
  40. }
  41. body {
  42. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  43. display: flex;
  44. flex-direction: column;
  45. height: 92vh;
  46. margin: 0;
  47. box-sizing: border-box;
  48. background-color: var(--background-color);
  49. color: var(--text-color);
  50. line-height: 1.6;
  51. align-items: center;
  52. }
  53. /* 头部容器 */
  54. .header-container {
  55. width: 100%;
  56. margin-top: 10px;
  57. display: flex;
  58. flex-direction: column;
  59. align-items: center;
  60. justify-content: center;
  61. flex-shrink: 0;
  62. z-index: 100;
  63. }
  64. .app-icon {
  65. display: flex;
  66. justify-content: center;
  67. align-items: center;
  68. margin: 0 auto;
  69. overflow: hidden;
  70. }
  71. .app-icon img {
  72. width: 64px;
  73. height: 64px;
  74. border: 3px solid #eeeeee;
  75. border-radius: 10px;
  76. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  77. object-fit: contain;
  78. }
  79. .app-title {
  80. color: var(--text-color);
  81. font-size: 1.8rem;
  82. font-weight: 700;
  83. margin-bottom: 15px;
  84. text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  85. text-align: center;
  86. }
  87. /* 父容器,用于包裹图片和 Canvas,并使其相对定位 */
  88. .image-canvas-container {
  89. position: relative;
  90. max-width: 90%;
  91. height: auto;
  92. display: inline-block;
  93. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  94. border-radius: 12px;
  95. overflow: hidden;
  96. }
  97. /* 占位容器:全屏覆盖 */
  98. .image-placeholder {
  99. position: absolute;
  100. top: 0;
  101. left: 0;
  102. height: 100%;
  103. width: 100%;
  104. background-color: var(--background-color);
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. z-index: 20;
  109. /* 位于 canvas 之上,图片之下 */
  110. }
  111. /* 简单的加载动画(旋转圆圈) */
  112. .loading-spinner {
  113. width: 40px;
  114. height: 40px;
  115. border: 4px solid #ddd;
  116. border-top: 4px solid var(--primary-color);
  117. border-radius: 50%;
  118. animation: spin 1s linear infinite;
  119. }
  120. @keyframes spin {
  121. 0% {
  122. transform: rotate(0deg);
  123. }
  124. 100% {
  125. transform: rotate(360deg);
  126. }
  127. }
  128. /* 图片样式:使其响应式并填充容器 */
  129. .image-canvas-container img {
  130. position: relative;
  131. display: block;
  132. max-width: 100%;
  133. height: 100%;
  134. object-fit: contain;
  135. border-radius: 12px;
  136. z-index: 100;
  137. }
  138. /* 图片加载前隐藏,避免破碎的加载体验 */
  139. #poster-img {
  140. opacity: 0;
  141. transition: opacity 0.3s ease;
  142. /* 加载完成后淡入 */
  143. }
  144. /* 图片加载完成后显示 */
  145. #poster-img.loaded {
  146. opacity: 1;
  147. }
  148. /* Canvas 样式:绝对定位,与图片完全重叠 */
  149. .image-canvas-container canvas {
  150. position: absolute;
  151. top: 0;
  152. left: 0;
  153. width: 100%;
  154. height: 100%;
  155. border-radius: 12px;
  156. z-index: 50;
  157. }
  158. /* 按钮容器在底部 */
  159. .buttons {
  160. width: 100%;
  161. max-width: 550px;
  162. display: flex;
  163. flex-wrap: wrap;
  164. flex-direction: column;
  165. justify-content: center;
  166. align-items: center;
  167. margin-top: 30px;
  168. flex-shrink: 0;
  169. z-index: 100;
  170. }
  171. .btn {
  172. display: inline-block;
  173. min-width: 180px;
  174. background-color: var(--primary-color);
  175. color: white;
  176. border: none;
  177. padding: 10px 20px;
  178. border-radius: 20px;
  179. font-size: 1.1rem;
  180. font-weight: 500;
  181. cursor: pointer;
  182. transition: background-color 0.3s ease;
  183. text-decoration: none;
  184. text-align: center;
  185. margin-right: 10px;
  186. margin-bottom: 10px;
  187. }
  188. .btn:hover {
  189. background-color: #ff4d4d;
  190. }
  191. .btn-secondary {
  192. background-color: var(--secondary-color);
  193. }
  194. .btn-secondary:hover {
  195. background-color: #37b0a8;
  196. }
  197. .play-button {
  198. position: absolute;
  199. display: block;
  200. top: 50%;
  201. left: 50%;
  202. transform: translate(-50%, -50%);
  203. width: 80px;
  204. height: 80px;
  205. background-color: rgba(255, 107, 107, 0.8);
  206. border-radius: 50%;
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. transition: all 0.3s ease;
  211. z-index: 0;
  212. }
  213. .play-button:hover {
  214. background-color: rgba(255, 107, 107, 1);
  215. transform: translate(-50%, -50%) scale(1.1);
  216. }
  217. .play-button::after {
  218. content: "";
  219. width: 0;
  220. height: 0;
  221. border-top: 15px solid transparent;
  222. border-bottom: 15px solid transparent;
  223. border-left: 25px solid white;
  224. margin-left: 5px;
  225. }
  226. /* MARK: 微信引导层样式 */
  227. .wechat-guide-overlay {
  228. position: fixed;
  229. top: 0;
  230. left: 0;
  231. width: 100%;
  232. height: 100%;
  233. background-color: rgba(0, 0, 0, 0.75);
  234. /* 半透明黑色背景 */
  235. z-index: 9999;
  236. /* 确保在最上层 */
  237. display: none;
  238. /* 默认隐藏 */
  239. justify-content: center;
  240. align-items: center;
  241. color: white;
  242. font-size: 1.5rem;
  243. text-align: center;
  244. padding: 20px;
  245. box-sizing: border-box;
  246. flex-direction: column;
  247. }
  248. .wechat-guide-overlay.active {
  249. display: flex;
  250. /* 显示引导层 */
  251. }
  252. .wechat-guide-arrow {
  253. position: absolute;
  254. top: 10px;
  255. /* 箭头位置靠近右上角 */
  256. right: 20px;
  257. width: 80px;
  258. height: 80px;
  259. 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;
  260. background-size: contain;
  261. transform: rotate(90deg);
  262. /* 旋转箭头指向右下 */
  263. }
  264. .wechat-guide-text {
  265. margin-top: 100px;
  266. /* 留出箭头空间 */
  267. line-height: 1.8;
  268. }
  269. .wechat-guide-text strong {
  270. color: var(--accent-color);
  271. /* 突出显示关键文字 */
  272. }
  273. @media (max-width: 768px) {
  274. .app-title {
  275. font-size: 1.5rem;
  276. margin-bottom: 10px;
  277. }
  278. .btn {
  279. min-width: 150px;
  280. font-size: 1rem;
  281. margin-right: 0;
  282. }
  283. }
  284. </style>
  285. </head>
  286. <!-- Google tag (gtag.js) -->
  287. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JBGGVGLHTP"></script>
  288. <script>
  289. window.dataLayer = window.dataLayer || [];
  290. function gtag() { dataLayer.push(arguments); }
  291. gtag('js', new Date());
  292. gtag('config', 'G-JBGGVGLHTP');
  293. </script>
  294. <body>
  295. <div id="header" class="header-container">
  296. <div class="app-icon">
  297. <a href="/"><img src="/assets/icon/logo_640x640.webp" alt="Art Color App Logo"></a>
  298. </div>
  299. <div class="app-title">Art Color</div>
  300. </div>
  301. <div id="buttons" class="buttons">
  302. <a href="<%= openapplink %>" target="_blank" class="btn btn-primary">
  303. <%= translate.colorNow[lang] %>
  304. </a>
  305. <a href="<%= downlink %>" class="btn btn-secondary">
  306. <%= translate.downloadApp[lang] %>
  307. </a>
  308. </div>
  309. <!-- MARK: 微信引导层 -->
  310. <div id="wechat-guide-overlay" class="wechat-guide-overlay">
  311. <div class="wechat-guide-arrow" onclick="closeOverlay()"></div>
  312. <p class="wechat-guide-text">
  313. 请点击右上角 <strong>"..."</strong> 菜单<br>
  314. 选择 <strong>"在浏览器中打开"</strong><br>
  315. 即可跳转到 App 或下载页面
  316. </p>
  317. </div>
  318. <script>
  319. const wechatGuideOverlay = document.getElementById('wechat-guide-overlay');
  320. // MARK: 微信环境检测
  321. function isWeChatBrowser() {
  322. const ua = window.navigator.userAgent.toLowerCase();
  323. return ua.includes('micromessenger');
  324. }
  325. function closeOverlay() {
  326. wechatGuideOverlay.classList.remove('active');
  327. }
  328. if (isWeChatBrowser()) {
  329. wechatGuideOverlay.classList.add('active');
  330. console.log("检测到微信浏览器,显示引导层。");
  331. } else {
  332. wechatGuideOverlay.classList.remove('active'); // 确保隐藏
  333. }
  334. </script>
  335. </body>
  336. </html>