Browse Source

* merge css code for buttons of zerobin & filebin

* small fixes
master
Alex 'AdUser' Z 6 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;
}
a.zerobin {
padding-left: 18px;
background: transparent no-repeat scroll left center;
font-size: 12pt;
/* filebin */
table.filebin.limits {
color: gray;
}
a.zerobin.create { background-image: url('/theme/img/create.png'); }
a.zerobin.download { background-image: url('/theme/img/download.png'); }
a.zerobin.upload { background-image: url('/theme/img/upload.png'); }
a.zerobin.latest { background-image: url('/theme/img/images.png'); }
table.filebin.files tr:nth-of-type(even) {
background-color: #EAEAEA;
}
/* imgbin */
div.img-preview {
margin: 5px;
display: inline-block;
vertical-align: top;
table.filebin.files td {
padding: 3px 5px;
}
span.filebin.error {
font-size: 14pt;
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 %>
</span>
% 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>
<hr/>

2
templates/filebin/latest.html.ep

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

12
templates/filebin/view.html.ep

@ -4,10 +4,10 @@
<h1><%= l('View file') %></h1>
<div>
<div>
<%= link_to l('Upload') => "/filebin", class => 'filebin upload' %>&nbsp;
<%= link_to l('Download') => $file->{path}, class => 'filebin download', download => $file->{fname} %>&nbsp;
<%= link_to l('Upload') => "/filebin", class => 'btn upload' %>&nbsp;
<%= link_to l('Download') => $file->{path}, class => 'btn download', download => $file->{fname} %>&nbsp;
% 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>
<hr/>
@ -15,9 +15,9 @@
% 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') %>
<%= tag audio => (src => $file->{path}, controls => 'controls', preload => 'metadata') => 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') %>
<%= tag video => (src => $file->{path}, controls => 'controls', preload => 'metadata') => l('HTML5-aware browser required') %>
% }
</div>
<hr/>
@ -25,7 +25,7 @@
<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('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>
% }
</table>

4
templates/zerobin/view.html.ep

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

Loading…
Cancel
Save