Browse Source

* merge css code for buttons of zerobin & filebin

* small fixes
master
Alex 'AdUser' Z 7 years ago
parent
commit
a2fe24e8eb
  1. 33
      public/theme/css/default.css
  2. 2
      templates/filebin/create.html.ep
  3. 2
      templates/filebin/latest.html.ep
  4. 12
      templates/filebin/view.html.ep
  5. 4
      templates/zerobin/view.html.ep

33
public/theme/css/default.css

@ -144,25 +144,32 @@ div.paste {
text-align: justify; text-align: justify;
} }
a.zerobin { /* filebin */
padding-left: 18px; table.filebin.limits {
background: transparent no-repeat scroll left center; color: gray;
font-size: 12pt;
} }
a.zerobin.create { background-image: url('/theme/img/create.png'); } table.filebin.files tr:nth-of-type(even) {
a.zerobin.download { background-image: url('/theme/img/download.png'); } background-color: #EAEAEA;
a.zerobin.upload { background-image: url('/theme/img/upload.png'); } }
a.zerobin.latest { background-image: url('/theme/img/images.png'); }
/* imgbin */ table.filebin.files td {
div.img-preview { padding: 3px 5px;
margin: 5px;
display: inline-block;
vertical-align: top;
} }
span.filebin.error { span.filebin.error {
font-size: 14pt; font-size: 14pt;
color: red; color: red;
} }
/* common buttons for zerobin & filebin */
a.btn {
padding-left: 18px;
background: transparent no-repeat scroll left center;
font-size: 12pt;
}
a.btn.create { background-image: url('/theme/img/create.png'); }
a.btn.download { background-image: url('/theme/img/download.png'); }
a.btn.upload { background-image: url('/theme/img/upload.png'); }
a.btn.latest { background-image: url('/theme/img/images.png'); }

2
templates/filebin/create.html.ep

@ -15,7 +15,7 @@
<%= select_field 'expire' => \@times %> <%= select_field 'expire' => \@times %>
</span> </span>
% if (config->{filebin}->{show_latest}) { % if (config->{filebin}->{show_latest}) {
<%= link_to l('Latest images') => "/filebin/latest", class => 'filebin latest' %> <%= link_to l('Latest files') => "/filebin/latest", class => 'btn latest' %>
% } % }
</div> </div>
<hr/> <hr/>

2
templates/filebin/latest.html.ep

@ -3,7 +3,7 @@
<h1><%= l('Latest files') %></h1> <h1><%= l('Latest files') %></h1>
<div> <div>
<div> <div>
<%= link_to l('Upload') => "/filebin", class => 'filebin upload' %> <%= link_to l('Upload') => "/filebin", class => 'btn upload' %>
</div> </div>
<hr/> <hr/>
<table class="filebin files"> <table class="filebin files">

12
templates/filebin/view.html.ep

@ -4,10 +4,10 @@
<h1><%= l('View file') %></h1> <h1><%= l('View file') %></h1>
<div> <div>
<div> <div>
<%= link_to l('Upload') => "/filebin", class => 'filebin upload' %>&nbsp; <%= link_to l('Upload') => "/filebin", class => 'btn upload' %>&nbsp;
<%= link_to l('Download') => $file->{path}, class => 'filebin download', download => $file->{fname} %>&nbsp; <%= link_to l('Download') => $file->{path}, class => 'btn download', download => $file->{fname} %>&nbsp;
% if (config->{filebin}->{show_latest}) { % if (config->{filebin}->{show_latest}) {
<%= link_to l('Latest files') => "/filebin/latest", class => 'filebin latest' %>&nbsp; <%= link_to l('Latest files') => "/filebin/latest", class => 'btn latest' %>&nbsp;
% } % }
</div> </div>
<hr/> <hr/>
@ -15,9 +15,9 @@
% if ($file->{ftype} eq 'i') { % if ($file->{ftype} eq 'i') {
<%= image $file->{path} %> <%= image $file->{path} %>
% } elsif ($file->{ftype} eq 'a') { % } elsif ($file->{ftype} eq 'a') {
<%= tag audio => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %> <%= tag audio => (src => $file->{path}, controls => 'controls', preload => 'metadata') => l('HTML5-aware browser required') %>
% } elsif ($file->{ftype} eq 'v') { % } elsif ($file->{ftype} eq 'v') {
<%= tag video => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %> <%= tag video => (src => $file->{path}, controls => 'controls', preload => 'metadata') => l('HTML5-aware browser required') %>
% } % }
</div> </div>
<hr/> <hr/>
@ -25,7 +25,7 @@
<tr><td><%= l('Name') %></td><td>:</td><td><%= $file->{fname} %></td></tr> <tr><td><%= l('Name') %></td><td>:</td><td><%= $file->{fname} %></td></tr>
<tr><td><%= l('Size') %></td><td>:</td><td><%= sprintf("%.1f kb", $file->{fsize} / 1024) %></td></tr> <tr><td><%= l('Size') %></td><td>:</td><td><%= sprintf("%.1f kb", $file->{fsize} / 1024) %></td></tr>
<tr><td><%= l('Mime') %></td><td>:</td><td><%= $file->{fmime} %></td></tr> <tr><td><%= l('Mime') %></td><td>:</td><td><%= $file->{fmime} %></td></tr>
% if ($file->{ftype} eq 'i' or $file->{ftype} eq 'v') { % if (($file->{ftype} eq 'i' or $file->{ftype} eq 'v') and ($file->{res_w} or $file->{res_h})) {
<tr><td><%= l('Image size') %></td><td>:</td><td><%= sprintf("%dx%d", $file->{res_w}, $file->{res_h}) %></td></tr> <tr><td><%= l('Image size') %></td><td>:</td><td><%= sprintf("%dx%d", $file->{res_w}, $file->{res_h}) %></td></tr>
% } % }
</table> </table>

4
templates/zerobin/view.html.ep

@ -5,8 +5,8 @@
<h1><%= l('View paste') %></h1> <h1><%= l('View paste') %></h1>
<div> <div>
<div> <div>
<%= link_to l('Create new') => "/zerobin", class => 'zerobin create' %> <%= link_to l('Create new') => "/zerobin", class => 'btn create' %>
<%= link_to l('Download') => "/zerobin/$fname", class => 'zerobin download', download => $fname %> <%= link_to l('Download') => "/zerobin/$fname", class => 'btn download', download => $fname %>
</div> </div>
<div class="paste"> <div class="paste">
% if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') { % if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') {

Loading…
Cancel
Save