show next song in page view

This commit is contained in:
2025-01-03 21:01:56 +01:00
parent 898c6c4d7e
commit 88a574aa80
8 changed files with 41 additions and 39 deletions

View File

@@ -24,8 +24,9 @@
*ngFor="let line of getLines(section)"
[class.chord]="line.type === 0"
[class.disabled]="checkDisabled(i)"
[class.comment]="isComment(line.text)"
class="line"
>{{ line.text }}
>{{ transform(line.text) }}
</div>
</div>
<div *ngIf="sections.length===0" class="error">

View File

@@ -72,3 +72,10 @@
font-size: 1.2em;
font-weight: bold;
}
.comment {
color: #00b;
border-left: 2px solid #00b;
padding-left: 6px;
font-style: italic;
}

View File

@@ -124,4 +124,13 @@ export class SongTextComponent implements OnInit {
return 'show';
}
}
public transform(text: string): string {
if (this.isComment(text)) text = text.slice(1);
return text.trim();
}
public isComment(text: string) {
return text.startsWith('#');
}
}