bep40 commited on
Commit
9a0b1a5
·
verified ·
1 Parent(s): ee23f5e

Lấy tin tức tự động từ URL nhập vào url tin tức, ứng dụng sẽ đưa ra các ý chính và toàn bộ hình ảnh tin đó

Browse files
Files changed (8) hide show
  1. README.md +7 -4
  2. about.html +113 -0
  3. components/footer.js +90 -0
  4. components/navbar.js +81 -0
  5. contact.html +119 -0
  6. index.html +127 -19
  7. script.js +171 -0
  8. style.css +59 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Newsscraper Pro
3
- emoji: 🐢
4
- colorFrom: indigo
5
  colorTo: gray
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: NewsScraper Pro 🕷️
3
+ colorFrom: green
 
4
  colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
about.html ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>About - NewsScraper Pro</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ </head>
12
+ <body class="bg-gray-50 min-h-screen">
13
+ <custom-navbar></custom-navbar>
14
+
15
+ <main class="container mx-auto px-4 py-16">
16
+ <!-- Header Section -->
17
+ <section class="text-center mb-16">
18
+ <h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">
19
+ About NewsScraper Pro
20
+ </h1>
21
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">
22
+ Powerful web scraping technology that extracts key insights and images from any news article.
23
+ </p>
24
+ </section>
25
+
26
+ <!-- Features Section -->
27
+ <section class="max-w-6xl mx-auto mb-16">
28
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
29
+ <!-- Feature 1 -->
30
+ <div class="bg-white rounded-2xl shadow-lg p-8 text-center">
31
+ <div class="w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-6">
32
+ <i data-feather="zap" class="w-8 h-8 text-blue-500"></i>
33
+ </div>
34
+ <h3 class="text-2xl font-bold text-gray-800 mb-4">Fast Extraction</h3>
35
+ <p class="text-gray-600">
36
+ Quickly extract content from news articles with our optimized scraping algorithms.
37
+ </p>
38
+ </div>
39
+
40
+ <!-- Feature 2 -->
41
+ <div class="bg-white rounded-2xl shadow-lg p-8 text-center">
42
+ <div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6">
43
+ <i data-feather="check-circle" class="w-8 h-8 text-green-500"></i>
44
+ </div>
45
+ <h3 class="text-2xl font-bold text-gray-800 mb-4">Accurate Analysis</h3>
46
+ <p class="text-gray-600">
47
+ Get precise key points and complete image galleries from any news source.
48
+ </p>
49
+ </div>
50
+
51
+ <!-- Feature 3 -->
52
+ <div class="bg-white rounded-2xl shadow-lg p-8 text-center">
53
+ <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-6">
54
+ <i data-feather="shield" class="w-8 h-8 text-purple-500"></i>
55
+ </div>
56
+ <h3 class="text-2xl font-bold text-gray-800 mb-4">Secure Processing</h3>
57
+ <p class="text-gray-600">
58
+ Your data is processed securely and never stored on our servers.
59
+ </p>
60
+ </div>
61
+ </section>
62
+
63
+ <!-- How It Works -->
64
+ <section class="max-w-4xl mx-auto bg-white rounded-2xl shadow-lg p-8">
65
+ <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">How It Works</h2>
66
+ <div class="space-y-8">
67
+ <div class="flex items-start gap-6">
68
+ <div class="w-12 h-12 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold mt-1">
69
+ 1
70
+ </div>
71
+ <div>
72
+ <h3 class="text-xl font-bold text-gray-800 mb-2">Enter URL</h3>
73
+ <p class="text-gray-600">
74
+ Simply paste the URL of any news article you want to analyze.
75
+ </p>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="flex items-start gap-6">
80
+ <div class="w-12 h-12 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold mt-1">
81
+ 2
82
+ </div>
83
+ <div>
84
+ <h3 class="text-xl font-bold text-gray-800 mb-2">AI Processing</h3>
85
+ <p class="text-gray-600">
86
+ Our system analyzes the article content and extracts key insights.
87
+ </p>
88
+ </div>
89
+ </div>
90
+
91
+ <div class="flex items-start gap-6">
92
+ <div class="w-12 h-12 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold mt-1">
93
+ 3
94
+ </div>
95
+ <div>
96
+ <h3 class="text-xl font-bold text-gray-800 mb-2">Get Results</h3>
97
+ <p class="text-gray-600">
98
+ Receive organized key points and all images from the article.
99
+ </p>
100
+ </div>
101
+ </div>
102
+ </section>
103
+ </main>
104
+
105
+ <custom-footer></custom-footer>
106
+
107
+ <!-- Component Scripts -->
108
+ <script src="components/navbar.js"></script>
109
+ <script src="components/footer.js"></script>
110
+ <script src="script.js"></script>
111
+ <script>feather.replace();</script>
112
+ </body>
113
+ </html>
components/footer.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+ footer {
11
+ background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
12
+ }
13
+ .footer-link {
14
+ transition: all 0.3s ease;
15
+ }
16
+ .footer-link:hover {
17
+ color: #3b82f6;
18
+ transform: translateY(-1px);
19
+ }
20
+ </style>
21
+ <footer class="mt-16">
22
+ <div class="container mx-auto px-4 py-12">
23
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
24
+ <!-- Brand -->
25
+ <div class="md:col-span-2">
26
+ <div class="flex items-center gap-3 mb-4">
27
+ <i data-feather="globe" class="w-6 h-6 text-blue-400"></i>
28
+ <span class="text-xl font-bold text-white">NewsScraper Pro</span>
29
+ </div>
30
+ <p class="text-gray-400 max-w-md">
31
+ Extract key insights and all images from any news article with our powerful web scraping technology.
32
+ </p>
33
+ </div>
34
+
35
+ <!-- Quick Links -->
36
+ <div>
37
+ <h3 class="text-lg font-semibold text-white mb-4">Quick Links</h3>
38
+ <div class="space-y-2">
39
+ <a href="index.html" class="footer-link block text-gray-400 hover:text-white">Home</a>
40
+ <a href="about.html" class="footer-link block text-gray-400 hover:text-white">About</a>
41
+ <a href="contact.html" class="footer-link block text-gray-400 hover:text-white">Contact</a>
42
+ <a href="#" class="footer-link block text-gray-400 hover:text-white">Privacy Policy</a>
43
+ </div>
44
+ </div>
45
+
46
+ <!-- Contact -->
47
+ <div>
48
+ <h3 class="text-lg font-semibold text-white mb-4">Contact</h3>
49
+ <div class="space-y-2 text-gray-400">
50
+ <div class="flex items-center gap-2">
51
+ <i data-feather="mail" class="w-4 h-4"></i>
52
+ <span>contact@newsscraper.pro</span>
53
+ </div>
54
+ <div class="flex gap-4 mt-4">
55
+ <a href="#" class="p-2 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors">
56
+ <i data-feather="twitter" class="w-4 h-4 text-gray-400"></i>
57
+ </a>
58
+ <a href="#" class="p-2 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors">
59
+ <i data-feather="github" class="w-4 h-4 text-gray-400"></i>
60
+ </a>
61
+ <a href="#" class="p-2 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors">
62
+ <i data-feather="linkedin" class="w-4 h-4 text-gray-400"></i>
63
+ </a>
64
+ </div>
65
+ </div>
66
+ </div>
67
+
68
+ <!-- Bottom Bar -->
69
+ <div class="border-t border-gray-700 mt-8 pt-8">
70
+ <div class="flex flex-col md:flex-row justify-between items-center">
71
+ <p class="text-gray-500 text-sm mb-4 md:mb-0">
72
+ © 2024 NewsScraper Pro. All rights reserved.
73
+ </p>
74
+ <p class="text-gray-500 text-sm">
75
+ Built with <i data-feather="heart" class="w-4 h-4 text-red-400 inline"></i>
76
+ </p>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
82
+ <script>
83
+ feather.replace();
84
+ </script>
85
+ </footer>
86
+ `;
87
+ }
88
+ }
89
+
90
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+ nav {
11
+ background: rgba(255, 255, 255, 0.95);
12
+ backdrop-filter: blur(10px);
13
+ border-bottom: 1px solid rgba(229, 231, 235, 0.8);
14
+ }
15
+ .nav-link {
16
+ transition: all 0.3s ease;
17
+ }
18
+ .nav-link:hover {
19
+ color: #3b82f6;
20
+ transform: translateY(-1px);
21
+ }
22
+ .mobile-menu {
23
+ transition: all 0.3s ease;
24
+ }
25
+ </style>
26
+ <nav class="sticky top-0 z-50">
27
+ <div class="container mx-auto px-4 py-4">
28
+ <div class="flex items-center justify-between">
29
+ <!-- Logo -->
30
+ <a href="index.html" class="flex items-center gap-3 text-xl font-bold text-gray-800">
31
+ <i data-feather="globe" class="w-6 h-6 text-blue-500"></i>
32
+ NewsScraper Pro
33
+ </a>
34
+
35
+ <!-- Desktop Navigation -->
36
+ <div class="hidden md:flex items-center gap-8">
37
+ <a href="index.html" class="nav-link text-gray-700 hover:text-blue-500 font-medium">Home</a>
38
+ <a href="about.html" class="nav-link text-gray-700 hover:text-blue-500 font-medium">About</a>
39
+ <a href="contact.html" class="nav-link text-gray-700 hover:text-blue-500 font-medium">Contact</a>
40
+ </div>
41
+
42
+ <!-- Mobile Menu Button -->
43
+ <button id="mobileMenuButton" class="md:hidden p-2 rounded-lg hover:bg-gray-100">
44
+ <i data-feather="menu" class="w-6 h-6"></i>
45
+ </button>
46
+ </div>
47
+
48
+ <!-- Mobile Menu -->
49
+ <div id="mobileMenu" class="mobile-menu hidden md:hidden mt-4 space-y-4 pb-4">
50
+ <a href="index.html" class="block nav-link text-gray-700 hover:text-blue-500 font-medium">Home</a>
51
+ <a href="about.html" class="block nav-link text-gray-700 hover:text-blue-500 font-medium">About</a>
52
+ <a href="contact.html" class="block nav-link text-gray-700 hover:text-blue-500 font-medium">Contact</a>
53
+ </div>
54
+ </div>
55
+ </nav>
56
+
57
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
58
+ <script>
59
+ feather.replace();
60
+
61
+ // Mobile menu functionality
62
+ const mobileMenuButton = this.shadowRoot.getElementById('mobileMenuButton');
63
+ const mobileMenu = this.shadowRoot.getElementById('mobileMenu');
64
+
65
+ mobileMenuButton.addEventListener('click', () => {
66
+ const isHidden = mobileMenu.classList.contains('hidden');
67
+ if (isHidden) {
68
+ mobileMenu.classList.remove('hidden');
69
+ mobileMenuButton.innerHTML = '<i data-feather="x" class="w-6 h-6"></i>';
70
+ } else {
71
+ mobileMenu.classList.add('hidden');
72
+ mobileMenuButton.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
73
+ }
74
+ feather.replace();
75
+ });
76
+ </script>
77
+ `;
78
+ }
79
+ }
80
+
81
+ customElements.define('custom-navbar', CustomNavbar);
contact.html ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Contact - NewsScraper Pro</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ </head>
12
+ <body class="bg-gray-50 min-h-screen">
13
+ <custom-navbar></custom-navbar>
14
+
15
+ <main class="container mx-auto px-4 py-16">
16
+ <!-- Header Section -->
17
+ <section class="text-center mb-16">
18
+ <h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">
19
+ Contact Us
20
+ </h1>
21
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">
22
+ Get in touch with our team for any questions or support.
23
+ </p>
24
+ </section>
25
+
26
+ <!-- Contact Form Section -->
27
+ <section class="max-w-4xl mx-auto">
28
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-12">
29
+ <!-- Contact Information -->
30
+ <div class="space-y-8">
31
+ <div>
32
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">Get In Touch</h2>
33
+ <p class="text-gray-600">
34
+ Have questions about our news extraction service? We'd love to hear from you.
35
+ </p>
36
+ </div>
37
+
38
+ <div class="space-y-6">
39
+ <!-- Email -->
40
+ <div class="flex items-center gap-4">
41
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center">
42
+ <i data-feather="mail" class="w-6 h-6 text-blue-500"></i>
43
+ </div>
44
+ <div>
45
+ <h3 class="font-semibold text-gray-800">Email</h3>
46
+ <p class="text-gray-600">contact@newsscraper.pro</p>
47
+ </div>
48
+ </div>
49
+
50
+ <!-- Phone -->
51
+ <div class="flex items-center gap-4">
52
+ <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center">
53
+ <i data-feather="phone" class="w-6 h-6 text-green-500"></i>
54
+ </div>
55
+ <div>
56
+ <h3 class="font-semibold text-gray-800">Phone</h3>
57
+ <p class="text-gray-600">+1 (555) 123-4567</p>
58
+ </div>
59
+ </div>
60
+
61
+ <!-- Address -->
62
+ <div class="flex items-center gap-4">
63
+ <div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center">
64
+ <i data-feather="map-pin" class="w-6 h-6 text-purple-500"></i>
65
+ </div>
66
+ <div>
67
+ <h3 class="font-semibold text-gray-800">Office</h3>
68
+ <p class="text-gray-600">123 Tech Street<br>San Francisco, CA 94107</p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+
73
+ <!-- Contact Form -->
74
+ <div class="bg-white rounded-2xl shadow-lg p-8">
75
+ <form class="space-y-6">
76
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
77
+ <div>
78
+ <label for="firstName" class="block text-sm font-medium text-gray-700 mb-2">First Name</label>
79
+ <input type="text" id="firstName" class="w-full px-4 py-3 border border-gray-200 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200" required>
80
+ </div>
81
+ <div>
82
+ <label for="lastName" class="block text-sm font-medium text-gray-700 mb-2">Last Name</label>
83
+ <input type="text" id="lastName" class="w-full px-4 py-3 border border-gray-200 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200" required>
84
+ </div>
85
+ </div>
86
+
87
+ <div>
88
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-2">Email</label>
89
+ <input type="email" id="email" class="w-full px-4 py-3 border border-gray-200 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200" required>
90
+ </div>
91
+
92
+ <div>
93
+ <label for="subject" class="block text-sm font-medium text-gray-700 mb-2">Subject</label>
94
+ <input type="text" id="subject" class="w-full px-4 py-3 border border-gray-200 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200" required>
95
+ </div>
96
+
97
+ <div>
98
+ <label for="message" class="block text-sm font-medium text-gray-700 mb-2">Message</label>
99
+ <textarea id="message" rows="5" class="w-full px-4 py-3 border border-gray-200 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200" required></textarea>
100
+ </div>
101
+
102
+ <button type="submit" class="w-full bg-blue-500 text-white py-4 px-8 rounded-lg font-semibold hover:bg-blue-600 transition-colors">
103
+ Send Message
104
+ </button>
105
+ </form>
106
+ </div>
107
+ </div>
108
+ </section>
109
+ </main>
110
+
111
+ <custom-footer></custom-footer>
112
+
113
+ <!-- Component Scripts -->
114
+ <script src="components/navbar.js"></script>
115
+ <script src="components/footer.js"></script>
116
+ <script src="script.js"></script>
117
+ <script>feather.replace();</script>
118
+ </body>
119
+ </html>
index.html CHANGED
@@ -1,19 +1,127 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>NewsScraper Pro - Extract News Content</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
13
+ </head>
14
+ <body class="bg-gray-50 min-h-screen">
15
+ <custom-navbar></custom-navbar>
16
+
17
+ <main class="container mx-auto px-4 py-8">
18
+ <!-- Hero Section -->
19
+ <section id="hero" class="text-center mb-12">
20
+ <h1 class="text-4xl md:text-6xl font-bold text-gray-800 mb-4">
21
+ NewsScraper Pro
22
+ </h1>
23
+ <p class="text-xl text-gray-600 mb-8">
24
+ Extract key insights and all images from any news article
25
+ </p>
26
+ </section>
27
+
28
+ <!-- Input Section -->
29
+ <section class="max-w-4xl mx-auto bg-white rounded-2xl shadow-xl p-8 mb-12">
30
+ <div class="text-center mb-8">
31
+ <i data-feather="link" class="w-16 h-16 text-blue-500 mx-auto mb-4"></i>
32
+ <h2 class="text-2xl font-bold text-gray-800 mb-2">Enter News URL</h2>
33
+ <p class="text-gray-600">Paste the URL of any news article to extract its content</p>
34
+ </div>
35
+
36
+ <form id="scrapeForm" class="space-y-6">
37
+ <div class="relative">
38
+ <input
39
+ type="url"
40
+ id="newsUrl"
41
+ placeholder="https://example.com/news-article"
42
+ class="w-full px-6 py-4 border-2 border-gray-200 rounded-xl focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all duration-300 text-lg"
43
+ required
44
+ >
45
+ <i data-feather="globe" class="absolute right-4 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
46
+ </div>
47
+
48
+ <button
49
+ type="submit"
50
+ class="w-full bg-gradient-to-r from-blue-500 to-purple-600 text-white py-4 px-8 rounded-xl font-semibold text-lg hover:from-blue-600 hover:to-purple-700 transition-all duration-300 transform hover:scale-105 shadow-lg flex items-center justify-center gap-3"
51
+ >
52
+ <i data-feather="search"></i>
53
+ Extract Content
54
+ </button>
55
+ </form>
56
+ </section>
57
+
58
+ <!-- Results Section -->
59
+ <section id="results" class="max-w-6xl mx-auto hidden">
60
+ <!-- Loading State -->
61
+ <div id="loading" class="text-center py-12 hidden">
62
+ <div class="animate-spin rounded-full h-16 w-16 border-b-2 border-blue-500 mx-auto mb-4"></div>
63
+ <p class="text-gray-600 text-lg">Analyzing the news article...</p>
64
+ </div>
65
+
66
+ <!-- Error State -->
67
+ <div id="error" class="bg-red-50 border border-red-200 rounded-xl p-6 text-center hidden">
68
+ <i data-feather="alert-triangle" class="w-12 h-12 text-red-500 mx-auto mb-4"></i>
69
+ <h3 class="text-xl font-bold text-red-800 mb-2">Error</h3>
70
+ <p id="errorMessage" class="text-red-600"></p>
71
+ </div>
72
+
73
+ <!-- Success Results -->
74
+ <div id="successResults" class="space-y-8 hidden">
75
+ <!-- Article Title -->
76
+ <div id="articleTitle" class="bg-white rounded-2xl shadow-lg p-8">
77
+ <h2 class="text-3xl font-bold text-gray-800"></h2>
78
+ </div>
79
+
80
+ <!-- Key Points -->
81
+ <div id="keyPoints" class="bg-white rounded-2xl shadow-lg p-8">
82
+ <div class="flex items-center gap-3 mb-6">
83
+ <i data-feather="list" class="w-6 h-6 text-blue-500"></i>
84
+ <h3 class="text-2xl font-bold text-gray-800">Key Points</h3>
85
+ </div>
86
+ <ul id="pointsList" class="space-y-3 text-gray-700 text-lg"></ul>
87
+ </div>
88
+
89
+ <!-- Images Gallery -->
90
+ <div id="imagesSection" class="bg-white rounded-2xl shadow-lg p-8">
91
+ <div class="flex items-center gap-3 mb-6">
92
+ <i data-feather="image" class="w-6 h-6 text-blue-500"></i>
93
+ <h3 class="text-2xl font-bold text-gray-800">Article Images</h3>
94
+ </div>
95
+ <div id="imagesGrid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>
96
+ </div>
97
+ </div>
98
+ </section>
99
+ </main>
100
+
101
+ <custom-footer></custom-footer>
102
+
103
+ <!-- Component Scripts -->
104
+ <script src="components/navbar.js"></script>
105
+ <script src="components/footer.js"></script>
106
+ <script src="script.js"></script>
107
+ <script>
108
+ feather.replace();
109
+
110
+ // Initialize Vanta.js background
111
+ VANTA.GLOBE({
112
+ el: "#hero",
113
+ mouseControls: true,
114
+ touchControls: true,
115
+ gyroControls: false,
116
+ minHeight: 200.00,
117
+ minWidth: 200.00,
118
+ scale: 1.00,
119
+ scaleMobile: 1.00,
120
+ color: 0x3b82f6,
121
+ backgroundColor: 0xf9fafb,
122
+ size: 0.8
123
+ });
124
+ </script>
125
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
126
+ </body>
127
+ </html>
script.js ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Shared JavaScript across all pages
2
+
3
+ // Form submission handler
4
+ document.addEventListener('DOMContentLoaded', function() {
5
+ const scrapeForm = document.getElementById('scrapeForm');
6
+ const resultsSection = document.getElementById('results');
7
+ const loadingDiv = document.getElementById('loading');
8
+ const errorDiv = document.getElementById('error');
9
+ const errorMessage = document.getElementById('errorMessage');
10
+ const successResults = document.getElementById('successResults');
11
+ const articleTitle = document.getElementById('articleTitle').querySelector('h2');
12
+ const pointsList = document.getElementById('pointsList');
13
+ const imagesGrid = document.getElementById('imagesGrid');
14
+ const imagesSection = document.getElementById('imagesSection');
15
+
16
+ if (scrapeForm) {
17
+ scrapeForm.addEventListener('submit', async function(e) {
18
+ e.preventDefault();
19
+
20
+ const urlInput = document.getElementById('newsUrl');
21
+ const url = urlInput.value.trim();
22
+
23
+ if (!url) {
24
+ showError('Please enter a valid URL');
25
+ return;
26
+ }
27
+
28
+ // Show loading state
29
+ showLoading();
30
+
31
+ try {
32
+ // Simulate API call to news extraction service
33
+ // In a real implementation, this would call a backend service
34
+ const result = await simulateNewsExtraction(url);
35
+ displayResults(result);
36
+ } catch (error) {
37
+ showError('Failed to extract content from the URL. Please try again with a different news article.');
38
+ }
39
+ });
40
+ }
41
+
42
+ function showLoading() {
43
+ resultsSection.classList.remove('hidden');
44
+ loadingDiv.classList.remove('hidden');
45
+ errorDiv.classList.add('hidden');
46
+ successResults.classList.add('hidden');
47
+ }
48
+
49
+ function showError(message) {
50
+ resultsSection.classList.remove('hidden');
51
+ loadingDiv.classList.add('hidden');
52
+ errorDiv.classList.remove('hidden');
53
+ successResults.classList.add('hidden');
54
+ errorMessage.textContent = message;
55
+ }
56
+
57
+ function displayResults(data) {
58
+ loadingDiv.classList.add('hidden');
59
+ errorDiv.classList.add('hidden');
60
+ successResults.classList.remove('hidden');
61
+
62
+ // Display article title
63
+ articleTitle.textContent = data.title || 'Article Title';
64
+
65
+ // Display key points
66
+ pointsList.innerHTML = '';
67
+ if (data.keyPoints && data.keyPoints.length > 0) {
68
+ data.keyPoints.forEach(point => {
69
+ const li = document.createElement('li');
70
+ li.className = 'flex items-start gap-3';
71
+ li.innerHTML = `
72
+ <i data-feather="check-circle" class="w-5 h-5 text-green-500 mt-1 flex-shrink-0"></i>
73
+ <span>${point}</span>
74
+ `;
75
+ pointsList.appendChild(li);
76
+ });
77
+ } else {
78
+ pointsList.innerHTML = '<li class="text-gray-500">No key points extracted</li>';
79
+ }
80
+
81
+ // Display images
82
+ imagesGrid.innerHTML = '';
83
+ if (data.images && data.images.length > 0) {
84
+ data.images.forEach((image, index) => {
85
+ const imgCard = document.createElement('div');
86
+ imgCard.className = 'image-card bg-gray-100 rounded-xl overflow-hidden shadow-md';
87
+ imgCard.innerHTML = `
88
+ <img src="${image.url}" alt="${image.alt || 'News image'}" class="w-full h-48 object-cover" loading="lazy">
89
+ <div class="p-4">
90
+ <p class="text-sm text-gray-600">Image ${index + 1}</p>
91
+ </div>
92
+ `;
93
+ imagesGrid.appendChild(imgCard);
94
+ });
95
+ imagesSection.classList.remove('hidden');
96
+ } else {
97
+ imagesSection.classList.add('hidden');
98
+ }
99
+
100
+ // Refresh feather icons
101
+ feather.replace();
102
+ }
103
+
104
+ // Simulate news extraction (replace with actual API call)
105
+ async function simulateNewsExtraction(url) {
106
+ // Simulate API delay
107
+ await new Promise(resolve => setTimeout(resolve, 2000));
108
+
109
+ // Mock data for demonstration
110
+ return {
111
+ title: "Breaking: Major Technological Advancement in AI Research",
112
+ keyPoints: [
113
+ "Researchers have developed a new AI model that can understand and generate human-like text with unprecedented accuracy",
114
+ "The technology has potential applications in education, healthcare, and customer service industries",
115
+ "Ethical considerations and regulations are being discussed by industry leaders",
116
+ "The breakthrough could revolutionize how we interact with computers in daily life",
117
+ "Open-source implementation is expected to be released in the coming months"
118
+ ],
119
+ images: [
120
+ {
121
+ url: "http://static.photos/technology/640x360/1",
122
+ alt: "AI Research Laboratory"
123
+ },
124
+ {
125
+ url: "http://static.photos/science/640x360/2",
126
+ alt: "Neural Network Visualization"
127
+ },
128
+ {
129
+ url: "http://static.photos/office/640x360/3",
130
+ alt: "Team Collaboration"
131
+ }
132
+ ]
133
+ };
134
+ }
135
+
136
+ // Smooth scrolling for anchor links
137
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
138
+ anchor.addEventListener('click', function (e) {
139
+ e.preventDefault();
140
+ const target = document.querySelector(this.getAttribute('href'));
141
+ if (target) {
142
+ target.scrollIntoView({
143
+ behavior: 'smooth',
144
+ block: 'start'
145
+ });
146
+ }
147
+ });
148
+ });
149
+
150
+ // Add intersection observer for animations
151
+ const observerOptions = {
152
+ threshold: 0.1,
153
+ rootMargin: '0px 0px -50px 0px'
154
+ };
155
+
156
+ const observer = new IntersectionObserver((entries) => {
157
+ entries.forEach(entry => {
158
+ if (entry.isIntersecting) {
159
+ entry.target.classList.add('animate-fade-in');
160
+ }
161
+ });
162
+ }, observerOptions);
163
+
164
+ // Observe elements for animation
165
+ document.addEventListener('DOMContentLoaded', () => {
166
+ const animatableElements = document.querySelectorAll('.image-card, .bg-white');
167
+ animatableElements.forEach(el => {
168
+ observer.observe(el);
169
+ });
170
+ });
171
+ });
style.css CHANGED
@@ -1,28 +1,68 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
28
  }
 
 
 
 
 
 
1
+ /* Shared styles across all pages */
2
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
3
+
4
+ * {
5
+ font-family: 'Inter', sans-serif;
6
+ }
7
+
8
+ /* Custom scrollbar */
9
+ ::-webkit-scrollbar {
10
+ width: 8px;
11
+ }
12
+
13
+ ::-webkit-scrollbar-track {
14
+ background: #f1f1f1;
15
+ }
16
+
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #c1c1c1;
19
+ border-radius: 4px;
20
+ }
21
+
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #a8a8a8;
24
+ }
25
+
26
+ /* Smooth transitions */
27
+ * {
28
+ transition: all 0.3s ease;
29
+ }
30
+
31
+ /* Custom gradient backgrounds */
32
+ .gradient-bg {
33
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
34
+ }
35
+
36
+ /* Loading animation */
37
+ @keyframes pulse {
38
+ 0%, 100% {
39
+ opacity: 1;
40
+ }
41
+ 50% {
42
+ opacity: 0.5;
43
+ }
44
  }
45
 
46
+ .pulse {
47
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
 
48
  }
49
 
50
+ /* Image hover effects */
51
+ .image-card {
52
+ transition: all 0.3s ease;
 
 
53
  }
54
 
55
+ .image-card:hover {
56
+ transform: translateY(-5px);
57
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
 
 
 
58
  }
59
 
60
+ /* Custom button styles */
61
+ .btn-primary {
62
+ background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
63
  }
64
+
65
+ .btn-primary:hover {
66
+ background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
67
+ transform: translateY(-2px);
68
+ }