diff --git a/assets/templates/components/list_tiles.html.ep b/assets/templates/components/list_tiles.html.ep new file mode 100644 index 0000000..56923aa --- /dev/null +++ b/assets/templates/components/list_tiles.html.ep @@ -0,0 +1,9 @@ +% my $tiles_per_row=4; +% my $rows= ceil((scalar @$tiles)/$tiles_per_row); +% my @items=@$tiles; +
+% foreach my $tile (@items) { +%= include '/components/show_tiles', tile => $tile, single => $single +% } +
+ diff --git a/assets/templates/components/show_tiles.html.ep b/assets/templates/components/show_tiles.html.ep new file mode 100644 index 0000000..9e94a78 --- /dev/null +++ b/assets/templates/components/show_tiles.html.ep @@ -0,0 +1,66 @@ +% if($single){ +% # Tiles detail +
+
+
+ + %= tag h2 => (id => $tile->id), (class => 'tile-heading') => $tile->title + +
+ +
+ %= tag p => (id => $tile->id.'_conent'), (class => 'tile-content') => $tile->content +
+
+
+% } else { +% # Tiles Grid +
+
+
+
+
+
+

+ % if ($tile->type eq "toggle"){ + + <%= $tile->title =%> + + % } else { + + <%= $tile->title =%> + + %} +

+
+
+
+
+
+
+ + % if ($tile->type ne "toggle"){ + + % } elsif ($tile->type eq "toggle" && $tile->status == "0") + + % } else { + + % } + +
+
+
+
+
+ % if(defined $tile->picture()) { + %= image '/thumb/'.$tile->title.'.jpg' => (class => 'img-responsive') , width=> '260px', alt => $tile->title, itemprop => "image" + % } else { + %= image '/thumb/no-image.jpg' => (class => 'img-responsive') , width=> '260px', alt => $tile->title, itemprop => "image" + % } +
+
+% } \ No newline at end of file