Skip to content

Commit

Permalink
Highlight chorus with line
Browse files Browse the repository at this point in the history
  • Loading branch information
woshibiantai committed Jul 21, 2024
1 parent 6d7676b commit bf4004a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/assets/sample-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ export const sampleChordProChart =
[F]Gotta make you [G]understand
{comment: Chorus}
{start_of_chorus}
Never gonna [F]give you [G]up
Never gonna [Em]let you [Am]down
Never gonna [F]run [G]around and [E]desert [Am]you
Never gonna [F]make you [G]cry
Never gonna [Em]say good [Am]bye
Never gonna [F]tell a [G]lie and [E]hurt [Am]you`;
Never gonna [F]tell a [G]lie and [E]hurt [Am]you
{end_of_chorus}
`;
15 changes: 12 additions & 3 deletions src/components/ChordChartLine.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<template>
<p class="chordchart-body-paragraph-line">
<p
class="chordchart-body-paragraph-line"
:class="{
'chordchart-body-paragraph-line-chorus': line.type === 'chorus',
}"
>
<ChordChartLineItem
v-for="(item, index) in line.items"
:key="index"
Expand All @@ -26,7 +31,11 @@ defineProps({
flex-wrap: wrap;
}
.chordchart-body-paragraph-line-verse {
margin-left: 2em;
.chordchart-body-paragraph-line-chorus {
border-left: 1px solid #000;
&:last-child {
padding-bottom: 1.1em;
}
}
</style>

0 comments on commit bf4004a

Please sign in to comment.