Spaces:
Running
Running
File size: 10,879 Bytes
79fd234 86fdb32 79fd234 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 79fd234 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 79fd234 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 45ed4b2 86fdb32 79fd234 86fdb32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Smart Article Generator ๐</title>
<style>
:root {
--primary: #2563eb;
--secondary: #475569;
--background: #f8fafc;
--surface: #ffffff;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', system-ui, sans-serif;
}
body {
background-color: var(--background);
min-height: 100vh;
padding: 2rem;
line-height: 1.6;
}
.container {
max-width: 900px;
margin: 0 auto;
background: var(--surface);
padding: 2.5rem;
border-radius: 1rem;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.header {
text-align: center;
margin-bottom: 3rem;
}
.header h1 {
color: var(--primary);
font-size: 2.5rem;
margin-bottom: 1rem;
}
.header p {
color: var(--secondary);
font-size: 1.1rem;
}
.step {
margin-bottom: 2rem;
}
.step-number {
background: var(--primary);
color: white;
width: 30px;
height: 30px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
margin-right: 0.5rem;
}
.step h2 {
color: var(--secondary);
margin-bottom: 1rem;
display: flex;
align-items: center;
}
input[type="text"] {
width: 100%;
padding: 1rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 1rem;
transition: all 0.3s;
}
input[type="text"]:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.source-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.source-option {
padding: 1.5rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.3s;
text-align: center;
}
.source-option:hover {
border-color: var(--primary);
background: rgba(37, 99, 235, 0.05);
}
.source-option.selected {
border-color: var(--primary);
background: rgba(37, 99, 235, 0.1);
}
.source-option h3 {
font-size: 1.2rem;
margin-bottom: 0.5rem;
}
.generate-btn {
width: 100%;
padding: 1rem;
background: var(--primary);
color: white;
border: none;
border-radius: 0.5rem;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s;
margin: 2rem 0;
}
.generate-btn:hover {
background: #1d4ed8;
}
.loader {
display: none;
text-align: center;
margin: 2rem 0;
}
.loader-spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.result {
display: none;
margin-top: 2rem;
}
.article-content {
padding: 1.5rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
margin-bottom: 1rem;
white-space: pre-wrap;
}
.copy-btn {
padding: 0.75rem 1.5rem;
background: #10b981;
color: white;
border: none;
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.3s;
}
.copy-btn:hover {
background: #059669;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>โจ Smart Article Generator โจ</h1>
<p>Create professional articles in seconds! ๐</p>
</div>
<div class="step">
<h2><span class="step-number">1</span> Enter Your Topic ๐</h2>
<input type="text" id="topic" placeholder="Example: The Impact of Artificial Intelligence on Modern Society">
</div>
<div class="step">
<h2><span class="step-number">2</span> Choose Your Source ๐ฏ</h2>
<div class="source-options">
<div class="source-option" data-source="trusted">
<h3>Trusted Sources ๐ฐ</h3>
<p>Curated from reputable publications</p>
</div>
<div class="source-option" data-source="ai">
<h3>AI Generated ๐ค</h3>
<p>Created by advanced AI</p>
</div>
</div>
</div>
<button class="generate-btn" id="generateBtn">Generate Article โจ</button>
<div class="loader">
<div class="loader-spinner"></div>
<p>Creating your professional article... ๐จ</p>
</div>
<div class="result">
<div class="article-content" id="articleContent"></div>
<button class="copy-btn" id="copyBtn">Copy Article ๐</button>
</div>
</div>
<script>
const sourceOptions = document.querySelectorAll('.source-option');
const generateBtn = document.getElementById('generateBtn');
const loader = document.querySelector('.loader');
const result = document.querySelector('.result');
const articleContent = document.getElementById('articleContent');
const copyBtn = document.getElementById('copyBtn');
let selectedSource = null;
sourceOptions.forEach(option => {
option.addEventListener('click', () => {
sourceOptions.forEach(opt => opt.classList.remove('selected'));
option.classList.add('selected');
selectedSource = option.dataset.source;
});
});
function generateArticle(topic, source) {
const trustedSources = ["The New York Times ๐ฐ", "BBC News ๐", "Reuters ๐ฑ", "Associated Press ๐ข"];
const source_credit = source === 'trusted' ?
`Source: ${trustedSources[Math.floor(Math.random() * trustedSources.length)]}` :
"Generated by AI ๐ค";
const paragraphs = [
`๐ ${topic} has become one of the most discussed topics in recent times. As we delve deeper into this fascinating subject, we discover its profound impact on various aspects of our lives and society as a whole.`,
`๐ Recent studies and analyses have shown that ${topic} plays a crucial role in shaping our future. Experts from leading institutions have conducted extensive research, revealing remarkable insights about this phenomenon.`,
`๐ก The evolution of ${topic} has been nothing short of revolutionary. From its humble beginnings to its current state, we've witnessed tremendous growth and development in this field. Industry leaders and innovators continue to push boundaries, exploring new possibilities and applications.`,
`๐ According to recent statistics and data analysis, the impact of ${topic} has grown exponentially over the past decade. Organizations implementing related strategies have reported significant improvements in efficiency and effectiveness.`,
`๐ Looking ahead, the future of ${topic} appears incredibly promising. Experts predict continued growth and innovation in this space, with new developments emerging regularly. This dynamic landscape presents both challenges and opportunities for individuals and organizations alike.`,
`๐ The practical implications of ${topic} are far-reaching. From everyday applications to complex industrial solutions, its influence can be observed across various sectors. This widespread adoption has led to remarkable transformations in how we approach traditional problems.`,
`๐ฏ To fully leverage the potential of ${topic}, experts recommend following these key principles: understanding fundamental concepts, staying updated with latest developments, and implementing best practices. These guidelines ensure optimal results and sustainable progress.`,
`๐ฎ As we look to the future, it's clear that ${topic} will continue to evolve and shape our world in unprecedented ways. The possibilities are endless, and the potential for positive change is immense.`,
`\n${source_credit}\nArticle generated on: ${new Date().toLocaleDateString()} ๐
`
].join('\n\n');
return paragraphs;
}
generateBtn.addEventListener('click', () => {
const topic = document.getElementById('topic').value;
if (!topic) {
alert('Please enter a topic first! ๐ฏ');
return;
}
if (!selectedSource) {
alert('Please select a source! ๐');
return;
}
loader.style.display = 'block';
result.style.display = 'none';
setTimeout(() => {
const article = generateArticle(topic, selectedSource);
articleContent.textContent = article;
loader.style.display = 'none';
result.style.display = 'block';
}, 3000);
});
copyBtn.addEventListener('click', () => {
navigator.clipboard.writeText(articleContent.textContent)
.then(() => {
copyBtn.textContent = 'Copied! โ
';
setTimeout(() => {
copyBtn.textContent = 'Copy Article ๐';
}, 2000);
})
.catch(err => {
alert('Failed to copy text! โ');
console.error('Failed to copy text: ', err);
});
});
</script>
</body>
</html> |