gallery.ejs 13 KB

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