1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00
This commit is contained in:
sam 2012-04-29 01:01:23 +07:00
commit 3582629582
6 changed files with 196 additions and 13 deletions

View File

@ -42,9 +42,6 @@ body {
float:right;
}
#paste-content {
background-color:white;
}
select {
width: 135px;
@ -63,6 +60,11 @@ ul, ol {
margin: 0;
}
li {
margin-left: -4px;
}
p {
margin: 0 0 20px;
}
@ -85,6 +87,11 @@ p {
list-style-type: none;
}
#paste-content {
background-color: white;
}
form textarea {
overflow-y:auto;
}
@ -93,6 +100,10 @@ button.btn, input[type="submit"].btn {
margin-left: 5px;
}
.submit-form {
display: none;
}
.well {
padding-bottom: 40px;
padding-right: 17px;
@ -142,7 +153,7 @@ li.L0, li.L1, li.L2, li.L3, li.L4,
li.L5, li.L6, li.L7, li.L8, li.L9
{
list-style-type: decimal;
background:inherit;
background: inherit;
}
#clip-container div:hover,

118
static/css/sunburst.css Normal file
View File

@ -0,0 +1,118 @@
/*
* Derived from einaros's Sons of Obsidian theme at
* http://studiostyl.es/schemes/son-of-obsidian by
* Alex Ford of CodeTunnel:
* http://CodeTunnel.com/blog/post/71/google-code-prettify-obsidian-theme
*/
.str
{
color: #EC7600;
}
.kwd
{
color: #93C763;
}
.com
{
color: #66747B;
}
.typ
{
color: #678CB1;
}
.lit
{
color: #FACD22;
}
.pun
{
color: #F1F2F3;
}
.pln
{
color: #F1F2F3;
}
.tag
{
color: #8AC763;
}
.atn
{
color: #E0E2E4;
}
.atv
{
color: #EC7600;
}
.dec
{
color: purple;
}
pre.prettyprint
{
border: 0px solid #888;
}
ol.linenums
{
margin-top: 0;
margin-bottom: 0;
}
.prettyprint {
background: #000;
}
li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9
{
color: #555;
list-style-type: decimal;
}
li.L1, li.L3, li.L5, li.L7, li.L9 {
background: #111;
}
@media print
{
.str
{
color: #060;
}
.kwd
{
color: #006;
font-weight: bold;
}
.com
{
color: #600;
font-style: italic;
}
.typ
{
color: #404;
font-weight: bold;
}
.lit
{
color: #044;
}
.pun
{
color: #440;
}
.pln
{
color: #000;
}
.tag
{
color: #006;
font-weight: bold;
}
.atn
{
color: #404;
}
.atv
{
color: #060;
}
}

View File

@ -55,10 +55,12 @@ zerobin = {
{
if (localStorage.getItem(i).split(';')[0].split(' ')[0] == zerobin.get_date()){
var display_date = localStorage.getItem(i).split(';')[0].split(' ')[1];
var on_at = 'at ';
}else{
var display_date = zerobin.get_date();
var on_at = 'on ';
}
pastes = pastes + '<li><a class="items" href="' + localStorage.getItem(i).split(';')[1] + '">' + display_date + '</a></li>';
pastes = pastes + '<li><a class="items" href="' + localStorage.getItem(i).split(';')[1] + '">' + on_at + display_date + '</a></li>';
}
if (!pastes){
return '<i class="grey">Your previous pastes will be saved in your browser <a href="http://www.w3.org/TR/webstorage/">localStorage</a>.</i>';
@ -168,4 +170,36 @@ $('#content').live('keyup change', function(){
/* Display previous pastes */
$('.previous-pastes .items').html(zerobin.get_pastes());
/* clone a paste */
$('.btn-clone').click(function(e){
e.preventDefault();
content_clone = '' ;
$("#paste-content li").each(function(index) {
content_clone = content_clone + $(this).text() + '\n';
});
$('.submit-form').show();
$('.paste-form').hide();
$('#content').val(content_clone);
$('#content').resize();
});
});

View File

@ -1,5 +1,4 @@
<form class="well" method="post" action="/paste/create">
<p class="paste-option">
<label for="expiration" >Expiration:</label>
<select id="expiration" name="expiration">
@ -10,14 +9,12 @@
</select>
<button type="submit" class="btn btn-primary">Submit</button>
<p>
<p>
<textarea rows="10" style="width:100%;"
class="input-xlarge"
id="content" name="content"></textarea>
</p>
</form>
%rebase base

View File

@ -44,4 +44,27 @@
</form>
</div>
<!-- For cloning -->
<span class="submit-form">
<form class="well" method="post" action="/paste/create">
<p class="paste-option">
<label for="expiration" >Expiration:</label>
<select id="expiration" name="expiration">
<option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option>
<option value="1_month">1 month</option>
<option value="never">Never</option>
</select>
<button type="submit" class="btn btn-primary">Submit</button>
<p>
<p>
<textarea rows="10" style="width:100%;"
class="input-xlarge"
id="content" name="content"></textarea>
</p>
</form>
</span>
%rebase base