/[Frey]/trunk/lib/Frey/Web.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Web.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 161 by dpavlin, Thu Jul 17 19:33:51 2008 UTC revision 183 by dpavlin, Tue Sep 9 23:14:31 2008 UTC
# Line 35  sub _head_html { Line 35  sub _head_html {
35                  $path =~ s!^/!!;                  $path =~ s!^/!!;
36                  if ( $path =~ m/\.js$/ ) {                  if ( $path =~ m/\.js$/ ) {
37                          $out .= $self->_inline_path( $path ) ?                          $out .= $self->_inline_path( $path ) ?
38                                  qq|<script type="text/javascript">| . read_file($path) . qq|</script>| :                                  qq|<!-- $path --><script type="text/javascript">\n| . read_file($path) . qq|\n</script>| :
39                                  qq|<script type="text/javascript" src="/$path"></script>|;                                  qq|<script type="text/javascript" src="/$path"></script>|;
40                  } elsif ( $path =~ m/\.css$/ ) {                  } elsif ( $path =~ m/\.css$/ ) {
41                          $out .= $self->_inline_path( $path ) ?                          $out .= $self->_inline_path( $path ) ?
42                                  qq|<style type="text/css">| . read_file( $path ) . qq|</style>| :                                  qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| :
43                                  qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|;                                  qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|;
44                  } else {                  } else {
45                          confess "don't know how to render $path";                          confess "don't know how to render $path";
46                  }                  }
47                    $out .= "\n";
48          }          }
49          return $out;          return $out;
50  }  }
# Line 76  sub add_head { Line 77  sub add_head {
77    
78  our $reload_counter = 0;  our $reload_counter = 0;
79    
80    
81    =head2 page
82    
83      $self->page(
84            title => 'page title',
85            head  => '<!-- optional head markup -->',
86            body  => '<b>Page Body</b>',
87      );
88    
89    =cut
90    
91  sub page {  sub page {
92          my $self = shift;          my $self = shift;
93          my $a = {@_};          my $a = {@_};

Legend:
Removed from v.161  
changed lines
  Added in v.183

  ViewVC Help
Powered by ViewVC 1.1.26