1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

css & fix image display

This commit is contained in:
papee 2020-08-13 15:25:19 +02:00
parent 2d3f3998de
commit ad016e50bd
6 changed files with 55 additions and 28 deletions

View File

@ -163,20 +163,35 @@ input.btn-upload {
input.hide-upload {
position: relative;
left: -110px;
left: -80px;
-moz-opacity: 0;
filter: alpha(opacity=0);
opacity: 0;
z-index: 2;
width: 100px;
width: 80px;
margin-top: -20px;
cursor: pointer;
cursor: hand;
height: 49px;
height: 24px;
}
/* Paste Page */
.paste-wrapper {
width: 100%;
text-align: center;
background-color: #333333;
margin-bottom: 8px;
}
.pre-wrapper {
margin: 8px 0 8px 0;
}
.paste-wrapper img{
width: 94%;
}
#paste-content.linenums {
padding-left: 0;
}
@ -233,10 +248,22 @@ pre {
}
.form-group {
/* margin-bottom: 1rem; */
margin-bottom: 0;
}
.download-link {
border-top-left-radius: 3px !important;
border-bottom-left-radius: 3px !important;
}
.download-link a{
color: #eee;
}
.download-link a:hover{
text-decoration: none;
}
.select-date {
width: 320px;
float: right;
@ -288,11 +315,6 @@ form textarea {
clear: both;
}
.previous-pastes canvas {
display: block;
float: left;
margin-right: 5px;
}
html.local-storage .no-local-storage {
display: none;
@ -416,14 +438,15 @@ nav ul li a:hover {
}
.submenu ul {
display: none;
position: absolute;
margin: 6px 0 0px 9px;
margin: 6px 0 0px 0px;
width: fill-available;
z-index: 999;
border: 1px solid #666;
border-radius: 3px;
padding: 0;
width: 133px;
border-top: 0px;
}
.submenu li {
@ -450,7 +473,7 @@ nav ul li a:hover {
}
/* Responsive */
@media screen and (max-width: 800px) {
@media screen and (max-width: 840px) {
.topnav a:not(:first-child) {
display: none;
}
@ -471,4 +494,7 @@ nav ul li a:hover {
pre {
font-size: 70%;
}
}

View File

@ -744,11 +744,14 @@ if (content && key) {
let pasteContent = document.querySelector('#paste-content');
pasteContent.style.display = "none";
var img = document.createElement('img')
var imgWrapper = document.createElement('div');
imgWrapper.classList.add('paste-wrapper');
var img = document.createElement('img');
img.src = content;
img.style.maxWidth = '742px';
//img.style.maxWidth = '742px';
pasteContent.after(img);
pasteContent.after(imgWrapper);
imgWrapper.appendChild(img);
// Display Download button
document.querySelectorAll('.btn-clone').forEach((node) => node.style.display = "none")

View File

@ -10,7 +10,6 @@
<div class="d-flex justify-content-between">
<div>
<label class="col-form-label"><span class="blk-space"></span></label>
<div class="file-upload" v-if="support.fileUpload">
<input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'"
:disabled="isUploading">
@ -34,7 +33,7 @@
</div>
<div>
<div class="pre-wrapper">
<div class="progress" v-show="isLoading">
<div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>0bin - encrypted pastebin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="0bin is a client-side-encrypted
pastebin featuring burn after reading, history, and
a clipboard">

View File

@ -2,7 +2,6 @@
<div class="d-flex justify-content-between">
<div>
<label class="col-form-label"><span class="blk-space"></span></label>
<div class="file-upload" v-if="support.fileUpload">
<input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'"
:disabled="isUploading">
@ -26,7 +25,7 @@
</div>
<div>
<div class="pre-wrapper">
<div class="progress" v-show="isLoading">
<div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div>

View File

@ -33,9 +33,8 @@
<div>
<span class="paste-option btn-group">
<button class="btn btn-clone btn-secondary" @click.prevent="handleClone()">Clone</button>
<button class="btn btn-secondar" v-if="downloadLink.url">
<a :href="downloadLink.url" :download="downloadLink.name"> Download</a>
<button class="btn btn-secondary download-link" v-if="downloadLink.url">
<a :href="downloadLink.url" :download="downloadLink.name">Download</a>
</button>
<button class="btn btn-secondary">New Paste</button>
@ -56,9 +55,11 @@
%end
<pre id="paste-content" class="prettyprint">
<code>
{{ paste.content }}
</code>
<div class="paste-wrapper">
<code>
{{ paste.content }}
</code>
</div>
</pre>
<div class="d-flex justify-content-between down">
@ -69,7 +70,7 @@
<span class="paste-option btn-group">
<button class="btn btn-clone btn-secondary" @click.prevent="handleClone()">Clone</button>
<button class="btn btn-secondar" v-if="downloadLink.url">
<button class="btn btn-secondary download-link" v-if="downloadLink.url">
<a :href="downloadLink.url" :download="downloadLink.name"> Download</a>
</button>
@ -88,7 +89,6 @@
<div class="d-flex justify-content-between">
<div>
<label class="col-form-label">&nbsp;</label>
<div class="file-upload">
<button type="button" class="btn btn-danger" @click.prevent="handleCancelClone()">Cancel clone</button>
</div>