mirror of
https://github.com/elder-plinius/R00TS.git
synced 2026-02-12 09:12:51 +00:00
579 lines
20 KiB
HTML
579 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>R00TS - AI Word Seeding</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
<script src="data_manager.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.0/gsap.min.js"></script>
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Space+Grotesk:wght@300;400;600&display=swap');
|
|
|
|
:root {
|
|
--primary-color: #00ff9d;
|
|
--secondary-color: #004d2c;
|
|
--accent-color: #39ff14;
|
|
--bg-color: #0a0f15;
|
|
--text-color: #e0e0e0;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Space Grotesk', sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
position: relative;
|
|
overflow-x: hidden;
|
|
min-height: 100vh;
|
|
}
|
|
#particles-js {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.word-cloud {
|
|
width: 100%;
|
|
height: 600px;
|
|
margin-top: 30px;
|
|
background: rgba(0, 20, 10, 0.4);
|
|
border-radius: 20px;
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid rgba(0, 255, 157, 0.1);
|
|
overflow: hidden;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.word-cloud:hover {
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.2);
|
|
transform: translateY(-2px);
|
|
}
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
position: relative;
|
|
}
|
|
|
|
.header h1 {
|
|
font-family: 'Share Tech Mono', monospace;
|
|
font-weight: 700;
|
|
color: var(--primary-color);
|
|
font-size: 4.5rem;
|
|
text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
|
|
letter-spacing: 4px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.header .lead {
|
|
font-size: 1.4rem;
|
|
color: var(--text-color);
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
line-height: 1.6;
|
|
}
|
|
.input-area {
|
|
background: rgba(0, 20, 10, 0.4);
|
|
padding: 30px;
|
|
border-radius: 20px;
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid rgba(0, 255, 157, 0.1);
|
|
margin-bottom: 30px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.input-area:hover {
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.2);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.form-control {
|
|
background: rgba(0, 20, 10, 0.4);
|
|
border: 1px solid rgba(0, 255, 157, 0.2);
|
|
color: var(--text-color);
|
|
padding: 15px;
|
|
font-size: 1.1rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.form-control:focus {
|
|
background: rgba(0, 20, 10, 0.6);
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.25rem rgba(0, 255, 157, 0.25);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.form-label {
|
|
color: var(--text-color);
|
|
font-size: 1.1rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.btn-primary {
|
|
background: var(--primary-color);
|
|
color: var(--bg-color);
|
|
border: none;
|
|
padding: 12px 30px;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
border-radius: 10px;
|
|
transition: all 0.3s ease;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--accent-color);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 15px rgba(57, 255, 20, 0.3);
|
|
}
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 50px;
|
|
color: var(--text-color);
|
|
font-size: 1rem;
|
|
opacity: 0.7;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.footer:hover {
|
|
opacity: 1;
|
|
}
|
|
.r00ts-brand {
|
|
font-family: 'Share Tech Mono', monospace;
|
|
font-weight: bold;
|
|
letter-spacing: 2px;
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.r00ts-brand::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -5px;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 2px;
|
|
background: var(--primary-color);
|
|
transform: scaleX(0);
|
|
transform-origin: right;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.r00ts-brand:hover::after {
|
|
transform: scaleX(1);
|
|
transform-origin: left;
|
|
}
|
|
}
|
|
.stats-area {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
margin: 30px 0;
|
|
gap: 20px;
|
|
}
|
|
|
|
.stat-box {
|
|
text-align: center;
|
|
padding: 25px;
|
|
background: rgba(0, 20, 10, 0.4);
|
|
border-radius: 15px;
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid rgba(0, 255, 157, 0.1);
|
|
flex: 1;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.stat-box:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 12px 40px rgba(0, 255, 157, 0.2);
|
|
}
|
|
|
|
.stat-box h3 {
|
|
color: var(--primary-color);
|
|
font-size: 1.2rem;
|
|
margin-bottom: 10px;
|
|
font-family: 'Share Tech Mono', monospace;
|
|
}
|
|
|
|
.stat-box p {
|
|
color: var(--text-color);
|
|
font-size: 2rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
|
|
}
|
|
|
|
/* Dataset styles */
|
|
.datasets-section {
|
|
margin-top: 40px;
|
|
background: rgba(0, 20, 10, 0.4);
|
|
border-radius: 20px;
|
|
padding: 25px;
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid rgba(0, 255, 157, 0.1);
|
|
}
|
|
|
|
.datasets-section h3 {
|
|
color: var(--primary-color);
|
|
font-family: 'Share Tech Mono', monospace;
|
|
margin-bottom: 20px;
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.dataset-item {
|
|
background: rgba(0, 20, 10, 0.6);
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
margin-bottom: 10px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.dataset-item:hover {
|
|
transform: translateX(5px);
|
|
box-shadow: 0 4px 15px rgba(0, 255, 157, 0.1);
|
|
}
|
|
|
|
.dataset-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
}
|
|
|
|
.dataset-name {
|
|
color: var(--primary-color);
|
|
font-family: 'Share Tech Mono', monospace;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.dataset-stats {
|
|
color: var(--text-color);
|
|
opacity: 0.7;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.dataset-time {
|
|
color: var(--text-color);
|
|
opacity: 0.5;
|
|
font-size: 0.8rem;
|
|
font-family: 'Share Tech Mono', monospace;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="particles-js"></div>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1 class="r00ts-brand">R00TS</h1>
|
|
<p class="lead">Plant the seeds of artificial intelligence by contributing words you think are important</p>
|
|
</div>
|
|
|
|
<div class="input-area">
|
|
<form id="word-form">
|
|
<div class="mb-3">
|
|
<label for="word-input" class="form-label">Enter a word to give it power:</label>
|
|
<input type="text" class="form-control" id="word-input" placeholder="Type a word..." required>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Plant Word</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="stats-area">
|
|
<div class="stat-box">
|
|
<h3>Total Words</h3>
|
|
<p id="submission-count">0</p>
|
|
</div>
|
|
<div class="stat-box">
|
|
<h3>Unique Words</h3>
|
|
<p id="unique-count">0</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="word-cloud" id="word-cloud-container"></div>
|
|
|
|
<div class="datasets-section">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h3>Recent Datasets</h3>
|
|
<a href="datasets.html" class="btn btn-primary btn-sm">View All Datasets</a>
|
|
</div>
|
|
<div id="dataset-list">
|
|
<!-- Dataset items will be inserted here -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>R00TS - Nurturing the future of artificial intelligence, one word at a time.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="script.js"></script>
|
|
<script>
|
|
// Add toast notification styles
|
|
const toastStyle = document.createElement('style');
|
|
toastStyle.textContent = `
|
|
.toast-notification {
|
|
position: fixed;
|
|
bottom: 30px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(0, 255, 157, 0.2);
|
|
color: var(--primary-color);
|
|
padding: 15px 30px;
|
|
border-radius: 10px;
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(0, 255, 157, 0.3);
|
|
box-shadow: 0 8px 32px rgba(0, 255, 157, 0.2);
|
|
z-index: 1000;
|
|
font-family: 'Share Tech Mono', monospace;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.typing-effect {
|
|
border-right: 2px solid var(--primary-color);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
|
|
}
|
|
|
|
@keyframes typing {
|
|
from { width: 0 }
|
|
to { width: 100% }
|
|
}
|
|
|
|
@keyframes blink-caret {
|
|
from, to { border-color: transparent }
|
|
50% { border-color: var(--primary-color) }
|
|
}
|
|
|
|
.glow-effect {
|
|
animation: glow 1.5s ease-in-out infinite alternate;
|
|
}
|
|
|
|
@keyframes glow {
|
|
from { text-shadow: 0 0 5px rgba(0, 255, 157, 0.5); }
|
|
to { text-shadow: 0 0 20px rgba(0, 255, 157, 0.8); }
|
|
}
|
|
`;
|
|
document.head.appendChild(toastStyle);
|
|
|
|
// Initialize particles.js
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
initParticles();
|
|
loadWords();
|
|
});
|
|
|
|
function initParticles() {
|
|
particlesJS('particles-js', {
|
|
particles: {
|
|
number: { value: 80, density: { enable: true, value_area: 800 } },
|
|
color: { value: '#00ff9d' },
|
|
shape: { type: 'circle' },
|
|
opacity: { value: 0.5, random: true, anim: { enable: true, speed: 1, opacity_min: 0.1, sync: false } },
|
|
size: { value: 3, random: true, anim: { enable: true, speed: 2, size_min: 0.1, sync: false } },
|
|
line_linked: { enable: true, distance: 150, color: '#00ff9d', opacity: 0.2, width: 1 },
|
|
move: { enable: true, speed: 1, direction: 'none', random: true, straight: false, out_mode: 'out', bounce: false }
|
|
},
|
|
interactivity: {
|
|
detect_on: 'canvas',
|
|
events: { onhover: { enable: true, mode: 'grab' }, resize: true },
|
|
modes: { grab: { distance: 140, line_linked: { opacity: 0.5 } } }
|
|
},
|
|
retina_detect: true
|
|
});
|
|
}
|
|
|
|
function createParticleBurst() {
|
|
const inputArea = document.querySelector('.input-area');
|
|
const rect = inputArea.getBoundingClientRect();
|
|
const centerX = rect.left + rect.width / 2;
|
|
const centerY = rect.top + rect.height / 2;
|
|
|
|
for (let i = 0; i < 20; i++) {
|
|
const particle = document.createElement('div');
|
|
particle.style.cssText = `
|
|
position: fixed;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: var(--primary-color);
|
|
border-radius: 50%;
|
|
pointer-events: none;
|
|
z-index: 1000;
|
|
`;
|
|
document.body.appendChild(particle);
|
|
|
|
const angle = (i / 20) * Math.PI * 2;
|
|
const velocity = 2 + Math.random() * 2;
|
|
const dx = Math.cos(angle) * velocity;
|
|
const dy = Math.sin(angle) * velocity;
|
|
|
|
gsap.fromTo(particle,
|
|
{ x: centerX, y: centerY, scale: 1, opacity: 1 },
|
|
{ duration: 1 + Math.random(), x: centerX + dx * 50, y: centerY + dy * 50, scale: 0, opacity: 0, ease: 'power2.out', onComplete: () => particle.remove() }
|
|
);
|
|
}
|
|
}
|
|
|
|
// Add typing effect to the header
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const header = document.querySelector('.header h1');
|
|
header.classList.add('glow-effect');
|
|
|
|
const lead = document.querySelector('.header .lead');
|
|
lead.classList.add('typing-effect');
|
|
lead.style.width = '0';
|
|
|
|
setTimeout(() => {
|
|
gsap.to(lead, { width: '100%', duration: 3, ease: 'steps(40)' });
|
|
}, 1000);
|
|
});
|
|
|
|
// Initialize word storage
|
|
let words = JSON.parse(localStorage.getItem('roots-words')) || {};
|
|
let totalSubmissions = Object.values(words).reduce((a, b) => a + b, 0);
|
|
let uniqueWords = Object.keys(words).length;
|
|
|
|
// Update stats display
|
|
document.getElementById('submission-count').textContent = totalSubmissions;
|
|
document.getElementById('unique-count').textContent = uniqueWords;
|
|
|
|
// Handle form submission
|
|
document.getElementById('word-form').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
|
|
const wordInput = document.getElementById('word-input');
|
|
const word = wordInput.value.trim().toLowerCase();
|
|
|
|
if (word) {
|
|
// Update word count
|
|
words[word] = (words[word] || 0) + 1;
|
|
|
|
// Save to localStorage
|
|
localStorage.setItem('roots-words', JSON.stringify(words));
|
|
|
|
// Update stats
|
|
totalSubmissions++;
|
|
uniqueWords = Object.keys(words).length;
|
|
document.getElementById('submission-count').textContent = totalSubmissions;
|
|
document.getElementById('unique-count').textContent = uniqueWords;
|
|
|
|
// Clear input
|
|
wordInput.value = '';
|
|
|
|
// Update visualization
|
|
updateWordCloud();
|
|
|
|
// Show success message with animation
|
|
const random = Math.floor(Math.random() * 5);
|
|
const messages = [
|
|
`"${word}" has been planted in the AI garden!`,
|
|
`"${word}" is now growing in the AI consciousness!`,
|
|
`"${word}" will blossom in future AI understanding!`,
|
|
`"${word}" is taking root in the digital soil!`,
|
|
`"${word}" has been added to the collective intelligence!`
|
|
];
|
|
|
|
// Create a toast notification instead of alert
|
|
const toast = document.createElement('div');
|
|
toast.className = 'toast-notification';
|
|
toast.textContent = messages[random];
|
|
document.body.appendChild(toast);
|
|
|
|
// Animate the toast
|
|
gsap.fromTo(toast,
|
|
{ y: 50, opacity: 0 },
|
|
{ y: 0, opacity: 1, duration: 0.5, ease: 'power2.out' }
|
|
);
|
|
|
|
// Create particle burst effect
|
|
createParticleBurst();
|
|
|
|
// Remove the toast after 3 seconds
|
|
setTimeout(() => {
|
|
gsap.to(toast, {
|
|
y: -50, opacity: 0, duration: 0.5, ease: 'power2.in',
|
|
onComplete: () => toast.remove()
|
|
});
|
|
}, 3000);
|
|
}
|
|
});
|
|
|
|
// Word cloud visualization
|
|
function updateWordCloud() {
|
|
const container = document.getElementById('word-cloud-container');
|
|
container.innerHTML = '';
|
|
|
|
const width = container.offsetWidth;
|
|
const height = container.offsetHeight;
|
|
|
|
const wordData = Object.entries(words).map(([text, value]) => ({ text, value }));
|
|
|
|
// Sort by frequency
|
|
wordData.sort((a, b) => b.value - a.value);
|
|
|
|
// Take top 100 words
|
|
const topWords = wordData.slice(0, 100);
|
|
|
|
// Calculate min/max for scaling
|
|
const minCount = Math.min(...topWords.map(d => d.value)) || 1;
|
|
const maxCount = Math.max(...topWords.map(d => d.value)) || 1;
|
|
|
|
// Create SVG
|
|
const svg = d3.select('#word-cloud-container')
|
|
.append('svg')
|
|
.attr('width', width)
|
|
.attr('height', height)
|
|
.append('g')
|
|
.attr('transform', `translate(${width/2}, ${height/2})`);
|
|
|
|
// Create a simple layout
|
|
const fontSize = d => Math.max(16, Math.min(60, 16 + (d.value - minCount) / (maxCount - minCount || 1) * 44));
|
|
|
|
// Random position for words
|
|
let i = 0;
|
|
topWords.forEach(word => {
|
|
const angle = (i / topWords.length) * 2 * Math.PI;
|
|
const radius = Math.min(width, height) * 0.4 * Math.random();
|
|
const x = radius * Math.cos(angle);
|
|
const y = radius * Math.sin(angle);
|
|
|
|
// Color based on value (green theme for plants/roots)
|
|
const colorScale = d3.scaleLinear()
|
|
.domain([minCount, maxCount])
|
|
.range(['#a8d5ba', '#2d6a4f']);
|
|
|
|
svg.append('text')
|
|
.attr('x', x)
|
|
.attr('y', y)
|
|
.attr('font-size', `${fontSize(word)}px`)
|
|
.attr('text-anchor', 'middle')
|
|
.attr('fill', colorScale(word.value))
|
|
.text(word.text);
|
|
|
|
i++;
|
|
});
|
|
}
|
|
|
|
// Initial render
|
|
updateWordCloud();
|
|
</script>
|
|
</body>
|
|
</html> |