|
| 1 | +import Link from "next/link" |
| 2 | +import { Calendar, Clock, ArrowRight, Tag } from "lucide-react" |
| 3 | + |
| 4 | +export default function ArticlesPage() { |
| 5 | + const articles = [ |
| 6 | + { |
| 7 | + title: "The Mathematics of Musical Patterns", |
| 8 | + excerpt: "Exploring how mathematical concepts like fractals and cellular automata can generate compelling musical sequences.", |
| 9 | + date: "2025-01-15", |
| 10 | + readTime: "8 min read", |
| 11 | + category: "Algorithm Design", |
| 12 | + tags: ["Mathematics", "Patterns", "Algorithms"], |
| 13 | + slug: "mathematics-of-musical-patterns", |
| 14 | + featured: true |
| 15 | + }, |
| 16 | + { |
| 17 | + title: "Building Real-time Audio Processing with Web Audio API", |
| 18 | + excerpt: "A deep dive into creating responsive audio effects and synthesis engines in the browser.", |
| 19 | + date: "2025-01-10", |
| 20 | + readTime: "12 min read", |
| 21 | + category: "Web Audio", |
| 22 | + tags: ["WebAudio", "JavaScript", "Real-time"], |
| 23 | + slug: "realtime-audio-processing-web-audio-api", |
| 24 | + featured: false |
| 25 | + } |
| 26 | + // Future articles will be added here |
| 27 | + ] |
| 28 | + |
| 29 | + const categories = [ |
| 30 | + { name: "Algorithm Design", count: 1 }, |
| 31 | + { name: "Web Audio", count: 1 }, |
| 32 | + { name: "Music Theory", count: 0 }, |
| 33 | + { name: "Plugin Development", count: 0 }, |
| 34 | + { name: "Machine Learning", count: 0 } |
| 35 | + ] |
| 36 | + |
| 37 | + const formatDate = (dateString: string) => { |
| 38 | + return new Date(dateString).toLocaleDateString('en-US', { |
| 39 | + year: 'numeric', |
| 40 | + month: 'long', |
| 41 | + day: 'numeric' |
| 42 | + }) |
| 43 | + } |
| 44 | + |
| 45 | + return ( |
| 46 | + <div className="max-w-7xl mx-auto px-4 py-8"> |
| 47 | + <div className="mb-12"> |
| 48 | + <h1 className="text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-400"> |
| 49 | + Articles |
| 50 | + </h1> |
| 51 | + <p className="text-xl text-gray-300 max-w-3xl"> |
| 52 | + Research, insights, and deep dives into music technology, algorithmic composition, and creative coding. |
| 53 | + </p> |
| 54 | + </div> |
| 55 | + |
| 56 | + <div className="grid lg:grid-cols-4 gap-8"> |
| 57 | + <div className="lg:col-span-3"> |
| 58 | + {/* Featured Article */} |
| 59 | + {articles.filter(article => article.featured).map((article, index) => ( |
| 60 | + <div key={index} className="bg-gradient-to-r from-blue-900/30 to-purple-900/30 rounded-lg p-8 mb-8 border border-blue-500/20"> |
| 61 | + <div className="flex items-center gap-2 mb-3"> |
| 62 | + <span className="bg-blue-600 text-white px-2 py-1 rounded text-xs font-semibold"> |
| 63 | + FEATURED |
| 64 | + </span> |
| 65 | + <span className="text-gray-400 text-sm">{article.category}</span> |
| 66 | + </div> |
| 67 | + <h2 className="text-3xl font-bold mb-4">{article.title}</h2> |
| 68 | + <p className="text-gray-300 text-lg mb-4">{article.excerpt}</p> |
| 69 | + <div className="flex items-center gap-4 mb-4"> |
| 70 | + <div className="flex items-center gap-1 text-gray-400 text-sm"> |
| 71 | + <Calendar size={14} /> |
| 72 | + {formatDate(article.date)} |
| 73 | + </div> |
| 74 | + <div className="flex items-center gap-1 text-gray-400 text-sm"> |
| 75 | + <Clock size={14} /> |
| 76 | + {article.readTime} |
| 77 | + </div> |
| 78 | + </div> |
| 79 | + <div className="flex items-center justify-between"> |
| 80 | + <div className="flex gap-2"> |
| 81 | + {article.tags.map((tag, tagIndex) => ( |
| 82 | + <span |
| 83 | + key={tagIndex} |
| 84 | + className="bg-gray-700 text-gray-300 px-2 py-1 rounded text-xs" |
| 85 | + > |
| 86 | + {tag} |
| 87 | + </span> |
| 88 | + ))} |
| 89 | + </div> |
| 90 | + <Link |
| 91 | + href={`/articles/${article.slug}`} |
| 92 | + className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md flex items-center gap-2 transition-colors" |
| 93 | + > |
| 94 | + Read Article <ArrowRight size={16} /> |
| 95 | + </Link> |
| 96 | + </div> |
| 97 | + </div> |
| 98 | + ))} |
| 99 | + |
| 100 | + {/* Regular Articles */} |
| 101 | + <div className="space-y-6"> |
| 102 | + {articles.filter(article => !article.featured).map((article, index) => ( |
| 103 | + <div key={index} className="bg-gray-800/50 rounded-lg p-6 border border-gray-700"> |
| 104 | + <div className="flex items-center gap-2 mb-3"> |
| 105 | + <span className="text-gray-400 text-sm">{article.category}</span> |
| 106 | + </div> |
| 107 | + <h3 className="text-2xl font-bold mb-3">{article.title}</h3> |
| 108 | + <p className="text-gray-300 mb-4">{article.excerpt}</p> |
| 109 | + <div className="flex items-center gap-4 mb-4"> |
| 110 | + <div className="flex items-center gap-1 text-gray-400 text-sm"> |
| 111 | + <Calendar size={14} /> |
| 112 | + {formatDate(article.date)} |
| 113 | + </div> |
| 114 | + <div className="flex items-center gap-1 text-gray-400 text-sm"> |
| 115 | + <Clock size={14} /> |
| 116 | + {article.readTime} |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + <div className="flex items-center justify-between"> |
| 120 | + <div className="flex gap-2"> |
| 121 | + {article.tags.map((tag, tagIndex) => ( |
| 122 | + <span |
| 123 | + key={tagIndex} |
| 124 | + className="bg-gray-700 text-gray-300 px-2 py-1 rounded text-xs" |
| 125 | + > |
| 126 | + {tag} |
| 127 | + </span> |
| 128 | + ))} |
| 129 | + </div> |
| 130 | + <Link |
| 131 | + href={`/articles/${article.slug}`} |
| 132 | + className="text-blue-400 hover:text-blue-300 flex items-center gap-1" |
| 133 | + > |
| 134 | + Read More <ArrowRight size={14} /> |
| 135 | + </Link> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + ))} |
| 139 | + </div> |
| 140 | + |
| 141 | + {/* Coming Soon */} |
| 142 | + <div className="mt-8 bg-gray-800/30 rounded-lg p-6 text-center"> |
| 143 | + <h3 className="text-xl font-semibold mb-3">More Articles Coming Soon</h3> |
| 144 | + <p className="text-gray-400"> |
| 145 | + Research in progress on topics like machine learning for music generation, |
| 146 | + advanced synthesis techniques, and creative coding workflows. |
| 147 | + </p> |
| 148 | + </div> |
| 149 | + </div> |
| 150 | + |
| 151 | + {/* Sidebar */} |
| 152 | + <div className="lg:col-span-1"> |
| 153 | + <div className="bg-gray-800/50 rounded-lg p-6 border border-gray-700"> |
| 154 | + <h3 className="text-lg font-semibold mb-4">Categories</h3> |
| 155 | + <div className="space-y-2"> |
| 156 | + {categories.map((category, index) => ( |
| 157 | + <div key={index} className="flex items-center justify-between"> |
| 158 | + <span className="text-gray-300">{category.name}</span> |
| 159 | + <span className="bg-gray-700 text-gray-300 px-2 py-1 rounded text-xs"> |
| 160 | + {category.count} |
| 161 | + </span> |
| 162 | + </div> |
| 163 | + ))} |
| 164 | + </div> |
| 165 | + </div> |
| 166 | + |
| 167 | + <div className="bg-gray-800/50 rounded-lg p-6 border border-gray-700 mt-6"> |
| 168 | + <h3 className="text-lg font-semibold mb-4">Newsletter</h3> |
| 169 | + <p className="text-gray-400 text-sm mb-4"> |
| 170 | + Get notified when new articles about music technology and creative coding are published. |
| 171 | + </p> |
| 172 | + <button className="w-full bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors"> |
| 173 | + Subscribe |
| 174 | + </button> |
| 175 | + </div> |
| 176 | + </div> |
| 177 | + </div> |
| 178 | + </div> |
| 179 | + ) |
| 180 | +} |
0 commit comments