Spaces:
Running
Running
Analyze the contents from this chat session and design a simple HTML portal: https://kwkvmf3jrprqduii.public.blob.vercel-storage.com/chat-%20%281%29.txt
Browse files- README.md +8 -5
- components/chat-card.js +113 -0
- components/navbar.js +74 -0
- index.html +63 -19
- script.js +27 -0
- style.css +27 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ChatVoyager Portal 🚀
|
| 3 |
+
colorFrom: yellow
|
| 4 |
+
colorTo: blue
|
| 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).
|
components/chat-card.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomChatCard extends HTMLElement {
|
| 2 |
+
static get observedAttributes() {
|
| 3 |
+
return ['title', 'date', 'participants', 'preview', 'link'];
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
constructor() {
|
| 7 |
+
super();
|
| 8 |
+
this.attachShadow({ mode: 'open' });
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
connectedCallback() {
|
| 12 |
+
this.render();
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
attributeChangedCallback(name, oldValue, newValue) {
|
| 16 |
+
this.render();
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
render() {
|
| 20 |
+
const title = this.getAttribute('title') || 'Untitled Chat';
|
| 21 |
+
const date = this.getAttribute('date') || 'No date';
|
| 22 |
+
const participants = this.getAttribute('participants') || '0';
|
| 23 |
+
const preview = this.getAttribute('preview') || 'No preview available';
|
| 24 |
+
const link = this.getAttribute('link') || '#';
|
| 25 |
+
|
| 26 |
+
this.shadowRoot.innerHTML = `
|
| 27 |
+
<style>
|
| 28 |
+
:host {
|
| 29 |
+
display: block;
|
| 30 |
+
margin-bottom: 1rem;
|
| 31 |
+
}
|
| 32 |
+
.card {
|
| 33 |
+
background-color: white;
|
| 34 |
+
border-radius: 0.75rem;
|
| 35 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 36 |
+
overflow: hidden;
|
| 37 |
+
transition: transform 0.2s, box-shadow 0.2s;
|
| 38 |
+
height: 100%;
|
| 39 |
+
display: flex;
|
| 40 |
+
flex-direction: column;
|
| 41 |
+
}
|
| 42 |
+
.card:hover {
|
| 43 |
+
transform: translateY(-4px);
|
| 44 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 45 |
+
}
|
| 46 |
+
.card-header {
|
| 47 |
+
padding: 1.25rem 1.5rem 0;
|
| 48 |
+
}
|
| 49 |
+
.card-title {
|
| 50 |
+
font-size: 1.25rem;
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
color: #111827;
|
| 53 |
+
margin-bottom: 0.5rem;
|
| 54 |
+
}
|
| 55 |
+
.card-meta {
|
| 56 |
+
display: flex;
|
| 57 |
+
align-items: center;
|
| 58 |
+
color: #6b7280;
|
| 59 |
+
font-size: 0.875rem;
|
| 60 |
+
margin-bottom: 1rem;
|
| 61 |
+
}
|
| 62 |
+
.card-meta-item {
|
| 63 |
+
display: flex;
|
| 64 |
+
align-items: center;
|
| 65 |
+
margin-right: 1rem;
|
| 66 |
+
}
|
| 67 |
+
.card-meta-icon {
|
| 68 |
+
margin-right: 0.25rem;
|
| 69 |
+
width: 16px;
|
| 70 |
+
height: 16px;
|
| 71 |
+
}
|
| 72 |
+
.card-body {
|
| 73 |
+
padding: 0 1.5rem 1.25rem;
|
| 74 |
+
flex-grow: 1;
|
| 75 |
+
}
|
| 76 |
+
.card-preview {
|
| 77 |
+
color: #4b5563;
|
| 78 |
+
line-height: 1.5;
|
| 79 |
+
margin-bottom: 1.5rem;
|
| 80 |
+
display: -webkit-box;
|
| 81 |
+
-webkit-line-clamp: 3;
|
| 82 |
+
-webkit-box-orient: vertical;
|
| 83 |
+
overflow: hidden;
|
| 84 |
+
}
|
| 85 |
+
.card-footer {
|
| 86 |
+
padding: 0 1.5rem 1.5rem;
|
| 87 |
+
}
|
| 88 |
+
.card-link {
|
| 89 |
+
display: inline-flex;
|
| 90 |
+
align-items: center;
|
| 91 |
+
color: #4f46e5;
|
| 92 |
+
font-weight: 500;
|
| 93 |
+
text-decoration: none;
|
| 94 |
+
transition: color 0.2s;
|
| 95 |
+
}
|
| 96 |
+
.card-link:hover {
|
| 97 |
+
color: #4338ca;
|
| 98 |
+
}
|
| 99 |
+
.card-link-icon {
|
| 100 |
+
margin-left: 0.25rem;
|
| 101 |
+
width: 16px;
|
| 102 |
+
height: 16px;
|
| 103 |
+
}
|
| 104 |
+
</style>
|
| 105 |
+
<div class="card">
|
| 106 |
+
<div class="card-header">
|
| 107 |
+
<h3 class="card-title">${title}</h3>
|
| 108 |
+
<div class="card-meta">
|
| 109 |
+
<span class="card-meta-item">
|
| 110 |
+
<i data-feather="calendar" class="card-meta-icon"></i>
|
| 111 |
+
${date}
|
| 112 |
+
</span>
|
| 113 |
+
<span class="card-meta-item">
|
components/navbar.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
background-color: white;
|
| 10 |
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
| 11 |
+
position: sticky;
|
| 12 |
+
top: 0;
|
| 13 |
+
z-index: 50;
|
| 14 |
+
}
|
| 15 |
+
.navbar-container {
|
| 16 |
+
max-width: 1200px;
|
| 17 |
+
margin: 0 auto;
|
| 18 |
+
padding: 1rem 2rem;
|
| 19 |
+
display: flex;
|
| 20 |
+
justify-content: space-between;
|
| 21 |
+
align-items: center;
|
| 22 |
+
}
|
| 23 |
+
.logo {
|
| 24 |
+
font-weight: 700;
|
| 25 |
+
font-size: 1.5rem;
|
| 26 |
+
color: #4f46e5;
|
| 27 |
+
display: flex;
|
| 28 |
+
align-items: center;
|
| 29 |
+
}
|
| 30 |
+
.logo-icon {
|
| 31 |
+
margin-right: 0.5rem;
|
| 32 |
+
}
|
| 33 |
+
.nav-links {
|
| 34 |
+
display: flex;
|
| 35 |
+
gap: 1.5rem;
|
| 36 |
+
}
|
| 37 |
+
.nav-link {
|
| 38 |
+
color: #4b5563;
|
| 39 |
+
font-weight: 500;
|
| 40 |
+
transition: color 0.2s;
|
| 41 |
+
text-decoration: none;
|
| 42 |
+
}
|
| 43 |
+
.nav-link:hover {
|
| 44 |
+
color: #4f46e5;
|
| 45 |
+
}
|
| 46 |
+
.nav-link.active {
|
| 47 |
+
color: #4f46e5;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
}
|
| 50 |
+
@media (max-width: 768px) {
|
| 51 |
+
.navbar-container {
|
| 52 |
+
padding: 1rem;
|
| 53 |
+
}
|
| 54 |
+
.nav-links {
|
| 55 |
+
display: none;
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
</style>
|
| 59 |
+
<div class="navbar-container">
|
| 60 |
+
<a href="/" class="logo">
|
| 61 |
+
<i data-feather="message-square" class="logo-icon"></i>
|
| 62 |
+
ChatVoyager
|
| 63 |
+
</a>
|
| 64 |
+
<div class="nav-links">
|
| 65 |
+
<a href="#" class="nav-link active">Dashboard</a>
|
| 66 |
+
<a href="#" class="nav-link">Analytics</a>
|
| 67 |
+
<a href="#" class="nav-link">History</a>
|
| 68 |
+
<a href="#" class="nav-link">Settings</a>
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
`;
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,63 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>ChatVoyager Portal</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="components/navbar.js"></script>
|
| 12 |
+
<script src="components/chat-card.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 |
+
<div class="text-center mb-12">
|
| 19 |
+
<h1 class="text-4xl font-bold text-gray-800 mb-4">ChatVoyager Portal</h1>
|
| 20 |
+
<p class="text-xl text-gray-600 max-w-2xl mx-auto">Explore and analyze chat sessions with our intuitive interface</p>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 24 |
+
<custom-chat-card
|
| 25 |
+
title="Recent Session"
|
| 26 |
+
date="2023-11-15"
|
| 27 |
+
participants="3"
|
| 28 |
+
preview="Analyzed the latest project requirements..."
|
| 29 |
+
link="#">
|
| 30 |
+
</custom-chat-card>
|
| 31 |
+
|
| 32 |
+
<custom-chat-card
|
| 33 |
+
title="Team Meeting"
|
| 34 |
+
date="2023-11-10"
|
| 35 |
+
participants="5"
|
| 36 |
+
preview="Discussed quarterly goals and milestones..."
|
| 37 |
+
link="#">
|
| 38 |
+
</custom-chat-card>
|
| 39 |
+
|
| 40 |
+
<custom-chat-card
|
| 41 |
+
title="Client Call"
|
| 42 |
+
date="2023-11-05"
|
| 43 |
+
participants="2"
|
| 44 |
+
preview="Finalized the UI/UX design specifications..."
|
| 45 |
+
link="#">
|
| 46 |
+
</custom-chat-card>
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<div class="mt-12 text-center">
|
| 50 |
+
<button class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-6 rounded-lg shadow-md transition duration-300 flex items-center mx-auto">
|
| 51 |
+
<i data-feather="plus" class="mr-2"></i>
|
| 52 |
+
Upload New Chat
|
| 53 |
+
</button>
|
| 54 |
+
</div>
|
| 55 |
+
</main>
|
| 56 |
+
|
| 57 |
+
<script>
|
| 58 |
+
feather.replace();
|
| 59 |
+
</script>
|
| 60 |
+
<script src="script.js"></script>
|
| 61 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 62 |
+
</body>
|
| 63 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Initialize tooltips
|
| 3 |
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
| 4 |
+
tooltipTriggerList.map(function (tooltipTriggerEl) {
|
| 5 |
+
return new bootstrap.Tooltip(tooltipTriggerEl);
|
| 6 |
+
});
|
| 7 |
+
|
| 8 |
+
// Smooth scrolling for anchor links
|
| 9 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 10 |
+
anchor.addEventListener('click', function (e) {
|
| 11 |
+
e.preventDefault();
|
| 12 |
+
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
| 13 |
+
behavior: 'smooth'
|
| 14 |
+
});
|
| 15 |
+
});
|
| 16 |
+
});
|
| 17 |
+
});
|
| 18 |
+
|
| 19 |
+
// Function to handle file upload
|
| 20 |
+
function handleFileUpload(event) {
|
| 21 |
+
const file = event.target.files[0];
|
| 22 |
+
if (file) {
|
| 23 |
+
// Process the file here
|
| 24 |
+
console.log('File selected:', file.name);
|
| 25 |
+
// You would typically add your file processing logic here
|
| 26 |
+
}
|
| 27 |
+
}
|
style.css
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', sans-serif;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
/* Custom scrollbar */
|
| 8 |
+
::-webkit-scrollbar {
|
| 9 |
+
width: 8px;
|
| 10 |
}
|
| 11 |
|
| 12 |
+
::-webkit-scrollbar-track {
|
| 13 |
+
background: #f1f1f1;
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
+
::-webkit-scrollbar-thumb {
|
| 17 |
+
background: #888;
|
| 18 |
+
border-radius: 4px;
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
+
::-webkit-scrollbar-thumb:hover {
|
| 22 |
+
background: #555;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
+
/* Animation for cards */
|
| 26 |
+
@keyframes fadeIn {
|
| 27 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 28 |
+
to { opacity: 1; transform: translateY(0); }
|
| 29 |
}
|
| 30 |
+
|
| 31 |
+
.custom-chat-card {
|
| 32 |
+
animation: fadeIn 0.3s ease-out forwards;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.custom-chat-card:nth-child(1) { animation-delay: 0.1s; }
|
| 36 |
+
.custom-chat-card:nth-child(2) { animation-delay: 0.2s; }
|
| 37 |
+
.custom-chat-card:nth-child(3) { animation-delay: 0.3s; }
|