<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rubric Commons - Cross-Disciplinary Capstone Marketplace</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Sans+3:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-primary: #0f0f1a;
--bg-secondary: #1a1a2e;
--bg-tertiary: #252540;
--fg-primary: #f5f5f0;
--fg-muted: #9ca3af;
--accent-gold: #d4a853;
--accent-gold-light: #f0c674;
--accent-teal: #4ecdc4;
--accent-coral: #e07a5f;
--card-bg: rgba(37, 37, 64, 0.7);
--border: rgba(212, 168, 83, 0.2);
}
* {
box-sizing: border-box;
}
body {
font-family: 'Source Sans 3', sans-serif;
background: var(--bg-primary);
color: var(--fg-primary);
min-height: 100vh;
overflow-x: hidden;
}
h1, h2, h3, .display-font {
font-family: 'Playfair Display', serif;
}
#network-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.glass-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border: 1px solid var(--border);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
border-color: var(--accent-gold);
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(212, 168, 83, 0.15);
}
.license-badge {
font-size: 0.65rem;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-weight: 600;
letter-spacing: 0.05em;
}
.cc-by { background: rgba(78, 205, 196, 0.2); color: var(--accent-teal); }
.cc-by-sa { background: rgba(212, 168, 83, 0.2); color: var(--accent-gold-light); }
.cc-by-nc { background: rgba(224, 122, 95, 0.2); color: var(--accent-coral); }
.cc-public { background: rgba(255, 255, 255, 0.1); color: var(--fg-muted); }
.nav-link {
position: relative;
padding: 0.5rem 0;
}
.nav-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--accent-gold);
transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
width: 100%;
}
.btn-primary {
background: linear-gradient(135deg, var(--accent-gold), #c9953d);
color: var(--bg-primary);
font-weight: 600;
padding: 0.75rem 1.5rem;
border-radius: 8px;
transition: all 0.3s ease;
border: none;
cursor: pointer;
}
.btn-primary:hover {
transform: scale(1.02);
box-shadow: 0 8px 24px rgba(212, 168, 83, 0.4);
}
.btn-secondary {
background: transparent;
border: 1px solid var(--accent-gold);
color: var(--accent-gold);
padding: 0.75rem 1.5rem;
border-radius: 8px;
transition: all 0.3s ease;
cursor: pointer;
}
.btn-secondary:hover {
background: rgba(212, 168, 83, 0.1);
}
.tab-btn {
padding: 0.75rem 1.25rem;
border-radius: 8px;
transition: all 0.3s ease;
cursor: pointer;
border: none;
background: transparent;
color: var(--fg-muted);
}
.tab-btn:hover {
color: var(--fg-primary);
background: rgba(255, 255, 255, 0.05);
}
.tab-btn.active {
background: var(--accent-gold);
color: var(--bg-primary);
font-weight: 600;
}
.category-pill {
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.85rem;
cursor: pointer;
transition: all 0.3s ease;
border: 1px solid var(--border);
background: transparent;
color: var(--fg-muted);
}
.category-pill:hover, .category-pill.active {
border-color: var(--accent-gold);
color: var(--accent-gold);
background: rgba(212, 168, 83, 0.1);
}
.stat-card {
text-align: center;
padding: 1.5rem;
}
.stat-value {
font-size: 2.5rem;
font-weight: 700;
color: var(--accent-gold);
font-family: 'Playfair Display', serif;
}
.suggestion-card {
border-left: 3px solid var(--accent-teal);
padding: 1rem 1.25rem;
margin-bottom: 0.75rem;
background: rgba(78, 205, 196, 0.05);
border-radius: 0 8px 8px 0;
animation: slideIn 0.5s ease forwards;
opacity: 0;
transform: translateX(-20px);
}
@keyframes slideIn {
to {
opacity: 1;
transform: translateX(0);
}
}
.chart-bar {
height: 8px;
border-radius: 4px;
background: linear-gradient(90deg, var(--accent-gold), var(--accent-teal));
transform-origin: left;
animation: growBar 1s ease forwards;
}
@keyframes growBar {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.modal-overlay.active {
opacity: 1;
pointer-events: auto;
}
.modal-content {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 16px;
max-width: 700px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
transform: scale(0.9) translateY(20px);
transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
transform: scale(1) translateY(0);
}
.typing-indicator span {
display: inline-block;
width: 8px;
height: 8px;
background: var(--accent-gold);
border-radius: 50%;
margin: 0 2px;
animation: bounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
0%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-6px); }
}
.fade-in {
animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
.search-input {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1rem 0.75rem 2.75rem;
color: var(--fg-primary);
width: 100%;
transition: all 0.3s ease;
}
.search-input:focus {
outline: none;
border-color: var(--accent-gold);
background: rgba(255, 255, 255, 0.08);
}
.search-input::placeholder {
color: var(--fg-muted);
}
.score-ring {
stroke-dasharray: 251;
stroke-dashoffset: 251;
animation: fillRing 1.5s ease forwards;
}
@keyframes fillRing {
to { stroke-dashoffset: var(--offset); }
}
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--accent-gold);
}
</style>
</head>
<body>
<canvas id="network-canvas"></canvas>
<div class="relative z-10 min-h-screen">
<!-- Navigation -->
<nav class="fixed top-0 left-0 right-0 z-50 glass-card border-t-0 border-l-0 border-r-0">
<div class="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between">
<div class="flex items-center gap-3">
<svg class="w-10 h-10" viewBox="0 0 40 40" fill="none">
<circle cx="20" cy="20" r="18" stroke="var(--accent-gold)" stroke-width="2"/>
<path d="M12 20h16M20 12v16M14 14l12 12M26 14L14 26" stroke="var(--accent-gold)" stroke-width="1.5" opacity="0.5"/>
<circle cx="20" cy="20" r="6" fill="var(--accent-gold)"/>
</svg>
<span class="display-font text-xl font-bold">Rubric Commons</span>
</div>
<div class="hidden md:flex items-center gap-8">
<button class="nav-link text-sm font-medium active" data-section="marketplace">Marketplace</button>
<button class="nav-link text-sm font-medium" data-section="analytics">Analytics</button>
<button class="nav-link text-sm font-medium" data-section="contribute">Contribute</button>
</div>
<div class="flex items-center gap-4">
<button class="btn-secondary text-sm hidden sm:block">Sign In</button>
<button class="btn-primary text-sm">Upload Rubric</button>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="pt-32 pb-16 px-6">
<div class="max-w-7xl mx-auto text-center">
<h1 class="text-4xl md:text-6xl lg:text-7xl font-bold mb-6 fade-in" style="line-height: 1.1;">
Share, Improve, <span style="color: var(--accent-gold);">Measure</span>
</h1>
<p class="text-lg md:text-xl text-gray-400 max-w-2xl mx-auto mb-10 fade-in stagger-1">
A collaborative marketplace for cross-disciplinary capstone rubrics with AI-powered improvement suggestions and comprehensive analytics.
</p>
<!-- Search Bar -->
<div class="relative max-w-2xl mx-auto mb-8 fade-in stagger-2">
<svg class="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
<input type="text" class="search-input" placeholder="Search rubrics by discipline, criteria, or author..." id="search-input">
</div>
<!-- Category Filters -->
<div class="flex flex-wrap justify-center gap-3 mb-12 fade-in stagger-3" id="category-filters">
<button class="category-pill active" data-category="all">All Disciplines</button>
<button class="category-pill" data-category="stem">STEM</button>
<button class="category-pill" data-category="humanities">Humanities</button>
<button class="category-pill" data-category="business">Business</button>
<button class="category-pill" data-category="arts">Arts & Design</button>
<button class="category-pill" data-category="health">Health Sciences</button>
</div>
<!-- Stats Row -->
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 max-w-4xl mx-auto fade-in stagger-4">
<div class="glass-card stat-card rounded-xl">
<div class="stat-value" data-count="847">0</div>
<div class="text-gray-400 text-sm">Rubrics</div>
</div>
<div class="glass-card stat-card rounded-xl">
<div class="stat-value" data-count="124">0</div>
<div class="text-gray-400 text-sm">Institutions</div>
</div>
<div class="glass-card stat-card rounded-xl">
<div class="stat-value" data-count="2340">0</div>
<div class="text-gray-400 text-sm">Downloads</div>
</div>
<div class="glass-card stat-card rounded-xl">
<div class="stat-value" data-count="456">0</div>
<div class="text-gray-400 text-sm">Adaptations</div>
</div>
</div>
</div>
</section>
<!-- Marketplace Section -->
<section class="py-16 px-6" id="marketplace-section">
<div class="max-w-7xl mx-auto">
<!-- Tabs -->
<div class="flex flex-wrap gap-2 mb-8">
<button class="tab-btn active" data-tab="trending">Trending</button>
<button class="tab-btn" data-tab="recent">Recent</button>
<button class="tab-btn" data-tab="top-rated">Top Rated</button>
<button class="tab-btn" data-tab="most-adapted">Most Adapted</button>
</div>
<!-- Rubric Grid -->
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6" id="rubric-grid">
<!-- Cards will be rendered by JS -->
</div>
</div>
</section>
<!-- Analytics Section -->
<section class="py-16 px-6 hidden" id="analytics-section">
<div class="max-w-7xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold mb-8">Analytics Dashboard</h2>
<div class="grid lg:grid-cols-3 gap-6">
<!-- Main Chart -->
<div class="lg:col-span-2 glass-card rounded-2xl p-6">
<h3 class="text-lg font-semibold mb-6">Rubric Usage Over Time</h3>
<div class="h-64 relative" id="usage-chart">
<!-- Chart rendered by JS -->
</div>
</div>
<!-- Score Distribution -->
<div class="glass-card rounded-2xl p-6">
<h3 class="text-lg font-semibold mb-6">Quality Distribution</h3>
<div class="flex justify-center mb-6">
<svg width="160" height="160" viewBox="0 0 160 160">
<circle cx="80" cy="80" r="60" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="12"/>
<circle cx="80" cy="80" r="60" fill="none" stroke="var(--accent-gold)" stroke-width="12"
class="score-ring" style="--offset: 75;" transform="rotate(-90 80 80)"/>
<text x="80" y="75" text-anchor="middle" fill="var(--fg-primary)" font-size="32" font-weight="bold" font-family="Playfair Display">87</text>
<text x="80" y="95" text-anchor="middle" fill="var(--fg-muted)" font-size="12">Avg Score</text>
</svg>
</div>
<div class="space-y-3">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Clarity</span>
<span class="text-gray-400">92%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div class="chart-bar" style="width: 92%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Alignment</span>
<span class="text-gray-400">88%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div class="chart-bar" style="width: 88%; animation-delay: 0.2s"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Reliability</span>
<span class="text-gray-400">85%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div class="chart-bar" style="width: 85%; animation-delay: 0.4s"></div>
</div>
</div>
</div>
</div>
<!-- Discipline Breakdown -->
<div class="lg:col-span-2 glass-card rounded-2xl p-6">
<h3 class="text-lg font-semibold mb-6">Downloads by Discipline</h3>
<div class="grid grid-cols-2 md:grid-cols-5 gap-4" id="discipline-chart">
<!-- Rendered by JS -->
</div>
</div>
<!-- Top Contributors -->
<div class="glass-card rounded-2xl p-6">
<h3 class="text-lg font-semibold mb-6">Top Contributors</h3>
<div class="space-y-4" id="contributors-list">
<!-- Rendered by JS -->
</div>
</div>
</div>
</div>
</section>
<!-- Contribute Section -->
<section class="py-16 px-6 hidden" id="contribute-section">
<div class="max-w-4xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Contribute a Rubric</h2>
<p class="text-gray-400 mb-8">Share your expertise with the academic community. All contributions are licensed under Creative Commons.</p>
<div class="glass-card rounded-2xl p-8">
<form id="contribute-form" class="space-y-6">
<div>
<label class="block text-sm font-medium mb-2">Rubric Title</label>
<input type="text" class="search-input" placeholder="e.g., Interdisciplinary Research Capstone Assessment">
</div>
<div class="grid md:grid-cols-2 gap-6">
<div>
<label class="block text-sm font-medium mb-2">Primary Discipline</label>
<select class="search-input">
<option>Select discipline...</option>
<option>STEM</option>
<option>Humanities</option>
<option>Business</option>
<option>Arts & Design</option>
<option>Health Sciences</option>
<option>Cross-Disciplinary</option>
</select>
</div>
<div>
<label class="block text-sm font-medium mb-2">License Type</label>
<select class="search-input" id="license-select">
<option value="cc-by">CC BY - Attribution</option>
<option value="cc-by-sa">CC BY-SA - Attribution & ShareAlike</option>
<option value="cc-by-nc">CC BY-NC - Attribution & NonCommercial</option>
<option value="public">Public Domain</option>
</select>
</div>
</div>
<div>
<label class="block text-sm font-medium mb-2">Description</label>
<textarea class="search-input h-32 resize-none" placeholder="Describe the purpose and context of this rubric..."></textarea>
</div>
<div>
<label class="block text-sm font-medium mb-2">Upload Rubric File</label>
<div class="border-2 border-dashed border-gray-700 rounded-xl p-8 text-center hover:border-gray-500 transition-colors cursor-pointer">
<svg class="w-12 h-12 mx-auto mb-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/>
</svg>
<p class="text-gray-400">Drag and drop or click to upload</p>
<p class="text-gray-600 text-sm mt-1">PDF, DOCX, or Markdown</p>
</div>
</div>
<div class="pt-4 flex gap-4">
<button type="button" class="btn-secondary flex-1">Save Draft</button>
<button type="submit" class="btn-primary flex-1">Submit for Review</button>
</div>
</form>
</div>
</div>
</section>
</div>
<!-- Rubric Detail Modal -->
<div class="modal-overlay" id="rubric-modal">
<div class="modal-content">
<div class="p-6 border-b border-gray-800">
<div class="flex justify-between items-start">
<div>
<span class="license-badge cc-by mb-2 inline-block" id="modal-license">CC BY</span>
<h2 class="text-2xl font-bold" id="modal-title">Rubric Title</h2>
<p class="text-gray-400 text-sm mt-1" id="modal-author">by Author Name</p>
</div>
<button class="text-gray-500 hover:text-white transition-colors" onclick="closeModal()">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
</div>
<div class="p-6">
<div class="grid md:grid-cols-3 gap-4 mb-6">
<div class="text-center p-4 bg-gray-800/50 rounded-lg">
<div class="text-2xl font-bold text-gold" style="color: var(--accent-gold)" id="modal-downloads">0</div>
<div class="text-gray-400 text-sm">Downloads</div>
</div>
<div class="text-center p-4 bg-gray-800/50 rounded-lg">
<div class="text-2xl font-bold text-teal-400" id modal-adaptations>0</div>
<div class="text-gray-400 text-sm">Adaptations</div>
</div>
<div class="text-center p-4 bg-gray-800/50 rounded-lg">
<div class="text-2xl font-bold text-coral" style="color: var(--accent-coral)" id="modal-score">0</div>
<div class="text-gray-400 text-sm">Quality Score</div>
</div>
</div>
<div class="mb-6">
<h3 class="font-semibold mb-3">Description</h3>
<p class="text-gray-400" id="modal-description">Description goes here...</p>
</div>
<!-- AI Suggestions -->
<div class="mb-6">
<h3 class="font-semibold mb-3 flex items-center gap-2">
<svg class="w-5 h-5" style="color: var(--accent-teal)" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
</svg>
AI Improvement Suggestions
</h3>
<div id="suggestions-container">
<div class="typing-indicator p-4">
<span></span><span></span><span></span>
</div>
</div>
</div>
<div class="flex gap-4">
<button class="btn-secondary flex-1">
<span class="flex items-center justify-center gap-2">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
</svg>
Download
</span>
</button>
<button class="btn-primary flex-1">
<span class="flex items-center justify-center gap-2">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/>
</svg>
Adapt & Remix
</span>
</button>
</div>
</div>
</div>
</div>
<script>
// Data
const rubrics = [
{
id: 1,
title: "Interdisciplinary Research Capstone",
author: "Dr. Sarah Chen",
institution: "Stanford University",
category: "stem",
license: "cc-by",
downloads: 234,
adaptations: 18,
score: 94,
description: "A comprehensive rubric for evaluating interdisciplinary research projects that bridge STEM and humanities methodologies. Includes criteria for integration of multiple disciplinary perspectives.",
criteria: ["Research Question", "Methodology", "Integration", "Analysis", "Communication"]
},
{
id: 2,
title: "Creative Portfolio Assessment",
author: "Prof. Marcus Webb",
institution: "RISD",
category: "arts",
license: "cc-by-sa",
downloads: 189,
adaptations: 31,
score: 91,
description: "Evaluates creative portfolios with emphasis on conceptual development, technical execution, and critical reflection. Adaptable across visual arts disciplines.",
criteria: ["Concept", "Process", "Technique", "Presentation", "Reflection"]
},
{
id: 3,
title: "Business Case Analysis",
author: "Dr. Emily Torres",
institution: "Wharton School",
category: "business",
license: "cc-by-nc",
downloads: 312,
adaptations: 45,
score: 88,
description: "Framework for assessing business case analyses with focus on strategic thinking, quantitative reasoning, and actionable recommendations.",
criteria: ["Problem Definition", "Analysis", "Recommendations", "Feasibility", "Communication"]
},
{
id: 4,
title: "Clinical Practice Reflection",
author: "Prof. James Liu",
institution: "Johns Hopkins",
category: "health",
license: "cc-by",
downloads: 156,
adaptations: 22,
score: 92,
description: "Rubric for evaluating clinical practice reflections in health sciences. Emphasizes evidence-based practice, ethical reasoning, and professional development.",
criteria: ["Clinical Knowledge", "Ethics", "Reflection", "Professionalism", "Growth"]
},
{
id: 5,
title: "Digital Humanities Project",
author: "Dr. Ana Rodriguez",
institution: "MIT",
category: "humanities",
license: "cc-by-sa",
downloads: 278,
adaptations: 39,
score: 89,
description: "Assessment criteria for digital humanities capstones including technical implementation, scholarly rigor, and public engagement components.",
criteria: ["Scholarship", "Technology", "Design", "Impact", "Documentation"]
},
{
id: 6,
title: "Engineering Design Portfolio",
author: "Prof. David Kim",
institution: "Georgia Tech",
category: "stem",
license: "cc-by",
downloads: 421,
adaptations: 67,
score: 95,
description: "Comprehensive evaluation of engineering design projects from problem identification through prototyping and testing. Emphasizes user-centered design.",
criteria: ["Problem Framing", "Ideation", "Prototyping", "Testing", "Iteration"]
}
];
const suggestions = [
{
type: "clarity",
text: "Consider adding performance level descriptors for the 'Integration' criterion to improve inter-rater reliability."
},
{
type: "alignment",
text: "The 'Communication' criterion could benefit from discipline-specific language benchmarks."
},
{
type: "enhancement",
text: "Adding a self-assessment component would increase student engagement with the rubric."
}
];
const contributors = [
{ name: "Dr. Sarah Chen", contributions: 12, avatar: "SC" },
{ name: "Prof. David Kim", contributions: 9, avatar: "DK" },
{ name: "Dr. Ana Rodriguez", contributions: 7, avatar: "AR" },
{ name: "Prof. Marcus Webb", contributions: 6, avatar: "MW" },
{ name: "Dr. Emily Torres", contributions: 5, avatar: "ET" }
];
const disciplineData = [
{ name: "STEM", value: 342, color: "#4ecdc4" },
{ name: "Humanities", value: 218, color: "#d4a853" },
{ name: "Business", value: 189, color: "#e07a5f" },
{ name: "Arts", value: 156, color: "#9b59b6" },
{ name: "Health", value: 134, color: "#3498db" }
];
// Canvas Network Animation
const canvas = document.getElementById('network-canvas');
const ctx = canvas.getContext('2d');
let particles = [];
let animationId = null;
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
function initParticles() {
particles = [];
const count = Math.min(Math.floor((canvas.width * canvas.height) / 15000), 80);
for (let i = 0; i < count; i++) {
particles.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
vx: (Math.random() - 0.5) * 0.5,
vy: (Math.random() - 0.5) * 0.5,
radius: Math.random() * 2 + 1
});
}
}
function drawNetwork() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw connections
for (let i = 0; i < particles.length; i++) {
for (let j = i + 1; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 150) {
const opacity = Math.max(0, (1 - dist / 150) * 0.15);
ctx.beginPath();
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.strokeStyle = `rgba(212, 168, 83, ${opacity})`;
ctx.lineWidth = 1;
ctx.stroke();
}
}
}
// Draw particles
particles.forEach(p => {
ctx.beginPath();
ctx.arc(p.x, p.y, Math.max(0.5, p.radius), 0, Math.PI * 2);
ctx.fillStyle = 'rgba(212, 168, 83, 0.4)';
ctx.fill();
});
}
function updateParticles() {
particles.forEach(p => {
p.x += p.vx;
p.y += p.vy;
if (p.x < 0 || p.x > canvas.width) p.vx *= -1;
if (p.y < 0 || p.y > canvas.height) p.vy *= -1;
});
}
function animate() {
if (prefersReducedMotion) {
drawNetwork();
return;
}
updateParticles();
drawNetwork();
animationId = requestAnimationFrame(animate);
}
// Initialize canvas
resizeCanvas();
initParticles();
animate();
window.addEventListener('resize', () => {
resizeCanvas();
initParticles();
});
// Render Functions
function renderRubrics(filter = 'all') {
const grid = document.getElementById('rubric-grid');
const filtered = filter === 'all' ? rubrics : rubrics.filter(r => r.category === filter);
grid.innerHTML = filtered.map((rubric, index) => `
<div class="glass-card rounded-2xl p-6 cursor-pointer fade-in" style="animation-delay: ${index * 0.1}s" onclick="openModal(${rubric.id})">
<div class="flex justify-between items-start mb-4">
<span class="license-badge ${rubric.license}">${getLicenseLabel(rubric.license)}</span>
<span class="text-sm font-semibold" style="color: var(--accent-gold)">${rubric.score}/100</span>
</div>
<h3 class="text-lg font-semibold mb-2 line-clamp-2">${rubric.title}</h3>
<p class="text-gray-400 text-sm mb-4">${rubric.author}</p>
<p class="text-gray-500 text-sm mb-4 line-clamp-2">${rubric.description}</p>
<div class="flex flex-wrap gap-2 mb-4">
${rubric.criteria.slice(0, 3).map(c => `<span class="text-xs px-2 py-1 bg-gray-800 rounded">${c}</span>`).join('')}
${rubric.criteria.length > 3 ? `<span class="text-xs px-2 py-1 bg-gray-800 rounded">+${rubric.criteria.length - 3}</span>` : ''}
</div>
<div class="flex justify-between text-sm text-gray-500 pt-4 border-t border-gray-800">
<span>${rubric.downloads} downloads</span>
<span>${rubric.adaptations} adaptations</span>
</div>
</div>
`).join('');
}
function getLicenseLabel(license) {
const labels = {
'cc-by': 'CC BY',
'cc-by-sa': 'CC BY-SA',
'cc-by-nc': 'CC BY-NC',
'public': 'Public'
};
return labels[license] || license;
}
function renderDisciplineChart() {
const container = document.getElementById('discipline-chart');
const max = Math.max(...disciplineData.map(d => d.value));
container.innerHTML = disciplineData.map(d => `
<div class="text-center">
<div class="text-2xl font-bold" style="color: ${d.color}">${d.value}</div>
<div class="text-xs text-gray-400">${d.name}</div>
</div>
`).join('');
}
function renderContributors() {
const container = document.getElementById('contributors-list');
container.innerHTML = contributors.map((c, i) => `
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center text-sm font-semibold" style="color: var(--accent-gold)">
${c.avatar}
</div>
<div class="flex-1">
<div class="font-medium">${c.name}</div>
<div class="text-sm text-gray-500">${c.contributions} rubrics</div>
</div>
<div class="text-sm font-semibold" style="color: var(--accent-gold)">#${i + 1}</div>
</div>
`).join('');
}
function renderUsageChart() {
const container = document.getElementById('usage-chart');
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'];
const values = [120, 180, 250, 320, 410, 480];
const max = Math.max(...values);
container.innerHTML = `
<div class="flex h-full items-end justify-between gap-4 px-4">
${months.map((m, i) => `
<div class="flex-1 flex flex-col items-center gap-2">
<div class="w-full rounded-t-lg transition-all hover:opacity-80"
style="height: ${(values[i] / max) * 100}%; background: linear-gradient(180deg, var(--accent-gold), var(--accent-teal)); animation: growUp 1s ease forwards; animation-delay: ${i * 0.1}s; transform-origin: bottom; transform: scaleY(0);">
</div>
<span class="text-xs text-gray-500">${m}</span>
</div>
`).join('')}
</div>
`;
}
// Modal Functions
function openModal(id) {
const rubric = rubrics.find(r => r.id === id);
if (!rubric) return;
document.getElementById('modal-title').textContent = rubric.title;
document.getElementById('modal-author').textContent = `by ${rubric.author} · ${rubric.institution}`;
document.getElementById('modal-description').textContent = rubric.description;
document.getElementById('modal-downloads').textContent = rubric.downloads;
document.getElementById('modal-adaptations').textContent = rubric.adaptations;
document.getElementById('modal-score').textContent = rubric.score;
const licenseEl = document.getElementById('modal-license');
licenseEl.textContent = getLicenseLabel(rubric.license);
licenseEl.className = `license-badge ${rubric.license}`;
// Show typing then suggestions
const suggestionsContainer = document.getElementById('suggestions-container');
suggestionsContainer.innerHTML = '<div class="typing-indicator p-4"><span></span><span></span><span></span></div>';
setTimeout(() => {
suggestionsContainer.innerHTML = suggestions.map((s, i) => `
<div class="suggestion-card" style="animation-delay: ${i * 0.15}s">
<div class="flex items-center gap-2 mb-1">
<span class="text-xs font-semibold uppercase tracking-wide" style="color: var(--accent-teal)">${s.type}</span>
</div>
<p class="text-sm text-gray-300">${s.text}</p>
</div>
`).join('');
}, 1500);
document.getElementById('rubric-modal').classList.add('active');
document.body.style.overflow = 'hidden';
}
function closeModal() {
document.getElementById('rubric-modal').classList.remove('active');
document.body.style.overflow = '';
}
// Counter Animation
function animateCounters() {
const counters = document.querySelectorAll('[data-count]');
counters.forEach(counter => {
const target = parseInt(counter.dataset.count);
const duration = 2000;
const start = performance.now();
function update(currentTime) {
const elapsed = currentTime - start;
const progress = Math.min(elapsed / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
counter.textContent = Math.floor(target * eased);
if (progress < 1) {
requestAnimationFrame(update);
}
}
requestAnimationFrame(update);
});
}
// Event Listeners
document.querySelectorAll('.category-pill').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.category-pill').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
renderRubrics(btn.dataset.category);
});
});
document.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
// Could implement different sorting here
});
});
document.querySelectorAll('.nav-link').forEach(link => {
link.addEventListener('click', () => {
document.querySelectorAll('.nav-link').forEach(l => l.classList.remove('active'));
link.classList.add('active');
const section = link.dataset.section;
document.getElementById('marketplace-section').classList.toggle('hidden', section !== 'marketplace');
document.getElementById('analytics-section').classList.toggle('hidden', section !== 'analytics');
document.getElementById('contribute-section').classList.toggle('hidden', section !== 'contribute');
if (section === 'analytics') {
renderUsageChart();
renderDisciplineChart();
renderContributors();
}
});
});
document.getElementById('search-input').addEventListener('input', (e) => {
const query = e.target.value.toLowerCase();
const filtered = rubrics.filter(r =>
r.title.toLowerCase().includes(query) ||
r.author.toLowerCase().includes(query) ||
r.description.toLowerCase().includes(query)
);
const grid = document.getElementById('rubric-grid');
if (filtered.length === 0) {
grid.innerHTML = '<div class="col-span-full text-center py-12 text-gray-500">No rubrics found matching your search.</div>';
} else {
grid.innerHTML = filtered.map((rubric, index) => `
<div class="glass-card rounded-2xl p-6 cursor-pointer" onclick="openModal(${rubric.id})">
<div class="flex justify-between items-start mb-4">
<span class="license-badge ${rubric.license}">${getLicenseLabel(rubric.license)}</span>
<span class="text-sm font-semibold" style="color: var(--accent-gold)">${rubric.score}/100</span>
</div>
<h3 class="text-lg font-semibold mb-2">${rubric.title}</h3>
<p class="text-gray-400 text-sm mb-4">${rubric.author}</p>
<p class="text-gray-500 text-sm mb-4 line-clamp-2">${rubric.description}</p>
<div class="flex justify-between text-sm text-gray-500 pt-4 border-t border-gray-800">
<span>${rubric.downloads} downloads</span>
<span>${rubric.adaptations} adaptations</span>
</div>
</div>
`).join('');
}
});
document.getElementById('rubric-modal').addEventListener('click', (e) => {
if (e.target === e.currentTarget) {
closeModal();
}
});
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
closeModal();
}
});
// Initialize
renderRubrics();
animateCounters();
</script>
</body>
</html>