App-Music-ChordPro

 view release on metacpan or  search on metacpan

lib/ChordPro/Output/HTML.pm  view on Meta::CPAN

    my ( $self, $sb ) = @_;

    my @book;
    my $cfg = $::config->{html} // {};
    $cfg->{styles}->{display} //= "chordpro.css";
    $cfg->{styles}->{print} //= "chordpro_print.css";

    push( @book,
	  '<html>',
	  '<head>',
	  '<meta charset="utf-8">' );
    foreach ( sort keys %{ $cfg->{styles} } ) {
	push( @book,
	      '<link rel="stylesheet" href="'.$cfg->{styles}->{$_}.'"'.
	      ( $_ =~ /^(display|default)$/ ? "" : qq{ media="$_"} ).
	      '>' );
    }
    push( @book, '</head>',
	  '<body>',
	);

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/40_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/40_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/40_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 0.302 second using v1.01-cache-2.11-cpan-4d50c553e7e )