diff --git a/templates/filebin/create.html.ep b/templates/filebin/create.html.ep
new file mode 100644
index 0000000..a67b0ff
--- /dev/null
+++ b/templates/filebin/create.html.ep
@@ -0,0 +1,35 @@
+% layout 'default';
+% title 'Filebin -- Create';
+% my %times = (day => 1, week => 7, month => 30, quarter => 90, year => 365);
+% my @times = map { [l($_) => $times{$_}] } sort { $times{$a} <=> $times{$b} } keys(%times);
+% param expire => $times{ config->{filebin}->{expire} || 'year' };
+
Загрузить файл
+
+ <%= form_for "/filebin" => (method => 'POST', enctype => 'multipart/form-data') => begin %>
+
+
+ <%= submit_button l('Upload') %>
+
+
+ <%= tag 'label' => (for => 'expire') => l('Keep for') %>:
+ <%= select_field 'expire' => \@times %>
+
+% if (config->{filebin}->{show_latest}) {
+ <%= link_to l('Latest images') => "/filebin/latest", class => 'filebin latest' %>
+% }
+
+
+
+ <%= file_field 'file', required => 1 %>
+
+ <% end %>
+
+% my $size = sprintf "%.1f Mb", config->{filebin}->{file_maxsize} / 1024 ** 2;
+
+ <%= l('Max filesize') %> | : | <%= tag td => $size %>
+ <%= l('Max image') %> | : | <%= tag td => config->{filebin}->{image_maxres} %>
+
+
+% if (my $error = flash('error')) {
+ <%= tag span => (class => 'filebin error') => l(ucfirst($error)) %>
+% }
diff --git a/templates/filebin/latest.html.ep b/templates/filebin/latest.html.ep
new file mode 100644
index 0000000..48ec9c8
--- /dev/null
+++ b/templates/filebin/latest.html.ep
@@ -0,0 +1,24 @@
+% layout 'default';
+% title 'Filebin -- Latest';
+<%= l('Latest files') %>
+
+
+ <%= link_to l('Upload') => "/filebin", class => 'filebin upload' %>
+
+
+
+
+ T |
+ <%= l('Filename') %> |
+ <%= l('Info') %> |
+
+
+% my $files = stash('files') || [];
+% foreach my $file (@{ $files }) {
+ <%= $file->{ftype} %> |
+ <%= link_to $file->{fname} => $file->{url} %> |
+ <%= $file->{info} %> |
+
+% }
+
+
diff --git a/templates/filebin/view.html.ep b/templates/filebin/view.html.ep
new file mode 100644
index 0000000..72111de
--- /dev/null
+++ b/templates/filebin/view.html.ep
@@ -0,0 +1,32 @@
+% layout 'default';
+% title 'Filebin -- View';
+% my $file = stash('file') || {};
+<%= l('View file') %>
+
+
+ <%= link_to l('Upload') => "/filebin", class => 'filebin upload' %>
+ <%= link_to l('Download') => $file->{path}, class => 'filebin download', download => $file->{fname} %>
+% if (config->{filebin}->{show_latest}) {
+ <%= link_to l('Latest files') => "/filebin/latest", class => 'filebin latest' %>
+% }
+
+
+
+% if ($file->{ftype} eq 'i') {
+ <%= image $file->{path} %>
+% } elsif ($file->{ftype} eq 'a') {
+ <%= tag audio => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %>
+% } elsif ($file->{ftype} eq 'v') {
+ <%= tag video => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %>
+% }
+
+
+
+ <%= l('Name') %> | : | <%= $file->{fname} %> |
+ <%= l('Size') %> | : | <%= sprintf("%.1f kb", $file->{fsize} / 1024) %> |
+ <%= l('Mime') %> | : | <%= $file->{fmime} %> |
+% if ($file->{ftype} eq 'i' or $file->{ftype} eq 'v') {
+ <%= l('Image size') %> | : | <%= sprintf("%dx%d", $file->{res_w}, $file->{res_h}) %> |
+% }
+
+