Skip to content

Commit 2123989

Browse files
committed
content: staccato and legato
1 parent dc5736b commit 2123989

File tree

4 files changed

+86
-1
lines changed

4 files changed

+86
-1
lines changed

src/components/MarkdownLink.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useSidePanel } from '../context/SidePanelContext';
33
import { vocabulary } from '../data/vocabulary';
44
import { ArrowSquareOut, CircleNotch } from '@phosphor-icons/react';
55

6-
const MarkdownLink = ({ href, children, className, ...props }) => {
6+
const MarkdownLink = ({ href, children, width = 450, className, ...props }) => {
77
const { openSidePanel } = useSidePanel();
88
const isExternal = href?.startsWith('http') || href?.startsWith('https');
99
const isVocab =
@@ -35,6 +35,7 @@ const MarkdownLink = ({ href, children, className, ...props }) => {
3535
>
3636
<LazyVocabComponent />
3737
</Suspense>,
38+
width,
3839
);
3940
} else {
4041
console.warn(`Vocabulary term or loader not found: ${term}`);

src/data/vocab/legato.jsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from 'react';
2+
import { YoutubeLogoIcon } from '@phosphor-icons/react';
3+
import MarkdownLink from '../../components/MarkdownLink';
4+
5+
export default function Legato() {
6+
return (
7+
<div className="space-y-6 font-mono text-sm leading-relaxed">
8+
<p>
9+
<strong className="text-current">Legato</strong> is a form of musical articulation. In modern notation, it indicates that musical notes are played or sung smoothly and connected.
10+
</p>
11+
12+
<div className="border-l-2 border-blue-500/50 pl-4 py-1 italic text-gray-400 text-xs">
13+
"Tied together, smooth, and flowing."
14+
</div>
15+
16+
<p>
17+
It is often indicated with a slur (a curved line) over or under the notes that are to be joined.
18+
</p>
19+
20+
<div className="flex flex-col gap-4 pt-4 border-t border-white/10">
21+
<div className="flex items-center gap-2 text-xs uppercase tracking-widest font-bold text-gray-500">
22+
<span>See also:</span>
23+
<MarkdownLink href="/vocab/staccato" className="text-orange-400 hover:underline" width={600}>Staccato</MarkdownLink>
24+
</div>
25+
26+
<a
27+
href="https://www.youtube.com/watch?v=ikppWbkG5TQ"
28+
target="_blank"
29+
rel="noopener noreferrer"
30+
className="flex items-center gap-2 text-xs text-red-400 hover:text-red-300 transition-colors"
31+
>
32+
<YoutubeLogoIcon size={16} weight="fill" />
33+
<span>Visualizing Staccato vs Legato</span>
34+
</a>
35+
</div>
36+
</div>
37+
);
38+
}

src/data/vocab/staccato.jsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from 'react';
2+
import { YoutubeLogoIcon } from '@phosphor-icons/react';
3+
import MarkdownLink from '../../components/MarkdownLink';
4+
5+
export default function Staccato() {
6+
return (
7+
<div className="space-y-6 font-mono text-sm leading-relaxed">
8+
<p>
9+
<strong className="text-current">Staccato</strong> is a form of musical articulation. In modern notation, it signifies a note of shortened duration, separated from the note that may follow by silence.
10+
</p>
11+
12+
<div className="border-l-2 border-orange-500/50 pl-4 py-1 italic text-gray-400 text-xs">
13+
"Detached, disconnected, and sharp."
14+
</div>
15+
16+
<p>
17+
It is often indicated with a small dot above or below the note head.
18+
</p>
19+
20+
<div className="flex flex-col gap-4 pt-4 border-t border-white/10">
21+
<div className="flex items-center gap-2 text-xs uppercase tracking-widest font-bold text-gray-500">
22+
<span>See also:</span>
23+
<MarkdownLink href="/vocab/legato" className="text-blue-400 hover:underline" width={600} >Legato</MarkdownLink>
24+
</div>
25+
26+
<a
27+
href="https://www.youtube.com/watch?v=ikppWbkG5TQ"
28+
target="_blank"
29+
rel="noopener noreferrer"
30+
className="flex items-center gap-2 text-xs text-red-400 hover:text-red-300 transition-colors"
31+
>
32+
<YoutubeLogoIcon size={16} weight="fill" />
33+
<span>Visualizing Staccato vs Legato</span>
34+
</a>
35+
</div>
36+
</div>
37+
);
38+
}

src/data/vocabulary.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,12 @@ export const vocabulary = {
8383
title: 'ETL (Extract, Transform, Load)',
8484
loader: () => import('./vocab/etl'),
8585
},
86+
staccato: {
87+
title: 'Staccato',
88+
loader: () => import('./vocab/staccato'),
89+
},
90+
legato: {
91+
title: 'Legato',
92+
loader: () => import('./vocab/legato'),
93+
},
8694
};

0 commit comments

Comments
 (0)