Apache2-EmbedFLV

 view release on metacpan or  search on metacpan

lib/Apache2/EmbedFLV/Template.pm  view on Meta::CPAN

package Apache2::EmbedFLV::Template;

use strict;
use warnings;

use Template;

my $default_template=<<EOF;
<html>
<head>
</head>
<body>
<style media="screen" type="text/css">
body {
background:#262523 none repeat scroll 0 0;
color:#DDDDCC;
font-family:"Trebuchet MS",Helvetica,Arial,sans-serif;
font-size:14px;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.5em;
}
/* Header */
#header {
margin: 1em auto;
width: 40em;
}

#header a, #header a:visited, #header a:active {
color: #eef;
text-decoration: none;
}

#header a:hover {
color: #ccb;
}
#posts {
	margin: 0 auto;
	width: 42em; 
}

   .post {
	background-color:#363B39;
	border:1px solid #494949;
     margin: 1.5em 0;
     padding: 1em; 
   }
   

h1 {
       font-size: 3em;
       font-weight: bold;
       line-height: 1em;
     }
.video{
	text-align:center;
}
</style>
<div id="header">
<h1>Apache2::EmbedFLV</h1>
</div>

	<div id="posts">
	 <div class="post">
		<div class="video">
		[% video %]
		</div>
	 </div>
	</div>

<p align="center">Apache2::EmbedFLV - <a href="http://axiombox.com/apache2-embedflv">http://axiombox.com/apache2-embedflv</a></p>
	
</body></html>
EOF

my $video = <<EOF;
	<script type="text/javascript">
		%%% js %%%
	</script>

	<a  
		href="%%% url %%%"
		style="display:block;width:425px;height:300px;text-align:center;"
		id="player"> 
	</a> 

	<script language="JavaScript"> 
		flowplayer("player", "%%% flowplayer %%%"); 
	</script>
EOF

sub new {
	my $self = shift;
	return bless {};
}

sub process {
	my($self, %opts) = @_;
	my $opts = \%opts;

	if($opts->{template} and -r $opts->{template}) {
		open my $fh, "<", $opts->{template} or die $!;
		$default_template = "";



( run in 3.026 seconds using v1.01-cache-2.11-cpan-d8267643d1d )