Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
326 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
@import 'themes/dark3'; | ||
@import 'themes/text'; | ||
@import 'themes/print'; | ||
@import 'themes/print2'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@import '../abstract'; | ||
@import './common'; | ||
|
||
.cmTheme-print2 { | ||
background-color: white; | ||
|
||
.cmSong { | ||
@include base; | ||
color: #333; | ||
font-size: 14px; | ||
line-height: 1.4em; | ||
font-family: 'Menlo', 'Courier New', Courier, monospace; | ||
} | ||
|
||
// Sections | ||
.cmSection { | ||
border: 1px solid black; | ||
border-radius: 8px; | ||
padding: 0.4em; | ||
margin: 0.2em 0 0.2em 0; | ||
// below line only needed for wkhtmltopdf | ||
break-inside: avoid; | ||
} | ||
|
||
.cmSection-Chorus { | ||
background-color: #ededed; | ||
} | ||
|
||
.cmSectionLabel { | ||
font-weight: bold; | ||
font-size: 0.85em; | ||
text-transform: uppercase; | ||
} | ||
.cmSectionMultiplier { | ||
text-decoration: unset; | ||
font-size: 0.95em; | ||
} | ||
|
||
// Time signature | ||
.cmTimeSignature { | ||
font-weight: bold; | ||
} | ||
|
||
// Empty Lines - Hide to save print space | ||
.cmEmptyLine { | ||
display: none; | ||
} | ||
|
||
// Chordline | ||
.cmChordLine { | ||
font-weight: bolder; | ||
} | ||
|
||
.cmBarSeparator { | ||
opacity: 0.5; | ||
} | ||
|
||
.cmChordDuration, | ||
.cmSubBeatGroupOpener, | ||
.cmSubBeatGroupCloser { | ||
opacity: 0.7; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
const render = ({ line, lineClasses }) => { | ||
return `<p class="${lineClasses}">${line}</p>`; | ||
const render = ({ | ||
line, | ||
lineClasses, | ||
shouldOpenSection, | ||
sectionWrapperClasses, | ||
shouldClosePriorSection, | ||
shouldCloseFinalSection, | ||
}) => { | ||
let wrapper = ''; | ||
|
||
if (shouldClosePriorSection) { | ||
wrapper += '</div>'; | ||
} | ||
|
||
if (shouldOpenSection) { | ||
wrapper += `<div class="${sectionWrapperClasses}">`; | ||
} | ||
|
||
wrapper += `<p class="${lineClasses}">${line}</p>`; | ||
|
||
if (shouldCloseFinalSection) { | ||
wrapper += `</div>`; | ||
} | ||
|
||
return wrapper; | ||
}; | ||
export default render; |
Oops, something went wrong.