gallery.ejs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="icon" href="/assets/icon/favicon.ico" type="image/x-icon">
  7. <title>Free Printable Coloring Pages Gallery - 20,000+ Designs | Art Number Coloring</title>
  8. <meta name="description" content="Explore our massive collection of over 20,000 free coloring pages! Find endless printable designs from animals to mandalas, cartoons, and more. Perfect for kids and adults – start your creative journey today!">
  9. <link rel="stylesheet" href="/stylesheets/v2/styles.css">
  10. <style>
  11. .search-container {
  12. margin: 30px auto;
  13. max-width: 600px;
  14. position: relative;
  15. }
  16. .search-input {
  17. width: 100%;
  18. padding: 15px 20px;
  19. padding-right: 50px;
  20. border-radius: 30px;
  21. border: 2px solid var(--secondary-color);
  22. font-size: 1rem;
  23. outline: none;
  24. transition: all 0.3s ease;
  25. }
  26. .search-input:focus {
  27. border-color: var(--primary-color);
  28. box-shadow: 0 0 10px rgba(230, 138, 0, 0.2);
  29. }
  30. .search-button {
  31. position: absolute;
  32. right: 15px;
  33. top: 50%;
  34. transform: translateY(-50%);
  35. background: none;
  36. border: none;
  37. color: var(--accent-color);
  38. cursor: pointer;
  39. font-size: 1.2rem;
  40. transition: color 0.3s ease;
  41. }
  42. .search-button:hover {
  43. color: var(--primary-color);
  44. }
  45. .search-hint {
  46. text-align: center;
  47. margin-top: 15px;
  48. color: var(--light-text);
  49. font-size: 0.9rem;
  50. }
  51. .category-filters {
  52. display: flex;
  53. flex-wrap: wrap;
  54. gap: 10px;
  55. margin: 30px 0;
  56. justify-content: center;
  57. }
  58. .category-btn {
  59. background-color: var(--background-color);
  60. color: var(--text-color);
  61. border: 2px solid var(--secondary-color);
  62. padding: 10px 20px;
  63. border-radius: 25px;
  64. cursor: pointer;
  65. font-size: 1rem;
  66. transition: all 0.3s ease;
  67. }
  68. .category-btn:hover,
  69. .category-btn.active {
  70. background-color: var(--secondary-color);
  71. color: white;
  72. }
  73. .pagination {
  74. display: flex;
  75. justify-content: center;
  76. margin-top: 40px;
  77. gap: 8px;
  78. }
  79. .page-btn {
  80. width: 40px;
  81. height: 40px;
  82. border-radius: 50%;
  83. background-color: var(--background-color);
  84. color: var(--text-color);
  85. display: flex;
  86. align-items: center;
  87. justify-content: center;
  88. cursor: pointer;
  89. transition: all 0.3s ease;
  90. }
  91. .page-btn:hover,
  92. .page-btn.active {
  93. background-color: var(--primary-color);
  94. color: white;
  95. }
  96. .tag-cloud {
  97. margin-top: 20px;
  98. }
  99. .tag-cloud .tag-item {
  100. display: inline-block;
  101. text-decoration: none;
  102. padding: 5px 10px;
  103. margin: 5px;
  104. border-radius: 5px;
  105. cursor: pointer;
  106. transition: color 0.3s ease;
  107. }
  108. .tag-cloud a.active {
  109. font-size: 24px;
  110. font-weight: bold;
  111. }
  112. .tag-cloud .tag-item:hover {
  113. transform: scale(2.0); /* 悬停时放大 */
  114. }
  115. /* 设计师模块样式 */
  116. .designers-section {
  117. background-color: white;
  118. border-radius: 10px;
  119. padding: 30px;
  120. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  121. margin-bottom: 50px;
  122. }
  123. .designers-grid {
  124. display: grid;
  125. grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  126. gap: 30px;
  127. margin-top: 30px;
  128. }
  129. .designer-card {
  130. background-color: var(--background-color);
  131. border-radius: 10px;
  132. padding: 20px;
  133. text-align: center;
  134. transition: all 0.3s ease;
  135. cursor: pointer;
  136. }
  137. .designer-card:hover {
  138. transform: translateY(-5px);
  139. box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  140. }
  141. .designer-avatar {
  142. width: 120px;
  143. height: 120px;
  144. border-radius: 50%;
  145. overflow: hidden;
  146. margin: 0 auto 15px;
  147. border: 3px solid var(--secondary-color);
  148. transition: all 0.3s ease;
  149. }
  150. .designer-card:hover .designer-avatar {
  151. border-color: var(--primary-color);
  152. }
  153. .designer-avatar img {
  154. width: 100%;
  155. height: 100%;
  156. object-fit: cover;
  157. }
  158. .designer-name {
  159. font-size: 1.2rem;
  160. font-weight: 600;
  161. color: var(--text-color);
  162. margin-bottom: 5px;
  163. }
  164. .designer-specialty {
  165. font-size: 0.9rem;
  166. color: var(--light-text);
  167. margin-bottom: 10px;
  168. }
  169. .designer-stats {
  170. display: flex;
  171. justify-content: center;
  172. gap: 15px;
  173. margin-bottom: 0;
  174. }
  175. .designer-stat {
  176. text-align: center;
  177. }
  178. .stat-number {
  179. font-size: 1.3rem;
  180. font-weight: 700;
  181. color: var(--primary-color);
  182. }
  183. .stat-label {
  184. font-size: 0.8rem;
  185. color: var(--light-text);
  186. }
  187. @media (max-width: 768px) {
  188. .category-filters {
  189. justify-content: flex-start;
  190. }
  191. .category-btn {
  192. padding: 8px 15px;
  193. font-size: 0.9rem;
  194. }
  195. .designers-grid {
  196. grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  197. }
  198. }
  199. </style>
  200. <script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=685036ce6c1ae8001abaded7&product=sop' async='async'></script>
  201. </head>
  202. <!-- Google tag (gtag.js) -->
  203. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JBGGVGLHTP"></script>
  204. <script>
  205. window.dataLayer = window.dataLayer || [];
  206. function gtag() { dataLayer.push(arguments); }
  207. gtag('js', new Date());
  208. gtag('config', 'G-JBGGVGLHTP');
  209. </script>
  210. <body>
  211. <%- include('header') %>
  212. <main class="container">
  213. <section>
  214. <h1>Explore Coloring Pages</h1>
  215. <p>Discover over 20,000 free printable coloring pages for all ages. Browse our categories and find your next coloring project!</p>
  216. <!-- 搜索框 -->
  217. <div class="search-container">
  218. <input type="text" class="search-input" placeholder="Search for coloring pages..." value="<%= searchTerm || '' %>">
  219. <button class="search-button">🔍</button>
  220. </div>
  221. <div class="search-hint">Still haven't found the coloring page you want? Try a direct search.</div>
  222. <div class="category-filters">
  223. <a href="/coloring-page-gallery"><button class="category-btn" data-category="latest">Latest</button></a>
  224. <a href="?category=data_good"><button class="category-btn" data-category="data_good">Popular</button></a>
  225. <a href="?category=animal"><button class="category-btn" data-category="animal">Animal</button></a>
  226. <a href="?category=mandala"><button class="category-btn" data-category="mandala">Mandala</button></a>
  227. <a href="?category=people"><button class="category-btn" data-category="people">People</button></a>
  228. <a href="?category=scenery"><button class="category-btn" data-category="scenery">Scenery</button></a>
  229. <a href="?category=life"><button class="category-btn" data-category="life">Life</button></a>
  230. <a href="?category=fantasy"><button class="category-btn" data-category="fantasy">Fantasy</button></a>
  231. <a href="?category=place"><button class="category-btn" data-category="place">Places</button></a>
  232. <a href="?category=special_date"><button class="category-btn" data-category="special_date">Holiday</button></a>
  233. <a href="?category=food"><button class="category-btn" data-category="food">Food</button></a>
  234. <a href="?category=simple"><button class="category-btn" data-category="simple">Easy</button></a>
  235. <a href="?category=culture"><button class="category-btn" data-category="culture">Culture</button></a>
  236. <a href="?category=famous"><button class="category-btn" data-category="famous">Famous</button></a>
  237. <a href="?category=patterns"><button class="category-btn" data-category="patterns">Patterns</button></a>
  238. <a href="?category=zentangle"><button class="category-btn" data-category="zentangle">Zentangle</button></a>
  239. <a href="?category=zen"><button class="category-btn" data-category="zen">Zen</button></a>
  240. <a href="?category=bird"><button class="category-btn" data-category="bird">Bird</button></a>
  241. </div>
  242. <div class="coloring-grid">
  243. <% data.forEach(item=> { %>
  244. <div class="coloring-card">
  245. <div data-content-id="<%= item._id %>" class="coloring-image">
  246. <a href="<%= item.uri %>"><img src="<%= item.thumb %>" alt="<%= item.title %>"></a>
  247. </div>
  248. <div class="coloring-content">
  249. <div class="coloring-title"><%= item.title %></div>
  250. <div class="coloring-author">by <a href="/coloring-page-gallery?author=<%= item.user.username %>"><%= item.user.username %></a></div>
  251. <div class="coloring-meta">
  252. <div class="date"><%= item.publishTime %></div>
  253. <div class="views"><%= item.totalStartCount %></div>
  254. </div>
  255. <div class="coloring-tags">
  256. <% item.tags.forEach(tag=> { %>
  257. <a href="/coloring-page-gallery?category=<%= tag %>"><span class="tag" data-tag="<%= tag %>"><%= tag %></span></a>
  258. <% }); %>
  259. </div>
  260. </div>
  261. </div>
  262. <% }); %>
  263. <% if (!data || data.length <= 0) { %>
  264. <div class="no-results" style="grid-column: 1 / -1; text-align: center; padding: 50px 0;">
  265. <img src="/assets/icon/noresult.webp" alt="No Results" style="width: 400px; margin-bottom: 20px; opacity: 0.5;border-radius: 20px;">
  266. <h3>No coloring pages found</h3>
  267. <p>Try adjusting your search terms or filters.</p>
  268. </div>
  269. <% } %>
  270. </div>
  271. <% if (data && data.length > 0) { %>
  272. <%- include('pagination') %>
  273. <% } %>
  274. </section>
  275. <section>
  276. <h2>More categories to explore your favorite coloring pages</h2>
  277. <div class="tag-cloud">
  278. <% tags.forEach(item=> { %>
  279. <a href="?category=<%= item.tag %>" class="tag-item <%= item.tag == tag ? 'active' : '' %>" style="color: <%= item.color %>;"><%= item.tag == 'data_good' ? 'popular' : item.tag %></a>
  280. <% }); %>
  281. </div>
  282. </section>
  283. <section class="designers-section">
  284. <h2>Meet Our Creative Designers</h2>
  285. <p>These talented artists create all the beautiful coloring pages you find on our site. Each designer brings their unique style and expertise to our collection.</p>
  286. <div class="designers-grid">
  287. <% designers.forEach(item=> { %>
  288. <a href="/coloring-page-gallery?author=<%= item.username %>">
  289. <div class="designer-card" data-author="<%= item.username %>">
  290. <div class="designer-avatar">
  291. <img src="<%= item.avatar %>" alt="<%= item.username %>">
  292. </div>
  293. <div class="designer-name"><%= item.username %></div>
  294. <div class="designer-stats">
  295. <div class="designer-stat">
  296. <div class="stat-number"><%= item.count %></div>
  297. <div class="stat-label">Designs</div>
  298. </div>
  299. </div>
  300. </div>
  301. </a>
  302. <% }); %>
  303. </div>
  304. </section>
  305. </main>
  306. <%- include('footer') %>
  307. <script src="/scripts/script.js"></script>
  308. <script src="/scripts/progress2.js"></script>
  309. <script>
  310. // 分类选中
  311. const categoryButtons = document.querySelectorAll('.category-btn');
  312. categoryButtons.forEach(button => {
  313. const category = button.getAttribute('data-category');
  314. if (category == '<%= tag %>') {
  315. button.classList.add('active');
  316. }
  317. });
  318. // 搜索功能
  319. const searchInput = document.querySelector('.search-input');
  320. const searchButton = document.querySelector('.search-button');
  321. function performSearch() {
  322. const searchTerm = searchInput.value.trim();
  323. if (searchTerm) {
  324. window.location.href = `?search=${encodeURIComponent(searchTerm)}`;
  325. } else {
  326. // 如果搜索框为空,显示所有结果
  327. window.location.href = '';
  328. }
  329. }
  330. searchButton.addEventListener('click', performSearch);
  331. searchInput.addEventListener('keypress', (e) => {
  332. if (e.key === 'Enter') {
  333. performSearch();
  334. }
  335. });
  336. </script>
  337. </body>
  338. </html>