Skip to content

Commit 6a3b12b

Browse files
committed
feat(docs): Quantum Cobalt v4.0 - Disruptive redesign with modern architecture
## Architecture Improvements - Split CSS tokens into separate files (colors, typography, spacing, motion) - Added comprehensive OKLCH color system with semantic diagram colors - Implemented motion system with reduced-motion support ## Visual Upgrades - Created LandingHero component with smooth entrance animations - Added grid background and gradient glow effects - Implemented staggered reveal animations for hero content ## Mermaid Diagram Fixes - Replaced hardcoded colors with CSS variable-based semantic classes - Added diagram color classes: success, process, decision, warning, error, start - Fixed dark/light mode contrast issues in all diagrams ## Academic Citation System - Created Bibliography.vue component with APA/IEEE formatting - Added citations.yaml data file with reference metadata - Implemented BibTeX export functionality ## Components Added - LandingHero.vue: Modern hero section with animations - Bibliography.vue: Academic citation display and management - tokens/*.css: Modular design token system ## Files Modified - Updated index pages (en/zh) to use new LandingHero - Fixed learning-path.md Mermaid diagrams (en/zh) - Refactored style.css for better maintainability
1 parent 713a4c3 commit 6a3b12b

13 files changed

Lines changed: 1303 additions & 339 deletions

File tree

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Citation data for C++ High Performance Guide
2+
# Format: YAML
3+
4+
citations:
5+
# Performance Engineering
6+
- id: "fog2015optimization"
7+
type: "article"
8+
authors:
9+
- "Fog, Agner"
10+
title: "Optimizing software in C++"
11+
year: 2015
12+
source: "Technical University of Denmark"
13+
url: "https://www.agner.org/optimize/"
14+
tags: ["cpp", "optimization", "performance"]
15+
16+
- id: "meyers2014effective"
17+
type: "book"
18+
authors:
19+
- "Meyers, Scott"
20+
title: "Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14"
21+
year: 2014
22+
publisher: "O'Reilly Media"
23+
isbn: "978-1491903995"
24+
tags: ["cpp", "modern-cpp", "best-practices"]
25+
26+
# Memory and Cache
27+
- id: "hennessy2019architecture"
28+
type: "book"
29+
authors:
30+
- "Hennessy, John L."
31+
- "Patterson, David A."
32+
title: "Computer Architecture: A Quantitative Approach"
33+
year: 2019
34+
edition: "6th"
35+
publisher: "Morgan Kaufmann"
36+
isbn: "978-0128119051"
37+
tags: ["architecture", "memory", "cache"]
38+
39+
- id: "drepper2007memory"
40+
type: "article"
41+
authors:
42+
- "Drepper, Ulrich"
43+
title: "What Every Programmer Should Know About Memory"
44+
year: 2007
45+
source: "Red Hat, Inc."
46+
url: "https://people.freebsd.org/~lstewart/articles/cpumemory.pdf"
47+
tags: ["memory", "cache", "numa"]
48+
49+
# SIMD and Vectorization
50+
- id: "intel2024intrinsics"
51+
type: "online"
52+
authors:
53+
- "Intel Corporation"
54+
title: "Intel Intrinsics Guide"
55+
year: 2024
56+
url: "https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html"
57+
accessed: "2024-01-15"
58+
tags: ["simd", "avx", "intrinsics"]
59+
60+
- id: "fogel2014optimization"
61+
type: "book"
62+
authors:
63+
- "Fogel, David B."
64+
title: "Introduction to Evolutionary Computation"
65+
year: 2014
66+
publisher: "Springer"
67+
doi: "10.1007/978-3-662-44874-8"
68+
tags: ["algorithms", "optimization"]
69+
70+
# Concurrency
71+
- id: "herlihy2012art"
72+
type: "book"
73+
authors:
74+
- "Herlihy, Maurice"
75+
- "Shavit, Nir"
76+
title: "The Art of Multiprocessor Programming"
77+
year: 2012
78+
publisher: "Morgan Kaufmann"
79+
isbn: "978-0123973375"
80+
tags: ["concurrency", "lock-free", "multithreading"]
81+
82+
- id: "williams2012concurrency"
83+
type: "book"
84+
authors:
85+
- "Williams, Anthony"
86+
title: "C++ Concurrency in Action: Practical Multithreading"
87+
year: 2012
88+
publisher: "Manning Publications"
89+
isbn: "978-1933988771"
90+
tags: ["cpp", "concurrency", "multithreading"]
91+
92+
# Algorithms
93+
- id: "knuth1997sorting"
94+
type: "book"
95+
authors:
96+
- "Knuth, Donald E."
97+
title: "The Art of Computer Programming, Volume 3: Sorting and Searching"
98+
year: 1997
99+
edition: "2nd"
100+
publisher: "Addison-Wesley"
101+
isbn: "978-0201896855"
102+
tags: ["algorithms", "sorting", "searching"]
103+
104+
- id: "khuong2013array"
105+
type: "conference"
106+
authors:
107+
- "Khuong, Paul-Virak"
108+
- "Leroy, Patrice"
109+
title: "Array Layouts for Comparison-Based Searching"
110+
year: 2013
111+
booktitle: "ACM SIGPLAN Notices"
112+
volume: "48"
113+
number: "6"
114+
pages: "49-61"
115+
doi: "10.1145/2499370.2462183"
116+
tags: ["algorithms", "searching", "memory-layout"]
117+
118+
# Benchmarking
119+
- id: "google2023benchmark"
120+
type: "online"
121+
authors:
122+
- "Google"
123+
title: "Google Benchmark - A microbenchmark support library"
124+
year: 2023
125+
url: "https://github.com/google/benchmark"
126+
accessed: "2024-01-15"
127+
tags: ["benchmarking", "performance"]
128+
129+
# Hash Tables
130+
- id: "knuth1998hashing"
131+
type: "book"
132+
authors:
133+
- "Knuth, Donald E."
134+
title: "The Art of Computer Programming, Volume 3: Sorting and Searching"
135+
year: 1998
136+
publisher: "Addison-Wesley Professional"
137+
pages: "547-563"
138+
tags: ["algorithms", "hashing"]
139+
140+
- id: "kipkemaboy2022hashtable"
141+
type: "online"
142+
authors:
143+
- "Kipkemaboy"
144+
title: "Hash Table Analysis: Robin Hood vs Swiss Tables"
145+
year: 2022
146+
url: "https://github.com/kipkemaboy/hashtable_analysis"
147+
accessed: "2024-01-15"
148+
tags: ["algorithms", "hashing", "performance"]
149+
150+
# Format styles supported: apa, ieee, acm
151+
default_style: "apa"
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
<script setup lang="ts">
2+
import { computed } from 'vue'
3+
4+
interface Citation {
5+
id: string
6+
type: 'article' | 'book' | 'conference' | 'online'
7+
authors: string[]
8+
title: string
9+
year: number
10+
source?: string
11+
publisher?: string
12+
booktitle?: string
13+
volume?: string
14+
number?: string
15+
pages?: string
16+
doi?: string
17+
url?: string
18+
isbn?: string
19+
edition?: string
20+
accessed?: string
21+
tags?: string[]
22+
}
23+
24+
const props = defineProps<{
25+
citations: Citation[]
26+
style?: 'apa' | 'ieee' | 'acm'
27+
title?: string
28+
}>()
29+
30+
const sortedCitations = computed(() =>
31+
[...props.citations].sort((a, b) => a.id.localeCompare(b.id))
32+
)
33+
34+
const citationStyle = computed(() => props.style || 'apa')
35+
36+
function formatAPA(citation: Citation): string {
37+
const authors = citation.authors.length > 2
38+
? `${citation.authors[0]} et al.`
39+
: citation.authors.join(' & ')
40+
41+
let result = `${authors} (${citation.year}). ${citation.title}.`
42+
43+
if (citation.type === 'article' && citation.source) {
44+
result += ` *${citation.source}*`
45+
} else if (citation.type === 'book' && citation.publisher) {
46+
result += ` ${citation.publisher}`
47+
} else if (citation.type === 'conference' && citation.booktitle) {
48+
result += ` In *${citation.booktitle}*`
49+
if (citation.pages) result += ` (pp. ${citation.pages})`
50+
}
51+
52+
return result
53+
}
54+
55+
function formatIEEE(citation: Citation): string {
56+
const authors = citation.authors.join(', ')
57+
58+
let result = `${authors}, "${citation.title},"`
59+
60+
if (citation.type === 'book') {
61+
if (citation.edition) result += ` ${citation.edition} ed.`
62+
if (citation.publisher) result += ` ${citation.publisher},`
63+
} else if (citation.type === 'conference' && citation.booktitle) {
64+
result += ` in *${citation.booktitle}*`
65+
if (citation.pages) result += `, pp. ${citation.pages},`
66+
} else if (citation.type === 'article' && citation.source) {
67+
result += ` *${citation.source}*`
68+
if (citation.volume) result += `, vol. ${citation.volume}`
69+
if (citation.number) result += `, no. ${citation.number}`
70+
}
71+
72+
result += ` ${citation.year}.`
73+
74+
return result
75+
}
76+
77+
function formatCitation(citation: Citation): string {
78+
switch (citationStyle.value) {
79+
case 'ieee':
80+
return formatIEEE(citation)
81+
case 'apa':
82+
default:
83+
return formatAPA(citation)
84+
}
85+
}
86+
87+
function generateBibTeX(citation: Citation): string {
88+
const typeMap: Record<string, string> = {
89+
article: 'article',
90+
book: 'book',
91+
conference: 'inproceedings',
92+
online: 'misc'
93+
}
94+
const bibtexType = typeMap[citation.type] || 'misc'
95+
96+
let bibtex = `@${bibtexType}{${citation.id},\n`
97+
bibtex += ` author = {${citation.authors.join(' and ')}},\n`
98+
bibtex += ` title = {${citation.title}},\n`
99+
bibtex += ` year = {${citation.year}},\n`
100+
101+
if (citation.publisher) bibtex += ` publisher = {${citation.publisher}},\n`
102+
if (citation.booktitle) bibtex += ` booktitle = {${citation.booktitle}},\n`
103+
if (citation.doi) bibtex += ` doi = {${citation.doi}},\n`
104+
if (citation.url) bibtex += ` url = {${citation.url}},\n`
105+
if (citation.isbn) bibtex += ` isbn = {${citation.isbn}},\n`
106+
if (citation.pages) bibtex += ` pages = {${citation.pages}},\n`
107+
108+
bibtex += '}'
109+
return bibtex
110+
}
111+
112+
function copyBibTeX(citation: Citation) {
113+
const bibtex = generateBibTeX(citation)
114+
navigator.clipboard.writeText(bibtex)
115+
}
116+
</script>
117+
118+
<template>
119+
<section class="wp-bibliography">
120+
<h2 v-if="title">{{ title }}</h2>
121+
<ol class="wp-bibliography-list">
122+
<li
123+
v-for="citation in sortedCitations"
124+
:key="citation.id"
125+
class="wp-bibliography-item"
126+
>
127+
<span class="wp-bibliography-id">[{{ citation.id }}]</span>
128+
<span class="wp-bibliography-text">
129+
{{ formatCitation(citation) }}
130+
</span>
131+
<div class="wp-bibliography-actions">
132+
<a
133+
v-if="citation.doi"
134+
:href="`https://doi.org/${citation.doi}`"
135+
target="_blank"
136+
rel="noopener"
137+
class="wp-bibliography-link"
138+
>
139+
DOI
140+
</a>
141+
<a
142+
v-if="citation.url"
143+
:href="citation.url"
144+
target="_blank"
145+
rel="noopener"
146+
class="wp-bibliography-link"
147+
>
148+
Link
149+
</a>
150+
<button
151+
class="wp-bibliography-bibtex"
152+
@click="copyBibTeX(citation)"
153+
title="Copy BibTeX citation"
154+
>
155+
BibTeX
156+
</button>
157+
</div>
158+
</li>
159+
</ol>
160+
</section>
161+
</template>
162+
163+
<style scoped>
164+
.wp-bibliography {
165+
margin: var(--wp-space-7) 0;
166+
padding: var(--wp-space-5);
167+
border: 1px solid var(--wp-line-1);
168+
border-radius: var(--wp-radius-2);
169+
background: var(--wp-surface-1);
170+
}
171+
172+
.wp-bibliography h2 {
173+
margin-top: 0;
174+
margin-bottom: var(--wp-space-4);
175+
color: var(--wp-ink-1);
176+
font-size: 1.2rem;
177+
font-weight: 700;
178+
}
179+
180+
.wp-bibliography-list {
181+
margin: 0;
182+
padding-left: var(--wp-space-5);
183+
}
184+
185+
.wp-bibliography-item {
186+
margin-bottom: var(--wp-space-4);
187+
color: var(--wp-ink-2);
188+
font-size: 0.95rem;
189+
line-height: 1.7;
190+
}
191+
192+
.wp-bibliography-item:last-child {
193+
margin-bottom: 0;
194+
}
195+
196+
.wp-bibliography-id {
197+
font-family: var(--wp-font-mono);
198+
font-size: 0.85em;
199+
color: var(--wp-accent-primary);
200+
margin-right: var(--wp-space-2);
201+
}
202+
203+
.wp-bibliography-text {
204+
color: var(--wp-ink-2);
205+
}
206+
207+
.wp-bibliography-actions {
208+
display: inline-flex;
209+
gap: var(--wp-space-2);
210+
margin-left: var(--wp-space-3);
211+
}
212+
213+
.wp-bibliography-link {
214+
padding: 0.15rem 0.4rem;
215+
border-radius: var(--wp-radius-1);
216+
background: var(--wp-accent-soft);
217+
color: var(--wp-accent-primary);
218+
font-size: 0.75rem;
219+
font-weight: 600;
220+
text-decoration: none;
221+
transition: all var(--wp-transition-fast);
222+
}
223+
224+
.wp-bibliography-link:hover {
225+
background: var(--wp-accent-primary);
226+
color: white;
227+
}
228+
229+
.wp-bibliography-bibtex {
230+
padding: 0.15rem 0.4rem;
231+
border: 1px solid var(--wp-line-1);
232+
border-radius: var(--wp-radius-1);
233+
background: var(--wp-surface-2);
234+
color: var(--wp-ink-3);
235+
font-size: 0.75rem;
236+
font-weight: 600;
237+
cursor: pointer;
238+
transition: all var(--wp-transition-fast);
239+
}
240+
241+
.wp-bibliography-bibtex:hover {
242+
border-color: var(--wp-accent-primary);
243+
color: var(--wp-accent-primary);
244+
}
245+
</style>

0 commit comments

Comments
 (0)