Changes to wallhub.scroll.pub

root
root
25 days ago
Initial commit
.log.txt
Changed around line 1
+ read wallhub.scroll.pub https://hub.scroll.pub/edit.html?folderName=wallhub.scroll.pub 1735315738077 ::ffff:175.157.180.153 0.0 200 Chrome.131 WindowsNT.10.0
+ read wallhub.scroll.pub https://hub.scroll.pub/ls.json?folderName=wallhub.scroll.pub 1735315740044 ::ffff:175.157.180.153 0.0 200 Chrome.131 WindowsNT.10.0
+ read wallhub.scroll.pub https://hub.scroll.pub/readFile.htm?folderName=wallhub.scroll.pub&filePath=wallhub.scroll.pub%2Findex.scroll 1735315740376 ::ffff:175.157.180.153 0.0 200 Chrome.131 WindowsNT.10.0
.stats.json
Changed around line 1
+ {
+ "files": [
+ "body.html",
+ "index.scroll",
+ "prompt.json",
+ "readme.scroll",
+ "script.js",
+ "style.css"
+ ],
+ "stats": {
+ "folder": "wallhub.scroll.pub",
+ "folderLink": "http://wallhub.scroll.pub",
+ "created": "2024-12-27T16:08:57.000Z",
+ "revised": "2024-12-27T16:08:57.000Z",
+ "files": 6,
+ "mb": 1,
+ "revisions": 1,
+ "hash": "2834bf37c3"
+ }
+ }
body.html
Changed around line 1
-

WallHub

-

Discover stunning wallpapers for every device

+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-

Powered by Pexels API

-
+

WallHub - Curated Wallpapers For Everyone

+

Powered by Unsplash API

+
index.html
Changed around line 1
+
+
+
+
+ WallHub - Free Wallpaper Hub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

WallHub

+

Discover stunning wallpapers for every device

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Powered by Pexels API

+
+
+
+
index.scroll
Changed around line 2: buildHtml
- title WallHub - Free Wallpaper Hub
+ title WallHub - Beautiful Free Wallpapers
- script.js
+ script.js
prompt.json
Changed around line 1
- "id": "40ba897a-90b9-4f55-a371-9961205bd22e",
- "object": "chat.completion",
- "created": 1735315718,
- "model": "deepseek-chat",
- "choices": [
+ "id": "msg_01DNVU1qj4dJ7MaGJ3VMY5wC",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
- "index": 0,
- "message": {
- "role": "assistant",
- "content": "---domain---\nwallhub.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://wallhub.scroll.pub\nmetaTags\neditButton /edit.html\ntitle WallHub - Free Wallpaper Hub\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

WallHub

\n

Discover stunning wallpapers for every device

\n
\n\n
\n
\n \n \n
\n\n
\n \n
\n\n \n
\n\n
\n

Powered by Pexels API

\n
\n---style.css---\n:root {\n --primary-color: #1a1a1a;\n --secondary-color: #ffffff;\n --accent-color: #ff4757;\n --bg-color: #0a0a0a;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n background-color: var(--bg-color);\n color: var(--secondary-color);\n line-height: 1.6;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n text-align: center;\n padding: 2rem;\n background: linear-gradient(135deg, var(--primary-color), var(--bg-color));\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.search {\n display: flex;\n justify-content: center;\n gap: 1rem;\n padding: 2rem;\n}\n\ninput[type=\"text\"] {\n padding: 0.8rem;\n border: 2px solid var(--primary-color);\n border-radius: 25px;\n width: 300px;\n background-color: var(--primary-color);\n color: var(--secondary-color);\n font-size: 1rem;\n}\n\nbutton {\n padding: 0.8rem 1.5rem;\n background-color: var(--accent-color);\n color: var(--secondary-color);\n border: none;\n border-radius: 25px;\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: #ff6b81;\n}\n\n.wallpapers {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1rem;\n padding: 2rem;\n}\n\n.wallpaper {\n position: relative;\n overflow: hidden;\n border-radius: 15px;\n aspect-ratio: 16/9;\n background-color: var(--primary-color);\n}\n\n.wallpaper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.wallpaper:hover img {\n transform: scale(1.1);\n}\n\n.load-more {\n margin: 2rem auto;\n display: block;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n margin-top: auto;\n background-color: var(--primary-color);\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n\n .search {\n flex-direction: column;\n align-items: center;\n }\n\n input[type=\"text\"] {\n width: 100%;\n }\n}\n---script.js---\nlet currentPage = 1;\nconst perPage = 15;\n\nasync function fetchWallpapers(query = '', page = 1) {\n const url = `https://api.pexels.com/v1/search?query=${query}&per_page=${perPage}&page=${page}`;\n \n try {\n const response = await fetch(url, {\n headers: {\n Authorization: 'YOUR_PEXELS_API_KEY'\n }\n });\n const data = await response.json();\n displayWallpapers(data.photos);\n } catch (error) {\n console.error('Error fetching wallpapers:', error);\n }\n}\n\nfunction displayWallpapers(photos) {\n const container = document.getElementById('wallpapersContainer');\n \n if (currentPage === 1) {\n container.innerHTML = '';\n }\n\n photos.forEach(photo => {\n const wallpaper = document.createElement('div');\n wallpaper.className = 'wallpaper';\n wallpaper.innerHTML = `\n \"${photo.photographer}\"\n `;\n container.appendChild(wallpaper);\n });\n}\n\ndocument.getElementById('searchBtn').addEventListener('click', () => {\n const query = document.getElementById('searchInput').value;\n currentPage = 1;\n fetchWallpapers(query);\n});\n\ndocument.getElementById('loadMore').addEventListener('click', () => {\n const query = document.getElementById('searchInput').value;\n currentPage++;\n fetchWallpapers(query, currentPage);\n});\n\n// Initial load\nfetchWallpapers();\n---end---"
- },
- "logprobs": null,
- "finish_reason": "stop"
+ "type": "text",
+ "text": "I'll help create a wallpaper hub website. For the domain, I suggest:\n\n---domain---\nwallhub.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://wallhub.scroll.pub\nmetaTags\neditButton /edit.html\ntitle WallHub - Beautiful Free Wallpapers\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n \n
\n\n
\n
\n \n
\n \n
\n \n
\n\n
\n
\n
\n
\n\n
\n

WallHub - Curated Wallpapers For Everyone

\n

Powered by Unsplash API

\n
\n\n---style.css---\n:root {\n --primary: #2a2a72;\n --secondary: #009ffd;\n --text: #333;\n --bg: #f5f5f5;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n background: var(--bg);\n color: var(--text);\n line-height: 1.6;\n}\n\nheader {\n background: linear-gradient(135deg, var(--primary), var(--secondary));\n padding: 1rem;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.logo {\n font-size: 2rem;\n font-weight: bold;\n color: white;\n text-shadow: 2px 2px 4px rgba(0,0,0,0.2);\n}\n\n.search-bar {\n display: flex;\n gap: 0.5rem;\n}\n\ninput[type=\"search\"] {\n flex: 1;\n padding: 0.8rem;\n border: none;\n border-radius: 25px;\n font-size: 1rem;\n}\n\nbutton {\n padding: 0.8rem 1.5rem;\n border: none;\n border-radius: 25px;\n background: var(--primary);\n color: white;\n cursor: pointer;\n transition: transform 0.2s;\n}\n\nbutton:hover {\n transform: translateY(-2px);\n}\n\n.categories {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n\n.categories button {\n background: rgba(255,255,255,0.2);\n}\n\n.categories button.active {\n background: white;\n color: var(--primary);\n}\n\n.wallpaper-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 1.5rem;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.wallpaper-card {\n position: relative;\n border-radius: 15px;\n overflow: hidden;\n transition: transform 0.3s;\n box-shadow: 0 4px 15px rgba(0,0,0,0.1);\n}\n\n.wallpaper-card:hover {\n transform: translateY(-5px);\n}\n\n.wallpaper-card img {\n width: 100%;\n height: 200px;\n object-fit: cover;\n}\n\n.loading {\n text-align: center;\n padding: 2rem;\n}\n\n.spinner {\n width: 50px;\n height: 50px;\n border: 5px solid var(--bg);\n border-top-color: var(--secondary);\n border-radius: 50%;\n animation: spin 1s linear infinite;\n margin: 0 auto;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n nav {\n gap: 1.5rem;\n }\n \n .wallpaper-grid {\n padding: 1rem;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n }\n}\n\n---script.js---\nconst API_KEY = 'YOUR_UNSPLASH_API_KEY'; // Replace with actual API key\nconst wallpaperGrid = document.getElementById('wallpaperGrid');\nconst loading = document.getElementById('loading');\nlet page = 1;\n\nasync function fetchWallpapers(query = '') {\n loading.style.display = 'block';\n try {\n const url = query\n ? `https://api.unsplash.com/search/photos?page=${page}&query=${query}&per_page=20`\n : `https://api.unsplash.com/photos?page=${page}&per_page=20`;\n \n const response = await fetch(url, {\n headers: {\n 'Authorization': `Client-ID ${API_KEY}`\n }\n });\n \n const data = await response.json();\n const images = query ? data.results : data;\n \n images.forEach(image => {\n const card = createWallpaperCard(image);\n wallpaperGrid.appendChild(card);\n });\n } catch (error) {\n console.error('Error fetching wallpapers:', error);\n } finally {\n loading.style.display = 'none';\n }\n}\n\nfunction createWallpaperCard(image) {\n const card = document.createElement('div');\n card.className = 'wallpaper-card';\n \n const img = document.createElement('img');\n img.src = image.urls.regular;\n img.alt = image.alt_description || 'Wallpaper';\n img.loading = 'lazy';\n \n card.appendChild(img);\n \n card.addEventListener('click', () => {\n window.open(image.urls.full, '_blank');\n });\n \n return card;\n}\n\n// Infinite scroll\nwindow.addEventListener('scroll', () => {\n if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 1000) {\n page++;\n fetchWallpapers();\n }\n});\n\n// Search functionality\nconst searchBtn = document.getElementById('searchBtn');\nconst searchInput = document.getElementById('search');\n\nsearchBtn.addEventListener('click', () => {\n const query = searchInput.value.trim();\n wallpaperGrid.innerHTML = '';\n page = 1;\n fetchWallpapers(query);\n});\n\nsearchInput.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') {\n searchBtn.click();\n }\n});\n\n// Category filters\ndocument.querySelectorAll('.categories button').forEach(button => {\n button.addEventListener('click', () => {\n document.querySelector('.categories .active').classList.remove('active');\n button.classList.add('active');\n wallpaperGrid.innerHTML = '';\n page = 1;\n fetchWallpapers(button.dataset.category === 'all' ? '' : button.dataset.category);\n });\n});\n\n// Initial load\nfetchWallpapers();\n\n---end---\n\nThis implementation creates a beautiful, responsive wallpaper hub website that:\n- Uses the Unsplash API to fetch high-quality images\n- Features infinite scroll for continuous loading\n- Includes search functionality\n- Has category filtering\n- Implements a clean, modern design with smooth animations\n- Is fully responsive for all screen sizes\n- Includes loading states and error handling\n- Uses semantic HTML and follows accessibility guidelines\n\nNote: You'll need to replace 'YOUR_UNSPLASH_API_KEY' in the JavaScript with an actual Unsplash API key to make it work."
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
- "prompt_tokens": 251,
- "completion_tokens": 1164,
- "total_tokens": 1415,
- "prompt_cache_hit_tokens": 0,
- "prompt_cache_miss_tokens": 251
- },
- "system_fingerprint": "fp_f1afce2943"
+ "input_tokens": 291,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2280
+ }
readme.scroll
Changed around line 1
- Website generated by DeepSeek from prompt: i want a website that have serve as a wallpaper hub. use some free wallpaper api
+ Website generated by Claude from prompt: i want a website that have serve as a wallpaper hub. use some free wallpaper api
script.js
Changed around line 1
- let currentPage = 1;
- const perPage = 15;
+ const API_KEY = 'YOUR_UNSPLASH_API_KEY'; // Replace with actual API key
+ const wallpaperGrid = document.getElementById('wallpaperGrid');
+ const loading = document.getElementById('loading');
+ let page = 1;
- async function fetchWallpapers(query = '', page = 1) {
- const url = `https://api.pexels.com/v1/search?query=${query}&per_page=${perPage}&page=${page}`;
-
+ async function fetchWallpapers(query = '') {
+ loading.style.display = 'block';
+ const url = query
+ ? `https://api.unsplash.com/search/photos?page=${page}&query=${query}&per_page=20`
+ : `https://api.unsplash.com/photos?page=${page}&per_page=20`;
+
- Authorization: 'YOUR_PEXELS_API_KEY'
+ 'Authorization': `Client-ID ${API_KEY}`
+
- displayWallpapers(data.photos);
+ const images = query ? data.results : data;
+
+ images.forEach(image => {
+ const card = createWallpaperCard(image);
+ wallpaperGrid.appendChild(card);
+ });
+ } finally {
+ loading.style.display = 'none';
- function displayWallpapers(photos) {
- const container = document.getElementById('wallpapersContainer');
+ function createWallpaperCard(image) {
+ const card = document.createElement('div');
+ card.className = 'wallpaper-card';
- if (currentPage === 1) {
- container.innerHTML = '';
- }
-
- photos.forEach(photo => {
- const wallpaper = document.createElement('div');
- wallpaper.className = 'wallpaper';
- wallpaper.innerHTML = `
- ${photo.photographer}
- `;
- container.appendChild(wallpaper);
+ const img = document.createElement('img');
+ img.src = image.urls.regular;
+ img.alt = image.alt_description || 'Wallpaper';
+ img.loading = 'lazy';
+
+ card.appendChild(img);
+
+ card.addEventListener('click', () => {
+ window.open(image.urls.full, '_blank');
+
+ return card;
- document.getElementById('searchBtn').addEventListener('click', () => {
- const query = document.getElementById('searchInput').value;
- currentPage = 1;
+ // Infinite scroll
+ window.addEventListener('scroll', () => {
+ if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 1000) {
+ page++;
+ fetchWallpapers();
+ }
+ });
+
+ // Search functionality
+ const searchBtn = document.getElementById('searchBtn');
+ const searchInput = document.getElementById('search');
+
+ searchBtn.addEventListener('click', () => {
+ const query = searchInput.value.trim();
+ wallpaperGrid.innerHTML = '';
+ page = 1;
- document.getElementById('loadMore').addEventListener('click', () => {
- const query = document.getElementById('searchInput').value;
- currentPage++;
- fetchWallpapers(query, currentPage);
+ searchInput.addEventListener('keypress', (e) => {
+ if (e.key === 'Enter') {
+ searchBtn.click();
+ }
+ });
+
+ // Category filters
+ document.querySelectorAll('.categories button').forEach(button => {
+ button.addEventListener('click', () => {
+ document.querySelector('.categories .active').classList.remove('active');
+ button.classList.add('active');
+ wallpaperGrid.innerHTML = '';
+ page = 1;
+ fetchWallpapers(button.dataset.category === 'all' ? '' : button.dataset.category);
+ });
- fetchWallpapers();
+ fetchWallpapers();
style.css
Changed around line 1
- --primary-color: #1a1a1a;
- --secondary-color: #ffffff;
- --accent-color: #ff4757;
- --bg-color: #0a0a0a;
+ --primary: #2a2a72;
+ --secondary: #009ffd;
+ --text: #333;
+ --bg: #f5f5f5;
Changed around line 12
- font-family: 'Segoe UI', sans-serif;
- background-color: var(--bg-color);
- color: var(--secondary-color);
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ background: var(--bg);
+ color: var(--text);
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- text-align: center;
- padding: 2rem;
- background: linear-gradient(135deg, var(--primary-color), var(--bg-color));
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
+ padding: 1rem;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+ }
+
+ nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
- h1 {
- font-size: 2.5rem;
- margin-bottom: 0.5rem;
+ .logo {
+ font-size: 2rem;
+ font-weight: bold;
+ color: white;
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
- .search {
+ .search-bar {
- justify-content: center;
- gap: 1rem;
- padding: 2rem;
+ gap: 0.5rem;
- input[type="text"] {
+ input[type="search"] {
+ flex: 1;
- border: 2px solid var(--primary-color);
+ border: none;
- width: 300px;
- background-color: var(--primary-color);
- color: var(--secondary-color);
- background-color: var(--accent-color);
- color: var(--secondary-color);
+ background: var(--primary);
+ color: white;
- font-size: 1rem;
- transition: background-color 0.3s ease;
+ transition: transform 0.2s;
- background-color: #ff6b81;
+ transform: translateY(-2px);
+ }
+
+ .categories {
+ display: flex;
+ gap: 0.5rem;
+ flex-wrap: wrap;
+ }
+
+ .categories button {
+ background: rgba(255,255,255,0.2);
+ }
+
+ .categories button.active {
+ background: white;
+ color: var(--primary);
- .wallpapers {
+ .wallpaper-grid {
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 1rem;
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
+ gap: 1.5rem;
+ max-width: 1200px;
+ margin: 0 auto;
- .wallpaper {
+ .wallpaper-card {
- overflow: hidden;
- aspect-ratio: 16/9;
- background-color: var(--primary-color);
+ overflow: hidden;
+ transition: transform 0.3s;
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
+ }
+
+ .wallpaper-card:hover {
+ transform: translateY(-5px);
- .wallpaper img {
+ .wallpaper-card img {
- height: 100%;
+ height: 200px;
- transition: transform 0.3s ease;
- .wallpaper:hover img {
- transform: scale(1.1);
+ .loading {
+ text-align: center;
+ padding: 2rem;
+ }
+
+ .spinner {
+ width: 50px;
+ height: 50px;
+ border: 5px solid var(--bg);
+ border-top-color: var(--secondary);
+ border-radius: 50%;
+ animation: spin 1s linear infinite;
+ margin: 0 auto;
- .load-more {
- margin: 2rem auto;
- display: block;
+ @keyframes spin {
+ to { transform: rotate(360deg); }
- padding: 1rem;
- margin-top: auto;
- background-color: var(--primary-color);
+ padding: 2rem;
+ background: white;
+ margin-top: 2rem;
- h1 {
- font-size: 2rem;
+ nav {
+ gap: 1.5rem;
-
- .search {
- flex-direction: column;
- align-items: center;
- }
-
- input[type="text"] {
- width: 100%;
+
+ .wallpaper-grid {
+ padding: 1rem;
+ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
- }
+ }
root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+

WallHub

+

Discover stunning wallpapers for every device

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Powered by Pexels API

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://wallhub.scroll.pub
+ metaTags
+ editButton /edit.html
+ title WallHub - Free Wallpaper Hub
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "40ba897a-90b9-4f55-a371-9961205bd22e",
+ "object": "chat.completion",
+ "created": 1735315718,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nwallhub.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://wallhub.scroll.pub\nmetaTags\neditButton /edit.html\ntitle WallHub - Free Wallpaper Hub\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

WallHub

\n

Discover stunning wallpapers for every device

\n
\n\n
\n
\n \n \n
\n\n
\n \n
\n\n \n
\n\n
\n

Powered by Pexels API

\n
\n---style.css---\n:root {\n --primary-color: #1a1a1a;\n --secondary-color: #ffffff;\n --accent-color: #ff4757;\n --bg-color: #0a0a0a;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n background-color: var(--bg-color);\n color: var(--secondary-color);\n line-height: 1.6;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n text-align: center;\n padding: 2rem;\n background: linear-gradient(135deg, var(--primary-color), var(--bg-color));\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.search {\n display: flex;\n justify-content: center;\n gap: 1rem;\n padding: 2rem;\n}\n\ninput[type=\"text\"] {\n padding: 0.8rem;\n border: 2px solid var(--primary-color);\n border-radius: 25px;\n width: 300px;\n background-color: var(--primary-color);\n color: var(--secondary-color);\n font-size: 1rem;\n}\n\nbutton {\n padding: 0.8rem 1.5rem;\n background-color: var(--accent-color);\n color: var(--secondary-color);\n border: none;\n border-radius: 25px;\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: #ff6b81;\n}\n\n.wallpapers {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1rem;\n padding: 2rem;\n}\n\n.wallpaper {\n position: relative;\n overflow: hidden;\n border-radius: 15px;\n aspect-ratio: 16/9;\n background-color: var(--primary-color);\n}\n\n.wallpaper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.wallpaper:hover img {\n transform: scale(1.1);\n}\n\n.load-more {\n margin: 2rem auto;\n display: block;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n margin-top: auto;\n background-color: var(--primary-color);\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n\n .search {\n flex-direction: column;\n align-items: center;\n }\n\n input[type=\"text\"] {\n width: 100%;\n }\n}\n---script.js---\nlet currentPage = 1;\nconst perPage = 15;\n\nasync function fetchWallpapers(query = '', page = 1) {\n const url = `https://api.pexels.com/v1/search?query=${query}&per_page=${perPage}&page=${page}`;\n \n try {\n const response = await fetch(url, {\n headers: {\n Authorization: 'YOUR_PEXELS_API_KEY'\n }\n });\n const data = await response.json();\n displayWallpapers(data.photos);\n } catch (error) {\n console.error('Error fetching wallpapers:', error);\n }\n}\n\nfunction displayWallpapers(photos) {\n const container = document.getElementById('wallpapersContainer');\n \n if (currentPage === 1) {\n container.innerHTML = '';\n }\n\n photos.forEach(photo => {\n const wallpaper = document.createElement('div');\n wallpaper.className = 'wallpaper';\n wallpaper.innerHTML = `\n \"${photo.photographer}\"\n `;\n container.appendChild(wallpaper);\n });\n}\n\ndocument.getElementById('searchBtn').addEventListener('click', () => {\n const query = document.getElementById('searchInput').value;\n currentPage = 1;\n fetchWallpapers(query);\n});\n\ndocument.getElementById('loadMore').addEventListener('click', () => {\n const query = document.getElementById('searchInput').value;\n currentPage++;\n fetchWallpapers(query, currentPage);\n});\n\n// Initial load\nfetchWallpapers();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 251,
+ "completion_tokens": 1164,
+ "total_tokens": 1415,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 251
+ },
+ "system_fingerprint": "fp_f1afce2943"
+ }
readme.scroll
Changed around line 1
+ # wallhub.scroll.pub
+ Website generated by DeepSeek from prompt: i want a website that have serve as a wallpaper hub. use some free wallpaper api
script.js
Changed around line 1
+ let currentPage = 1;
+ const perPage = 15;
+
+ async function fetchWallpapers(query = '', page = 1) {
+ const url = `https://api.pexels.com/v1/search?query=${query}&per_page=${perPage}&page=${page}`;
+
+ try {
+ const response = await fetch(url, {
+ headers: {
+ Authorization: 'YOUR_PEXELS_API_KEY'
+ }
+ });
+ const data = await response.json();
+ displayWallpapers(data.photos);
+ } catch (error) {
+ console.error('Error fetching wallpapers:', error);
+ }
+ }
+
+ function displayWallpapers(photos) {
+ const container = document.getElementById('wallpapersContainer');
+
+ if (currentPage === 1) {
+ container.innerHTML = '';
+ }
+
+ photos.forEach(photo => {
+ const wallpaper = document.createElement('div');
+ wallpaper.className = 'wallpaper';
+ wallpaper.innerHTML = `
+ ${photo.photographer}
+ `;
+ container.appendChild(wallpaper);
+ });
+ }
+
+ document.getElementById('searchBtn').addEventListener('click', () => {
+ const query = document.getElementById('searchInput').value;
+ currentPage = 1;
+ fetchWallpapers(query);
+ });
+
+ document.getElementById('loadMore').addEventListener('click', () => {
+ const query = document.getElementById('searchInput').value;
+ currentPage++;
+ fetchWallpapers(query, currentPage);
+ });
+
+ // Initial load
+ fetchWallpapers();
style.css
Changed around line 1
+ :root {
+ --primary-color: #1a1a1a;
+ --secondary-color: #ffffff;
+ --accent-color: #ff4757;
+ --bg-color: #0a0a0a;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', sans-serif;
+ background-color: var(--bg-color);
+ color: var(--secondary-color);
+ line-height: 1.6;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ header {
+ text-align: center;
+ padding: 2rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--bg-color));
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .search {
+ display: flex;
+ justify-content: center;
+ gap: 1rem;
+ padding: 2rem;
+ }
+
+ input[type="text"] {
+ padding: 0.8rem;
+ border: 2px solid var(--primary-color);
+ border-radius: 25px;
+ width: 300px;
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ font-size: 1rem;
+ }
+
+ button {
+ padding: 0.8rem 1.5rem;
+ background-color: var(--accent-color);
+ color: var(--secondary-color);
+ border: none;
+ border-radius: 25px;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: background-color 0.3s ease;
+ }
+
+ button:hover {
+ background-color: #ff6b81;
+ }
+
+ .wallpapers {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1rem;
+ padding: 2rem;
+ }
+
+ .wallpaper {
+ position: relative;
+ overflow: hidden;
+ border-radius: 15px;
+ aspect-ratio: 16/9;
+ background-color: var(--primary-color);
+ }
+
+ .wallpaper img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ transition: transform 0.3s ease;
+ }
+
+ .wallpaper:hover img {
+ transform: scale(1.1);
+ }
+
+ .load-more {
+ margin: 2rem auto;
+ display: block;
+ }
+
+ footer {
+ text-align: center;
+ padding: 1rem;
+ margin-top: auto;
+ background-color: var(--primary-color);
+ }
+
+ @media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ .search {
+ flex-direction: column;
+ align-items: center;
+ }
+
+ input[type="text"] {
+ width: 100%;
+ }
+ }