Changes to newsflash.scroll.pub

root
root
18 days ago
Initial commit
body.html
Changed around line 1
+
+

NewsFlash

+

Your window to the world's most important news

+
+
+
+
+
+
+
+
Fetching the latest news...
+
+
+
+
+

Stay informed. Stay ahead.

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://newsflash.scroll.pub
+ metaTags
+ editButton /edit.html
+ title NewsFlash - Global News at Your Fingertips
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "7fcb1548-f54c-4bf8-b8fc-02d3af2e9e58",
+ "object": "chat.completion",
+ "created": 1735973055,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nnewsflash.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://newsflash.scroll.pub\nmetaTags\neditButton /edit.html\ntitle NewsFlash - Global News at Your Fingertips\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

NewsFlash

\n

Your window to the world's most important news

\n
\n \n \n
\n
\n\n
\n
Fetching the latest news...
\n
\n
\n\n
\n

Stay informed. Stay ahead.

\n
\n---style.css---\n:root {\n --primary-color: #1a73e8;\n --text-color: #202124;\n --bg-color: #ffffff;\n --border-color: #dadce0;\n --hover-color: #f1f3f4;\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, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n color: var(--text-color);\n background-color: var(--bg-color);\n line-height: 1.6;\n padding: 1rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n color: var(--primary-color);\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.language-switcher {\n margin-top: 1rem;\n}\n\nbutton {\n background: none;\n border: 1px solid var(--border-color);\n padding: 0.5rem 1rem;\n margin: 0 0.5rem;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s ease;\n}\n\nbutton.active {\n background-color: var(--primary-color);\n color: white;\n border-color: var(--primary-color);\n}\n\nbutton:hover {\n background-color: var(--hover-color);\n}\n\n.news-container {\n display: grid;\n gap: 1.5rem;\n}\n\n.news-item {\n border: 1px solid var(--border-color);\n border-radius: 8px;\n padding: 1rem;\n transition: transform 0.2s ease;\n}\n\n.news-item:hover {\n transform: translateY(-2px);\n}\n\n.news-title {\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n font-size: 1.2rem;\n}\n\n.news-summary {\n color: var(--text-color);\n margin-bottom: 0.5rem;\n}\n\n.news-link {\n color: var(--primary-color);\n text-decoration: none;\n font-weight: 500;\n}\n\n.news-link::after {\n content: \"→\";\n margin-left: 0.5rem;\n transition: margin 0.2s ease;\n}\n\n.news-link:hover::after {\n margin-left: 1rem;\n}\n\n.loading {\n text-align: center;\n padding: 2rem;\n color: #5f6368;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n padding: 1rem;\n color: #5f6368;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n .news-container {\n gap: 1rem;\n }\n \n .news-item {\n padding: 0.75rem;\n }\n}\n---script.js---\nconst newsContainer = document.querySelector('.news-container');\nconst loading = document.querySelector('.loading');\nconst langEnBtn = document.getElementById('lang-en');\nconst langCnBtn = document.getElementById('lang-cn');\n\nlet currentLanguage = 'en';\n\n// Fetch news from multiple sources\nasync function fetchNews() {\n try {\n // Replace with actual API endpoints\n const response = await fetch('/api/news');\n const data = await response.json();\n displayNews(data);\n } catch (error) {\n console.error('Error fetching news:', error);\n loading.textContent = 'Failed to load news. Please try again later.';\n }\n}\n\nfunction displayNews(newsItems) {\n loading.style.display = 'none';\n newsContainer.innerHTML = newsItems.slice(0, 20).map(item => `\n \n `).join('');\n}\n\nfunction translateContent(language) {\n // Implement translation logic here\n // This would involve sending text to a translation API\n // and updating the content accordingly\n console.log(`Switching to ${language}`);\n}\n\nlangEnBtn.addEventListener('click', () => {\n if (currentLanguage !== 'en') {\n currentLanguage = 'en';\n langEnBtn.classList.add('active');\n langCnBtn.classList.remove('active');\n translateContent('en');\n }\n});\n\nlangCnBtn.addEventListener('click', () => {\n if (currentLanguage !== 'cn') {\n currentLanguage = 'cn';\n langCnBtn.classList.add('active');\n langEnBtn.classList.remove('active');\n translateContent('cn');\n }\n});\n\n// Initial load\nfetchNews();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 275,
+ "completion_tokens": 1282,
+ "total_tokens": 1557,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 275
+ },
+ "system_fingerprint": "fp_3a5770e1b4"
+ }
readme.scroll
Changed around line 1
+ # newsflash.scroll.pub
+ Website generated by DeepSeek from prompt: 实时读取全球各大新闻网站重要新闻,以标题、摘要重新组织后显示最新的20条并提供每条新闻的原始链接。提供选项将所有内容以中文或者英文显示(必要时先翻译)。
script.js
Changed around line 1
+ const newsContainer = document.querySelector('.news-container');
+ const loading = document.querySelector('.loading');
+ const langEnBtn = document.getElementById('lang-en');
+ const langCnBtn = document.getElementById('lang-cn');
+
+ let currentLanguage = 'en';
+
+ // Fetch news from multiple sources
+ async function fetchNews() {
+ try {
+ // Replace with actual API endpoints
+ const response = await fetch('/api/news');
+ const data = await response.json();
+ displayNews(data);
+ } catch (error) {
+ console.error('Error fetching news:', error);
+ loading.textContent = 'Failed to load news. Please try again later.';
+ }
+ }
+
+ function displayNews(newsItems) {
+ loading.style.display = 'none';
+ newsContainer.innerHTML = newsItems.slice(0, 20).map(item => `
+
+

${item.title}

+

${item.summary}

+
+
+ `).join('');
+ }
+
+ function translateContent(language) {
+ // Implement translation logic here
+ // This would involve sending text to a translation API
+ // and updating the content accordingly
+ console.log(`Switching to ${language}`);
+ }
+
+ langEnBtn.addEventListener('click', () => {
+ if (currentLanguage !== 'en') {
+ currentLanguage = 'en';
+ langEnBtn.classList.add('active');
+ langCnBtn.classList.remove('active');
+ translateContent('en');
+ }
+ });
+
+ langCnBtn.addEventListener('click', () => {
+ if (currentLanguage !== 'cn') {
+ currentLanguage = 'cn';
+ langCnBtn.classList.add('active');
+ langEnBtn.classList.remove('active');
+ translateContent('cn');
+ }
+ });
+
+ // Initial load
+ fetchNews();
style.css
Changed around line 1
+ :root {
+ --primary-color: #1a73e8;
+ --text-color: #202124;
+ --bg-color: #ffffff;
+ --border-color: #dadce0;
+ --hover-color: #f1f3f4;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ color: var(--text-color);
+ background-color: var(--bg-color);
+ line-height: 1.6;
+ padding: 1rem;
+ max-width: 800px;
+ margin: 0 auto;
+ }
+
+ header {
+ text-align: center;
+ margin-bottom: 2rem;
+ }
+
+ h1 {
+ color: var(--primary-color);
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .language-switcher {
+ margin-top: 1rem;
+ }
+
+ button {
+ background: none;
+ border: 1px solid var(--border-color);
+ padding: 0.5rem 1rem;
+ margin: 0 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ transition: all 0.2s ease;
+ }
+
+ button.active {
+ background-color: var(--primary-color);
+ color: white;
+ border-color: var(--primary-color);
+ }
+
+ button:hover {
+ background-color: var(--hover-color);
+ }
+
+ .news-container {
+ display: grid;
+ gap: 1.5rem;
+ }
+
+ .news-item {
+ border: 1px solid var(--border-color);
+ border-radius: 8px;
+ padding: 1rem;
+ transition: transform 0.2s ease;
+ }
+
+ .news-item:hover {
+ transform: translateY(-2px);
+ }
+
+ .news-title {
+ color: var(--primary-color);
+ margin-bottom: 0.5rem;
+ font-size: 1.2rem;
+ }
+
+ .news-summary {
+ color: var(--text-color);
+ margin-bottom: 0.5rem;
+ }
+
+ .news-link {
+ color: var(--primary-color);
+ text-decoration: none;
+ font-weight: 500;
+ }
+
+ .news-link::after {
+ content: "→";
+ margin-left: 0.5rem;
+ transition: margin 0.2s ease;
+ }
+
+ .news-link:hover::after {
+ margin-left: 1rem;
+ }
+
+ .loading {
+ text-align: center;
+ padding: 2rem;
+ color: #5f6368;
+ }
+
+ footer {
+ text-align: center;
+ margin-top: 2rem;
+ padding: 1rem;
+ color: #5f6368;
+ }
+
+ @media (max-width: 600px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ .news-container {
+ gap: 1rem;
+ }
+
+ .news-item {
+ padding: 0.75rem;
+ }
+ }