Changes to polipulse.scroll.pub

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

Latest in US Politics

+

Stay informed with real-time political updates

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

Built with passion by PoliPulse

+

Data sourced from Google News

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://polipulse.scroll.pub
+ metaTags
+ title US Politics News Feed
+ description Get the latest American political news from trusted sources
+ keywords politics, news, US politics, American politics, political news
+ editButton /edit.html
+ title US Politics News Feed
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01J6dye6rpxKYnP5LFvsuPUX",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a website that fetches and displays top political news from Google News using their RSS feeds.\n\n---domain---\npolipulse.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://polipulse.scroll.pub\nmetaTags\n title US Politics News Feed\n description Get the latest American political news from trusted sources\n keywords politics, news, US politics, American politics, political news\neditButton /edit.html\ntitle US Politics News Feed\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n \n
\n\n
\n
\n

Latest in US Politics

\n

Stay informed with real-time political updates

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

Built with passion by PoliPulse

\n

Data sourced from Google News

\n
\n\n---style.css---\n:root {\n --primary-color: #2a4365;\n --secondary-color: #ed8936;\n --bg-color: #f7fafc;\n --text-color: #2d3748;\n --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--bg-color);\n}\n\nheader {\n background: var(--primary-color);\n padding: 1rem;\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 100;\n box-shadow: var(--shadow);\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.logo {\n color: white;\n font-size: 1.5rem;\n font-weight: bold;\n text-transform: uppercase;\n letter-spacing: 1px;\n}\n\n.menu-toggle {\n display: none;\n}\n\nmain {\n margin-top: 4rem;\n padding: 2rem;\n}\n\n.hero {\n text-align: center;\n padding: 3rem 1rem;\n background: linear-gradient(135deg, var(--primary-color), #4a5568);\n color: white;\n border-radius: 1rem;\n margin-bottom: 2rem;\n}\n\n.hero h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n}\n\n.news-container {\n max-width: 800px;\n margin: 0 auto;\n}\n\n.news-item {\n background: white;\n padding: 1.5rem;\n margin-bottom: 1.5rem;\n border-radius: 0.5rem;\n box-shadow: var(--shadow);\n transform: translateY(0);\n transition: transform 0.3s ease;\n}\n\n.news-item:hover {\n transform: translateY(-5px);\n}\n\n.news-item h2 {\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n}\n\n.news-item p {\n color: #718096;\n}\n\n.loading-spinner {\n display: flex;\n justify-content: center;\n padding: 2rem;\n}\n\n.spinner {\n width: 50px;\n height: 50px;\n border: 4px solid #f3f3f3;\n border-top: 4px solid var(--secondary-color);\n border-radius: 50%;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\nfooter {\n background: var(--primary-color);\n color: white;\n text-align: center;\n padding: 2rem;\n margin-top: 4rem;\n}\n\n@media (max-width: 768px) {\n .hero h1 {\n font-size: 2rem;\n }\n \n .news-item {\n padding: 1rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const newsFeed = document.getElementById('news-feed');\n const loadingSpinner = document.querySelector('.loading-spinner');\n\n async function fetchNews() {\n try {\n // Note: In a real implementation, you'd need a backend proxy to handle CORS\n // and API keys. This is a simplified example.\n const response = await fetch('https://news.google.com/rss/search?q=us+politics&hl=en-US&gl=US&ceid=US:en');\n const data = await response.text();\n const parser = new DOMParser();\n const xml = parser.parseFromString(data, 'text/xml');\n const items = xml.querySelectorAll('item');\n \n loadingSpinner.style.display = 'none';\n \n items.forEach(item => {\n const title = item.querySelector('title').textContent;\n const link = item.querySelector('link').textContent;\n const pubDate = new Date(item.querySelector('pubDate').textContent);\n \n const newsItem = document.createElement('article');\n newsItem.classList.add('news-item');\n newsItem.innerHTML = `\n

${title}

\n

${pubDate.toLocaleDateString('en-US', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n })}

\n `;\n \n newsFeed.appendChild(newsItem);\n });\n } catch (error) {\n loadingSpinner.style.display = 'none';\n newsFeed.innerHTML = '

Error loading news. Please try again later.

';\n console.error('Error fetching news:', error);\n }\n }\n\n fetchNews();\n});\n\n---end---\n\nNote: Due to CORS restrictions, this implementation would need a backend proxy server to actually fetch from Google News RSS feeds. In a production environment, you'd want to implement proper error handling, rate limiting, and caching.\n\nThe design features a clean, modern interface with smooth animations, responsive layout, and accessibility considerations. The color scheme is professional yet engaging, with careful attention to typography and spacing."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 283,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 1835
+ }
+ }
readme.scroll
Changed around line 1
+ # polipulse.scroll.pub
+ Website generated by Claude from prompt: A webiste to get from google top news Item on american politics
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', function() {
+ const newsFeed = document.getElementById('news-feed');
+ const loadingSpinner = document.querySelector('.loading-spinner');
+
+ async function fetchNews() {
+ try {
+ // Note: In a real implementation, you'd need a backend proxy to handle CORS
+ // and API keys. This is a simplified example.
+ const response = await fetch('https://news.google.com/rss/search?q=us+politics&hl=en-US&gl=US&ceid=US:en');
+ const data = await response.text();
+ const parser = new DOMParser();
+ const xml = parser.parseFromString(data, 'text/xml');
+ const items = xml.querySelectorAll('item');
+
+ loadingSpinner.style.display = 'none';
+
+ items.forEach(item => {
+ const title = item.querySelector('title').textContent;
+ const link = item.querySelector('link').textContent;
+ const pubDate = new Date(item.querySelector('pubDate').textContent);
+
+ const newsItem = document.createElement('article');
+ newsItem.classList.add('news-item');
+ newsItem.innerHTML = `
+

${pubDate.toLocaleDateString('en-US', {

+ weekday: 'long',
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric'
+ })}

+ `;
+
+ newsFeed.appendChild(newsItem);
+ });
+ } catch (error) {
+ loadingSpinner.style.display = 'none';
+ newsFeed.innerHTML = '

Error loading news. Please try again later.

';
+ console.error('Error fetching news:', error);
+ }
+ }
+
+ fetchNews();
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2a4365;
+ --secondary-color: #ed8936;
+ --bg-color: #f7fafc;
+ --text-color: #2d3748;
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--bg-color);
+ }
+
+ header {
+ background: var(--primary-color);
+ padding: 1rem;
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 100;
+ box-shadow: var(--shadow);
+ }
+
+ nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .logo {
+ color: white;
+ font-size: 1.5rem;
+ font-weight: bold;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ }
+
+ .menu-toggle {
+ display: none;
+ }
+
+ main {
+ margin-top: 4rem;
+ padding: 2rem;
+ }
+
+ .hero {
+ text-align: center;
+ padding: 3rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), #4a5568);
+ color: white;
+ border-radius: 1rem;
+ margin-bottom: 2rem;
+ }
+
+ .hero h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+ }
+
+ .news-container {
+ max-width: 800px;
+ margin: 0 auto;
+ }
+
+ .news-item {
+ background: white;
+ padding: 1.5rem;
+ margin-bottom: 1.5rem;
+ border-radius: 0.5rem;
+ box-shadow: var(--shadow);
+ transform: translateY(0);
+ transition: transform 0.3s ease;
+ }
+
+ .news-item:hover {
+ transform: translateY(-5px);
+ }
+
+ .news-item h2 {
+ color: var(--primary-color);
+ margin-bottom: 0.5rem;
+ }
+
+ .news-item p {
+ color: #718096;
+ }
+
+ .loading-spinner {
+ display: flex;
+ justify-content: center;
+ padding: 2rem;
+ }
+
+ .spinner {
+ width: 50px;
+ height: 50px;
+ border: 4px solid #f3f3f3;
+ border-top: 4px solid var(--secondary-color);
+ border-radius: 50%;
+ animation: spin 1s linear infinite;
+ }
+
+ @keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
+ }
+
+ footer {
+ background: var(--primary-color);
+ color: white;
+ text-align: center;
+ padding: 2rem;
+ margin-top: 4rem;
+ }
+
+ @media (max-width: 768px) {
+ .hero h1 {
+ font-size: 2rem;
+ }
+
+ .news-item {
+ padding: 1rem;
+ }
+ }