use Reaction::UI::WidgetClass;
use aliased 'Reaction::UI::Widget::Container';
+use MooseX::Types::Moose 'HashRef';
class SiteLayout is Container, which {
+ has 'http_header' => (
+ isa => HashRef, is => 'rw',
+ default => sub { {} }
+ );
+
after fragment widget {
arg static_base => $_{viewport}->static_base_uri;
arg title => $_{viewport}->title;
};
implements fragment meta_info {
- render meta_member => over [keys %{$_{viewport}->meta_info}];
+ my $self = shift;
+ if ( $_{viewport}->meta_info->{'http_header'} ) {
+ $self->http_header( delete $_{viewport}->meta_info->{'http_header'} );
+ render 'meta_http_header' => over [keys %{$self->http_header}];
+ }
+ render 'meta_member' => over [keys %{$_{viewport}->meta_info}];
+ };
+
+ implements fragment meta_http_header {
+ arg 'meta_name' => $_;
+ arg 'meta_value' => shift->http_header->{$_};
};
implements fragment meta_member {
<title>[% title %]</title>
[% head_meta %]
+[% head_scripts %]
[% head_style %]
+[% rss_links %]
=for layout head_meta
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
[% meta_info %]
+=for layout meta_http_header
+
+<meta http-equiv="[% meta_name %]" content="[% meta_value %]" />[% "\n" %]
+
=for layout meta_member
<meta name="[% meta_name %]" content="[% meta_value %]" />[% "\n" %]
+=for layout head_scripts
+
=for layout head_style
+=for layout rss_links
+
=for layout body
[% inner %]
-=for layout header
-
-<span class="site_layout_title">[% title %]</span>
-
=cut
=for layout widget
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+[% doctype %]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
</html>
+=for layout doctype
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
=cut