share.ejs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="x-ua-compatible" content="ie=edge">
  5. <title>Art Color</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta name="description" content="Free Coloring Pages Paint Online!">
  8. <meta name="keywords" content="color, paint, app, ios, android, game">
  9. <meta property="og:site_name" content="art.pcoloring.com">
  10. <meta property="og:title" content="Art Color">
  11. <meta property="og:description" content="Free Coloring Pages Paint Online!">
  12. <meta property="og:image" content="<%= imageUrl %>">
  13. <meta property="og:type" content="website">
  14. <!-- MARK: Universal Link / Android App Link 的核心配置 -->
  15. <!-- 这些 meta 标签的值应该是完整的 HTTPS 链接,Facebook 会识别并尝试拉起 App -->
  16. <meta property="og:url" content="<%= applink %>" /> <!-- **Universal Link 路径** -->
  17. <meta property="al:ios:url" content="<%= applink %>" /> <!-- **Universal Link 路径** -->
  18. <meta property="al:ios:app_store_id" content="1575480118" /> <!-- **iOS App Store ID** -->
  19. <meta property="al:ios:app_name" content="Art Color Book" /> <!-- **iOS 应用名称** -->
  20. <meta property="al:android:package" content="com.pcoloring.art.puzzle.color.by.number" /> <!-- **Android 包名** -->
  21. <meta property="al:android:url" content="<%= applink %>" /> <!-- ** Universal Link 路径** -->
  22. <meta property="al:android:app_name" content="Art Color Book" /> <!-- **Android 应用名称** -->
  23. <meta name="apple-itunes-app" content="app-id=1575480118">
  24. <link rel="icon" href="/assets/icon/favicon.ico" type="image/x-icon">
  25. <link rel="apple-touch-icon" sizes="180x180" href="/assets/icon/icon.png">
  26. <script type="module" crossorigin src="/assets/share-C5-oqXHU.js"></script>
  27. <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
  28. <link rel="modulepreload" crossorigin href="/assets/WorkLayer-5uUyxw6h.js">
  29. <style>
  30. :root {
  31. --primary-color: #ff6b6b;
  32. --secondary-color: #4ecdc4;
  33. --accent-color: #ffd166;
  34. --background-color: #f9f9f9;
  35. --text-color: #333;
  36. --light-text: #666;
  37. --border-color: #e0e0e0;
  38. }
  39. body {
  40. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  41. display: flex;
  42. flex-direction: column;
  43. /* 垂直方向排列子元素 */
  44. justify-content: center;
  45. /* 垂直居中 */
  46. align-items: center;
  47. /* 水平居中 */
  48. min-height: 100vh;
  49. /* 最小高度为视口高度,确保垂直居中 */
  50. margin: 0;
  51. padding: 20px;
  52. box-sizing: border-box;
  53. /* 盒模型为边框盒 */
  54. background-color: var(--background-color);
  55. color: var(--text-color);
  56. line-height: 1.6;
  57. }
  58. /* 父容器,用于包裹图片和 Canvas,并使其相对定位 */
  59. .image-canvas-container {
  60. position: relative;
  61. max-width: 90%;
  62. /* 限制容器最大宽度 */
  63. height: auto;
  64. display: inline-block;
  65. /* 确保容器根据图片尺寸收缩 */
  66. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  67. /* 添加阴影效果 */
  68. border-radius: 12px;
  69. /* 圆角 */
  70. overflow: hidden;
  71. /* 隐藏超出容器的内容 */
  72. }
  73. /* 图片样式:使其响应式并填充容器 */
  74. .image-canvas-container img {
  75. position: relative;
  76. display: block;
  77. /* 移除图片底部空白 */
  78. max-width: 100%;
  79. /* 最大宽度为父容器的100% */
  80. height: auto;
  81. /* 高度自动调整,保持图片比例 */
  82. border-radius: 12px;
  83. /* 与容器相同的圆角 */
  84. z-index: 100;
  85. }
  86. /* Canvas 样式:绝对定位,与图片完全重叠 */
  87. .image-canvas-container canvas {
  88. position: absolute;
  89. top: 0;
  90. left: 0;
  91. width: 100%;
  92. height: 100%;
  93. border-radius: 12px;
  94. /* 与容器相同的圆角 */
  95. z-index: 50;
  96. }
  97. .btn {
  98. display: inline-block;
  99. background-color: var(--primary-color);
  100. color: white;
  101. border: none;
  102. padding: 10px 20px;
  103. border-radius: 5px;
  104. font-size: 1.1rem;
  105. font-weight: 500;
  106. cursor: pointer;
  107. transition: background-color 0.3s ease;
  108. text-decoration: none;
  109. text-align: center;
  110. margin-right: 10px;
  111. margin-bottom: 10px;
  112. }
  113. .btn:hover {
  114. background-color: #ff4d4d;
  115. }
  116. .btn-secondary {
  117. background-color: var(--secondary-color);
  118. }
  119. .btn-secondary:hover {
  120. background-color: #37b0a8;
  121. }
  122. .play-button {
  123. position: absolute;
  124. display: block;
  125. top: 50%;
  126. left: 50%;
  127. transform: translate(-50%, -50%);
  128. width: 80px;
  129. height: 80px;
  130. background-color: rgba(255, 107, 107, 0.8);
  131. border-radius: 50%;
  132. display: flex;
  133. align-items: center;
  134. justify-content: center;
  135. transition: all 0.3s ease;
  136. z-index: 0;
  137. }
  138. .play-button:hover {
  139. background-color: rgba(255, 107, 107, 1);
  140. transform: translate(-50%, -50%) scale(1.1);
  141. }
  142. .play-button::after {
  143. content: "";
  144. width: 0;
  145. height: 0;
  146. border-top: 15px solid transparent;
  147. border-bottom: 15px solid transparent;
  148. border-left: 25px solid white;
  149. margin-left: 5px;
  150. }
  151. .buttons {
  152. width: 100%;
  153. max-width: 550px;
  154. display: flex;
  155. flex-wrap: wrap;
  156. justify-content: space-between;
  157. align-items: center;
  158. margin-top: 40px;
  159. }
  160. /* MARK: 微信引导层样式 */
  161. .wechat-guide-overlay {
  162. position: fixed;
  163. top: 0;
  164. left: 0;
  165. width: 100%;
  166. height: 100%;
  167. background-color: rgba(0, 0, 0, 0.75);
  168. /* 半透明黑色背景 */
  169. z-index: 9999;
  170. /* 确保在最上层 */
  171. display: none;
  172. /* 默认隐藏 */
  173. justify-content: center;
  174. align-items: center;
  175. color: white;
  176. font-size: 1.5rem;
  177. text-align: center;
  178. padding: 20px;
  179. box-sizing: border-box;
  180. flex-direction: column;
  181. }
  182. .wechat-guide-overlay.active {
  183. display: flex;
  184. /* 显示引导层 */
  185. }
  186. .wechat-guide-arrow {
  187. position: absolute;
  188. top: 10px;
  189. /* 箭头位置靠近右上角 */
  190. right: 20px;
  191. width: 80px;
  192. height: 80px;
  193. 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;
  194. background-size: contain;
  195. transform: rotate(90deg);
  196. /* 旋转箭头指向右下 */
  197. }
  198. .wechat-guide-text {
  199. margin-top: 100px;
  200. /* 留出箭头空间 */
  201. line-height: 1.8;
  202. }
  203. .wechat-guide-text strong {
  204. color: var(--accent-color);
  205. /* 突出显示关键文字 */
  206. }
  207. </style>
  208. </head>
  209. <!-- Google tag (gtag.js) -->
  210. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JBGGVGLHTP"></script>
  211. <script>
  212. window.dataLayer = window.dataLayer || [];
  213. function gtag() { dataLayer.push(arguments); }
  214. gtag('js', new Date());
  215. gtag('config', 'G-JBGGVGLHTP');
  216. </script>
  217. <body>
  218. <div class="image-canvas-container">
  219. <img id="poster-img" src="<%= imageUrl %>" alt="Art Color" />
  220. <canvas id="canvas"></canvas>
  221. <div id="play-button" class="play-button"></div>
  222. </div>
  223. <div class="buttons">
  224. <a href="/">Home</a>
  225. <a href="<%= downlink %>" class="btn btn-secondary">Download App</a>
  226. <a href="/coloring-page/<%= id %>">Detail>></a>
  227. </div>
  228. </div>
  229. </div>
  230. <!-- MARK: 微信引导层 -->
  231. <div id="wechat-guide-overlay" class="wechat-guide-overlay">
  232. <div class="wechat-guide-arrow" onclick="closeOverlay()"></div>
  233. <p class="wechat-guide-text">
  234. 请点击右上角 <strong>"..."</strong> 菜单<br>
  235. 选择 <strong>"在浏览器中打开"</strong><br>
  236. 即可跳转到 App 或下载页面
  237. </p>
  238. </div>
  239. <script>
  240. const wechatGuideOverlay = document.getElementById('wechat-guide-overlay');
  241. // MARK: 微信环境检测
  242. function isWeChatBrowser() {
  243. const ua = window.navigator.userAgent.toLowerCase();
  244. return ua.includes('micromessenger');
  245. }
  246. function closeOverlay() {
  247. wechatGuideOverlay.classList.remove('active');
  248. }
  249. if (isWeChatBrowser()) {
  250. wechatGuideOverlay.classList.add('active');
  251. console.log("检测到微信浏览器,显示引导层。");
  252. } else {
  253. wechatGuideOverlay.classList.remove('active'); // 确保隐藏
  254. }
  255. </script>
  256. </body>
  257. </html>