A1z-HTML5-Template

 view release on metacpan or  search on metacpan

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

}; 

}




sub html_bootstrap_bluimp 
{
	return qq{<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
		<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-use-bootstrap-modal="false">
	    <!-- The container for the modal slides -->
	    <div class="slides"></div>
	    <!-- Controls for the borderless lightbox -->
	    <h3 class="title"></h3>
	    <a class="prev">‹</a>
	    <a class="next">›</a>
	    <a class="close">×</a>
	    <a class="play-pause"></a>
	    <ol class="indicator"></ol>
	    <!-- The modal dialog, which will be used to wrap the lightbox content -->

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

	my $file = "$in{file}" || "$_[0]"; 
	
	my $output_format = "$in{output_format}" || "$_[1]"; 	
	
	my $output_header = "$in{output_header}" || "$_[2]"; 
	
	my $out; 

	my $div4tabs;
	
	my @data; 
	
	if (-e -f "$file")
	{ 

		open(FILE, "$file") or die "$!";

		$out .= qq{\n<!--begin file output-->\n<div class="file_output">\n}; 
		
		# Step 1 
		# set the header as per format  

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

		elsif ($output_format eq 'accordion')
		{
			$out .= qq{<h2>$output_header</h2>\n<div id="accordion2" class="accordion"><!--118-->\n};
		} 
		elsif ($output_format eq 'menu') 
		{
			$out .= qq{<ul class="menu" id="menu">\n<li><a href="/">$output_header</a>\n<ul>};
		}
		elsif ($output_format eq 'tabs')
		{
			# special case for tabs since the data needs to be formatted a little differently 
			
			$out .= qq{<h2>$output_header</h2>\n<div id="tabs">\n<ul>\n};
			
			my $sl = '0'; 
			
				while ( my $line = <FILE>) 
				{
					$sl++ if $line; 
					
					my ($h1, $div) = (''); 

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

			chomp $line; 
			
			$serial++ if $line; 
			
			my ($h1, $div) = (''); 
			
			if ($line) 				# make sure no output if line is empty
			{	
				$line =~ s! RN !\r\n!g;
				
				# split the file's lines into usable data according to separator used.
				if ($line =~ /\|/) 		
				{ 
					($h1, $div) = split(/\|/, $line, 2); 
				} 			# no (\|) # i.e., no enclosing with brackets.  was the culprit 
				elsif ($line =~ /\t+/) { 
					($h1, $div) = split(/\t+/, $line, 2); 
				} 
				elsif ($line =~ /\s+/) 
				{ 
					($h1, $div) = split(/\s+/, $line, 2); 

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

	if (-e -d "$in{images_dir}" and "$in{thumbs_dir}" )
	{
		opendir(TH, "$in{thumbs_dir}") or $in{error} .= qq{<p>$!</p>};
		my @thumbs = readdir(TH);
		close TH;

		foreach ( @thumbs ) 
		{
			if ( $_ and $_ =~ /(.jpg|.gif|.jpeg|.png|.tiff)$/ )
			{
				$out .= qq{\n<a href="$in{images_url}/$_" title="$_" data-gallery> <img src="$in{thumbs_url}/$_" alt="Image $_" width="$in{width}" height="$in{height}"> </a> \n};
			}
		}
	}
	else
	{
		$in{error} .= qq{<p>Image directory does not exist or is inaccessible. Make sure you provided the correct path.</p>};

		$out = $in{error};
	}



( run in 0.252 second using v1.01-cache-2.11-cpan-8d75d55dd25 )