gallery.ejs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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. <script type="application/ld+json">
  209. {
  210. "@context": "https://schema.org",
  211. "@type": "CollectionPage",
  212. "name": "Free Printable Coloring Pages Gallery - 20,000+ Designs | Art Color",
  213. "description": "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.",
  214. "url": "https://art.pcoloring.com/coloring-page-gallery",
  215. "publisher": {
  216. "@type": "Organization",
  217. "name": "Art Color",
  218. "url": "https://art.pcoloring.com",
  219. "logo": {
  220. "@type": "ImageObject",
  221. "url": "https://art.pcoloring.com/assets/icon/favicon.ico"
  222. }
  223. }
  224. }
  225. </script>
  226. </head>
  227. <!-- Google tag (gtag.js) -->
  228. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JBGGVGLHTP"></script>
  229. <script>
  230. window.dataLayer = window.dataLayer || [];
  231. function gtag() { dataLayer.push(arguments); }
  232. gtag('js', new Date());
  233. gtag('config', 'G-JBGGVGLHTP');
  234. </script>
  235. <body>
  236. <%- include('header') %>
  237. <main class="container">
  238. <section>
  239. <h1>Explore Coloring Pages</h1>
  240. <p>Discover over 20,000 free printable coloring pages for all ages. Browse our categories and find your next
  241. coloring project!</p>
  242. <!-- 搜索框 -->
  243. <div class="search-container">
  244. <input type="text" class="search-input" placeholder="Search for coloring pages..."
  245. value="<%= searchTerm || '' %>">
  246. <button class="search-button">🔍</button>
  247. </div>
  248. <div class="search-hint">Still haven't found the coloring page you want? Try a direct search.</div>
  249. <div class="category-filters">
  250. <a href="/coloring-page-gallery"><button class="category-btn" data-category="latest">Latest</button></a>
  251. <a href="?category=data_good"><button class="category-btn" data-category="data_good">Popular</button></a>
  252. <a href="?category=animal"><button class="category-btn" data-category="animal">Animal</button></a>
  253. <a href="?category=mandala"><button class="category-btn" data-category="mandala">Mandala</button></a>
  254. <a href="?category=people"><button class="category-btn" data-category="people">People</button></a>
  255. <a href="?category=scenery"><button class="category-btn" data-category="scenery">Scenery</button></a>
  256. <a href="?category=life"><button class="category-btn" data-category="life">Life</button></a>
  257. <a href="?category=fantasy"><button class="category-btn" data-category="fantasy">Fantasy</button></a>
  258. <a href="?category=place"><button class="category-btn" data-category="place">Places</button></a>
  259. <a href="?category=special_date"><button class="category-btn"
  260. data-category="special_date">Holiday</button></a>
  261. <a href="?category=food"><button class="category-btn" data-category="food">Food</button></a>
  262. <a href="?category=simple"><button class="category-btn" data-category="simple">Easy</button></a>
  263. <a href="?category=culture"><button class="category-btn" data-category="culture">Culture</button></a>
  264. <a href="?category=famous"><button class="category-btn" data-category="famous">Famous</button></a>
  265. <a href="?category=patterns"><button class="category-btn" data-category="patterns">Patterns</button></a>
  266. <a href="?category=zentangle"><button class="category-btn" data-category="zentangle">Zentangle</button></a>
  267. <a href="?category=zen"><button class="category-btn" data-category="zen">Zen</button></a>
  268. <a href="?category=bird"><button class="category-btn" data-category="bird">Bird</button></a>
  269. </div>
  270. <div class="coloring-grid">
  271. <% data.forEach(item=> { %>
  272. <div class="coloring-card">
  273. <div data-content-id="<%= item._id %>" class="coloring-image">
  274. <a href="<%= item.uri %>"><img src="<%= item.thumb %>" alt="<%= item.title %>"></a>
  275. </div>
  276. <div class="coloring-content">
  277. <div class="coloring-title">
  278. <%= item.title %>
  279. </div>
  280. <div class="coloring-author">by <a href="/coloring-page-gallery?author=<%= item.user.username %>">
  281. <%= item.user.username %>
  282. </a></div>
  283. <div class="coloring-meta">
  284. <div class="date">
  285. <%= item.publishTime %>
  286. </div>
  287. <div class="views">
  288. <%= item.totalStartCount %>
  289. </div>
  290. </div>
  291. <div class="coloring-tags">
  292. <% item.tags.forEach(tag=> { %>
  293. <a href="/coloring-page-gallery?category=<%= tag %>"><span class="tag" data-tag="<%= tag %>">
  294. <%= tag %>
  295. </span></a>
  296. <% }); %>
  297. </div>
  298. </div>
  299. </div>
  300. <% }); %>
  301. <% if (!data || data.length <=0) { %>
  302. <div class="no-results" style="grid-column: 1 / -1; text-align: center; padding: 50px 0;">
  303. <img src="/assets/icon/noresult.webp" alt="No Results"
  304. style="width: 400px; margin-bottom: 20px; opacity: 0.5;border-radius: 20px;">
  305. <h3>No coloring pages found</h3>
  306. <p>Try adjusting your search terms or filters.</p>
  307. </div>
  308. <% } %>
  309. </div>
  310. <% if (data && data.length> 0) { %>
  311. <%- include('pagination') %>
  312. <% } %>
  313. </section>
  314. <section>
  315. <h2>More categories to explore your favorite coloring pages</h2>
  316. <div class="tag-cloud">
  317. <% tags.forEach(item=> { %>
  318. <a href="?category=<%= item.tag %>" class="tag-item <%= item.tag == tag ? 'active' : '' %>"
  319. style="color: <%= item.color %>;">
  320. <%= item.tag=='data_good' ? 'popular' : item.tag %>
  321. </a>
  322. <% }); %>
  323. </div>
  324. </section>
  325. <section class="designers-section">
  326. <h2>Meet Our Creative Designers</h2>
  327. <p>These talented artists create all the beautiful coloring pages you find on our site. Each designer brings
  328. their unique style and expertise to our collection.</p>
  329. <div class="designers-grid">
  330. <% designers.forEach(item=> { %>
  331. <a href="/coloring-page-gallery?author=<%= item.username %>">
  332. <div class="designer-card" data-author="<%= item.username %>">
  333. <div class="designer-avatar">
  334. <img src="<%= item.avatar %>" alt="<%= item.username %>">
  335. </div>
  336. <div class="designer-name">
  337. <%= item.username %>
  338. </div>
  339. <div class="designer-stats">
  340. <div class="designer-stat">
  341. <div class="stat-number">
  342. <%= item.count %>
  343. </div>
  344. <div class="stat-label">Designs</div>
  345. </div>
  346. </div>
  347. </div>
  348. </a>
  349. <% }); %>
  350. </div>
  351. </section>
  352. </main>
  353. <%- include('footer') %>
  354. <script src="/scripts/script.js"></script>
  355. <script src="/scripts/progress2.js"></script>
  356. <script>
  357. // 分类选中
  358. const categoryButtons = document.querySelectorAll('.category-btn');
  359. categoryButtons.forEach(button => {
  360. const category = button.getAttribute('data-category');
  361. if (category == '<%= tag %>') {
  362. button.classList.add('active');
  363. }
  364. });
  365. // 搜索功能
  366. const searchInput = document.querySelector('.search-input');
  367. const searchButton = document.querySelector('.search-button');
  368. function performSearch() {
  369. const searchTerm = searchInput.value.trim();
  370. if (searchTerm) {
  371. window.location.href = `?search=${encodeURIComponent(searchTerm)}`;
  372. } else {
  373. // 如果搜索框为空,显示所有结果
  374. window.location.href = '';
  375. }
  376. }
  377. searchButton.addEventListener('click', performSearch);
  378. searchInput.addEventListener('keypress', (e) => {
  379. if (e.key === 'Enter') {
  380. performSearch();
  381. }
  382. });
  383. </script>
  384. </body>
  385. </html>