App-Music-ChordPro
view release on metacpan or search on metacpan
lib/ChordPro/Output/HTML.pm view on Meta::CPAN
my @styles = ( "default" );
for ( sort keys %styles ) {
next if /^(?:default|embed)$/ ;
next unless $styles{$_};
push( @styles, $_ );
}
push( @book,
'<html>',
'<head>',
'<meta charset="utf-8">' );
if ( delete $styles{embed} ) {
use File::LoadLines;
foreach my $class ( @styles ) {
my $style = CP->findres( $styles{$class}, class => "styles" );
next unless fs_test( 'rf', $style );
my @lines = loadlines($style, { fail => 'hard' } );
push( @book, "<style type=\"text/css\" ".
($class eq "default" ? "" : "media=\"$class\"").">",
@lines, "</style>" );
lib/ChordPro/res/abc/abc2svg/tohtml.js view on Meta::CPAN
.c {text-align: center}\n\
.r {text-align: right}\n\
}';
// no margin / header / footer when SVG page formatting
if (abc.page)
topmargin = botmargin = header = footer = 0
abc2svg.print('<!DOCTYPE html>\n\
<html>\n\
<meta charset="utf-8"/>\n\
<meta name="generator" content="abc2svg-' + abc2svg.version + '"/>\n\
<!-- CreationDate: ' + get_date() + '-->\n\
<style>\n\
body {width:' + cfmt.pagewidth.toFixed(0) +'px}\n\
svg {display:block}\n\
p {' + set_pstyle() + 'margin-top:0}\n\
p span {line-height:' + ((cfmt.lineskipfac * 100) | 0).toString() + '%}\n' +
((header || footer) ? media_f : media_s))
// important for chrome and --headless (abctopdf)
if (abc.page)
t/ref/040_html_1.html view on Meta::CPAN
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chordpro.css">
<link rel="stylesheet" href="chordpro_print.css" media="print">
</head>
<body>
<div class="song">
<style>
@page {
@top-center {
content: counter(song) ". Swing Low Sweet Chariot";
}
t/ref/040_html_2.html view on Meta::CPAN
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chordpro.css">
<link rel="stylesheet" href="chordpro_print.css" media="print">
</head>
<body>
<div class="song">
<style>
@page {
@top-center {
content: counter(song) ". Swing Low Sweet Chariot";
}
t/ref/040_html_3.html view on Meta::CPAN
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chordpro.css">
<link rel="stylesheet" href="chordpro_print.css" media="print">
</head>
<body>
<div class="song">
<style>
@page {
@top-center {
content: counter(song) ". Swing Low Sweet Chariot";
}
( run in 3.468 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )