Changes to journobot.scroll.pub

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

Your AI Journalism Assistant

+

Enhance your reporting with intelligent conversation

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

Features

+
+
+

Story Research

+

Quick access to contextual information and background research

+
+
+

Interview Prep

+

Generate intelligent questions for your interviews

+
+
+

Fact Checking

+

Cross-reference information and verify sources

+
+
+
+
+
+
+

JournoBot - Empowering Digital Journalism

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://journobot.scroll.pub
+ metaTags
+ description An AI-powered journalist chatbot for news gathering and reporting assistance
+ keywords journalism, AI, chatbot, news, reporting, writing assistant
+ editButton /edit.html
+ title JournoBot - AI Journalism Assistant
+ style.css
+ body.html
+ script.js
readme.scroll
Changed around line 1
+ # journobot.scroll.pub
+ Website generated from prompt: A journalist chatbot
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const chatMessages = document.getElementById('chat-messages');
+ const userInput = document.getElementById('user-input');
+ const sendButton = document.getElementById('send-button');
+
+ const botResponses = {
+ 'hello': 'Hello! How can I assist with your journalism today?',
+ 'help': 'I can help with research, interview questions, fact-checking, and story angles. What would you like to explore?',
+ 'default': 'I understand. Let me help you gather more information about that topic.'
+ };
+
+ function addMessage(message, isBot = false) {
+ const messageDiv = document.createElement('div');
+ messageDiv.className = `message ${isBot ? 'bot' : 'user'}`;
+ messageDiv.style.padding = '10px';
+ messageDiv.style.margin = '10px';
+ messageDiv.style.borderRadius = '10px';
+ messageDiv.style.maxWidth = '70%';
+ messageDiv.style.alignSelf = isBot ? 'flex-start' : 'flex-end';
+ messageDiv.style.background = isBot ? '#f0f0f0' : '#6c63ff';
+ messageDiv.style.color = isBot ? '#333' : 'white';
+ messageDiv.textContent = message;
+ chatMessages.appendChild(messageDiv);
+ chatMessages.scrollTop = chatMessages.scrollHeight;
+ }
+
+ function getBotResponse(input) {
+ const lowercaseInput = input.toLowerCase();
+ return botResponses[lowercaseInput] || botResponses.default;
+ }
+
+ function handleSubmit() {
+ const message = userInput.value.trim();
+ if (message) {
+ addMessage(message, false);
+ userInput.value = '';
+
+ setTimeout(() => {
+ const response = getBotResponse(message);
+ addMessage(response, true);
+ }, 500);
+ }
+ }
+
+ sendButton.addEventListener('click', handleSubmit);
+ userInput.addEventListener('keypress', (e) => {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault();
+ handleSubmit();
+ }
+ });
+
+ // Initial bot greeting
+ setTimeout(() => {
+ addMessage('Welcome to JournoBot! How can I assist with your journalism today?', true);
+ }, 1000);
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2a4494;
+ --secondary-color: #6c63ff;
+ --text-color: #333;
+ --bg-color: #f9f9f9;
+ --accent-color: #ff6b6b;
+ }
+
+ * {
+ 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: white;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 100;
+ }
+
+ nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 1rem;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: var(--primary-color);
+ }
+
+ .nav-links a {
+ margin-left: 2rem;
+ text-decoration: none;
+ color: var(--text-color);
+ transition: color 0.3s;
+ }
+
+ .nav-links a:hover {
+ color: var(--secondary-color);
+ }
+
+ main {
+ margin-top: 4rem;
+ padding: 2rem;
+ }
+
+ #hero {
+ text-align: center;
+ padding: 4rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ color: white;
+ border-radius: 1rem;
+ margin-bottom: 3rem;
+ }
+
+ #hero h1 {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ }
+
+ .chat-container {
+ max-width: 800px;
+ margin: 0 auto;
+ background: white;
+ border-radius: 1rem;
+ box-shadow: 0 4px 20px rgba(0,0,0,0.1);
+ padding: 1rem;
+ height: 500px;
+ display: flex;
+ flex-direction: column;
+ }
+
+ #chat-messages {
+ flex-grow: 1;
+ overflow-y: auto;
+ padding: 1rem;
+ margin-bottom: 1rem;
+ }
+
+ .chat-input-area {
+ display: flex;
+ gap: 1rem;
+ padding: 1rem;
+ border-top: 1px solid #eee;
+ }
+
+ #user-input {
+ flex-grow: 1;
+ padding: 1rem;
+ border: 2px solid #eee;
+ border-radius: 0.5rem;
+ resize: none;
+ height: 60px;
+ transition: border-color 0.3s;
+ }
+
+ #user-input:focus {
+ border-color: var(--secondary-color);
+ outline: none;
+ }
+
+ #send-button {
+ background: var(--secondary-color);
+ color: white;
+ border: none;
+ border-radius: 0.5rem;
+ padding: 0 1.5rem;
+ cursor: pointer;
+ transition: transform 0.2s;
+ }
+
+ #send-button:hover {
+ transform: scale(1.05);
+ }
+
+ .features-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 2rem;
+ margin-top: 3rem;
+ }
+
+ .feature-card {
+ background: white;
+ padding: 2rem;
+ border-radius: 1rem;
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
+ transition: transform 0.3s;
+ }
+
+ .feature-card:hover {
+ transform: translateY(-5px);
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ margin-top: 4rem;
+ background: white;
+ border-top: 1px solid #eee;
+ }
+
+ @media (max-width: 768px) {
+ .nav-links {
+ display: none;
+ }
+
+ #hero h1 {
+ font-size: 2rem;
+ }
+
+ .features-grid {
+ grid-template-columns: 1fr;
+ }
+ }