mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
chore: some HTML/CSS cleanup
This commit is contained in:
parent
17fbaee878
commit
f2efc54d0a
15 changed files with 222 additions and 313 deletions
|
@ -72,14 +72,6 @@ const globalSetup = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const preloader = $('.preloader');
|
|
||||||
const main = $('main');
|
|
||||||
|
|
||||||
if (preloader && main) {
|
|
||||||
preloader.remove();
|
|
||||||
main.id = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// CAPTCHA refresh
|
// CAPTCHA refresh
|
||||||
const captchaContainer = $('.captcha_container');
|
const captchaContainer = $('.captcha_container');
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class TagsInput {
|
||||||
this.element.style.display = 'none';
|
this.element.style.display = 'none';
|
||||||
|
|
||||||
this.containerNode = makeEl('<div class="tags-input"></div>');
|
this.containerNode = makeEl('<div class="tags-input"></div>');
|
||||||
this.inputNode = makeEl('<input class="input" type="text" placeholder="32 tags maximum" value="" />');
|
this.inputNode = makeEl('<input class="input" type="text" placeholder="Type a comma to separate each tag..." value="" />');
|
||||||
this.containerNode.appendChild(this.inputNode);
|
this.containerNode.appendChild(this.inputNode);
|
||||||
|
|
||||||
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
||||||
|
|
|
@ -333,7 +333,7 @@ class TagsInput {
|
||||||
this.element.style.display = 'none';
|
this.element.style.display = 'none';
|
||||||
|
|
||||||
this.containerNode = makeEl('<div class="tags-input"></div>');
|
this.containerNode = makeEl('<div class="tags-input"></div>');
|
||||||
this.inputNode = makeEl('<input class="input" type="text" placeholder="32 tags maximum" value="" />');
|
this.inputNode = makeEl('<input class="input" type="text" placeholder="Type a comma to separate each tag..." value="" />');
|
||||||
this.containerNode.appendChild(this.inputNode);
|
this.containerNode.appendChild(this.inputNode);
|
||||||
|
|
||||||
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
||||||
|
@ -501,14 +501,6 @@ const globalSetup = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const preloader = $('.preloader');
|
|
||||||
const main = $('main');
|
|
||||||
|
|
||||||
if (preloader && main) {
|
|
||||||
preloader.remove();
|
|
||||||
main.id = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// CAPTCHA refresh
|
// CAPTCHA refresh
|
||||||
const captchaContainer = $('.captcha_container');
|
const captchaContainer = $('.captcha_container');
|
||||||
|
|
||||||
|
|
2
public/assets/bundle/archive.min.js
vendored
2
public/assets/bundle/archive.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -54,7 +54,7 @@ class TagsInput {
|
||||||
this.element.style.display = 'none';
|
this.element.style.display = 'none';
|
||||||
|
|
||||||
this.containerNode = makeEl('<div class="tags-input"></div>');
|
this.containerNode = makeEl('<div class="tags-input"></div>');
|
||||||
this.inputNode = makeEl('<input class="input" type="text" placeholder="32 tags maximum" value="" />');
|
this.inputNode = makeEl('<input class="input" type="text" placeholder="Type a comma to separate each tag..." value="" />');
|
||||||
this.containerNode.appendChild(this.inputNode);
|
this.containerNode.appendChild(this.inputNode);
|
||||||
|
|
||||||
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
||||||
|
@ -222,14 +222,6 @@ const globalSetup = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const preloader = $('.preloader');
|
|
||||||
const main = $('main');
|
|
||||||
|
|
||||||
if (preloader && main) {
|
|
||||||
preloader.remove();
|
|
||||||
main.id = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// CAPTCHA refresh
|
// CAPTCHA refresh
|
||||||
const captchaContainer = $('.captcha_container');
|
const captchaContainer = $('.captcha_container');
|
||||||
|
|
||||||
|
|
2
public/assets/bundle/generic.min.js
vendored
2
public/assets/bundle/generic.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -333,7 +333,7 @@ class TagsInput {
|
||||||
this.element.style.display = 'none';
|
this.element.style.display = 'none';
|
||||||
|
|
||||||
this.containerNode = makeEl('<div class="tags-input"></div>');
|
this.containerNode = makeEl('<div class="tags-input"></div>');
|
||||||
this.inputNode = makeEl('<input class="input" type="text" placeholder="32 tags maximum" value="" />');
|
this.inputNode = makeEl('<input class="input" type="text" placeholder="Type a comma to separate each tag..." value="" />');
|
||||||
this.containerNode.appendChild(this.inputNode);
|
this.containerNode.appendChild(this.inputNode);
|
||||||
|
|
||||||
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
this.element.parentNode.insertBefore(this.containerNode, this.element.nextSibling);
|
||||||
|
@ -501,14 +501,6 @@ const globalSetup = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const preloader = $('.preloader');
|
|
||||||
const main = $('main');
|
|
||||||
|
|
||||||
if (preloader && main) {
|
|
||||||
preloader.remove();
|
|
||||||
main.id = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// CAPTCHA refresh
|
// CAPTCHA refresh
|
||||||
const captchaContainer = $('.captcha_container');
|
const captchaContainer = $('.captcha_container');
|
||||||
|
|
||||||
|
|
2
public/assets/bundle/user_profile.min.js
vendored
2
public/assets/bundle/user_profile.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -282,3 +282,55 @@ code {
|
||||||
.flex--space-between {
|
.flex--space-between {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paginator > a {
|
||||||
|
margin: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginator > a.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginator__sort > th {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginator__sort--down, .paginator__sort--up {
|
||||||
|
background-color: lightblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginator__sort--down:after {
|
||||||
|
padding-left: 0.25rem;
|
||||||
|
content: '▼';
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginator__sort--up:after {
|
||||||
|
padding-left: 0.25rem;
|
||||||
|
content: '▲';
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.hidden + .loading_container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 99999999;
|
||||||
|
background-image: url('/assets/img/loader/<?= random_int(1, 3) ?>.gif');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-color: #FFF;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pp-width-auto {
|
||||||
|
width: auto;
|
||||||
|
}
|
|
@ -1,55 +1,3 @@
|
||||||
<style>
|
|
||||||
.paginator > a {
|
|
||||||
margin: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paginator > a.disabled {
|
|
||||||
pointer-events: none;
|
|
||||||
color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paginator__sort > th {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paginator__sort--down, .paginator__sort--up {
|
|
||||||
background-color: lightblue;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paginator__sort--down:after {
|
|
||||||
padding-left: 0.25rem;
|
|
||||||
content: '▼';
|
|
||||||
}
|
|
||||||
|
|
||||||
.paginator__sort--up:after {
|
|
||||||
padding-left: 0.25rem;
|
|
||||||
content: '▲';
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
visibility: hidden;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.hidden + .loading_container {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
z-index: 99999999;
|
|
||||||
background-image: url('/assets/img/loader/<?= random_int(1, 3) ?>.gif');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-color: #FFF;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<main class="bd-main">
|
<main class="bd-main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="bd-duo">
|
<div class="bd-duo">
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<link rel="stylesheet" href="theme/bulma/css/bulma-tagsinput.min.css"/>
|
<link rel="stylesheet" href="theme/bulma/css/bulma-tagsinput.min.css"/>
|
||||||
<main class="bd-main">
|
<main class="container">
|
||||||
<div class="container">
|
|
||||||
<div class="bd-duo">
|
<div class="bd-duo">
|
||||||
<div class="bd-lead">
|
<div class="bd-lead">
|
||||||
<?php if (isset($global_site_info['banner'])): ?>
|
<?php if (isset($global_site_info['banner'])): ?>
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
New Paste
|
New Paste
|
||||||
</h1>
|
</h1>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<nav class="level">
|
<div class="level">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="level-item is-pulled-left" style="margin-right: 5px;">
|
<div class="level-item is-pulled-left" style="margin-right: 5px;">
|
||||||
|
@ -36,7 +35,7 @@
|
||||||
<!-- Format -->
|
<!-- Format -->
|
||||||
<div class="level-item is-pulled-left mx-1">
|
<div class="level-item is-pulled-left mx-1">
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<select data-live-search="true" name="format">
|
<select name="format">
|
||||||
<?php
|
<?php
|
||||||
foreach (PP_HIGHLIGHT_FORMATS as $code => $name) {
|
foreach (PP_HIGHLIGHT_FORMATS as $code => $name) {
|
||||||
if (isset($_POST['format'])) {
|
if (isset($_POST['format'])) {
|
||||||
|
@ -58,43 +57,28 @@
|
||||||
<input class="button is-info" type="submit" name="submit" id="submit" value="Paste"/>
|
<input class="button is-info" type="submit" name="submit" id="submit" value="Paste"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</div>
|
||||||
<!-- Text area -->
|
<!-- Text area -->
|
||||||
<textarea class="textarea" rows="15" id="code" name="paste_data" onkeyup="countChars(this);"
|
<textarea class="textarea" rows="15" id="code" name="paste_data" onkeyup="countChars(this);"
|
||||||
onkeydown="return catchTab(this,event)"
|
onkeydown="return catchTab(this,event)"
|
||||||
placeholder="Paste Or Drop Text File Here."><?php echo (isset($_POST['paste_data'])) ? pp_html_escape($_POST['paste_data']) : ''; ?></textarea>
|
placeholder="Paste Or Drop Text File Here."><?php echo (isset($_POST['paste_data'])) ? pp_html_escape($_POST['paste_data']) : ''; ?></textarea>
|
||||||
<p id="charNum"><b>File Size: </b><span style="color: green;">1000/1000Kb</span></p>
|
<p id="charNum"><b>File Size: </b><span style="color: green;">1000/1000Kb</span></p>
|
||||||
<br>
|
|
||||||
<!-- Tag system -->
|
<!-- Tag system -->
|
||||||
<div class='rows'>
|
|
||||||
<div class='row is-full'>
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column">
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="field_tags">Tags</label>
|
<label class="label" for="field_tags">Tags</label>
|
||||||
<small>Type a comma to separate each tag.</small>
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input name="tag_input" class="input js-tag-input" id="field_tags"
|
<input name="tag_input" class="input js-tag-input" id="field_tags"
|
||||||
value="<?= (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; ?>"/>
|
value="<?= (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; ?>"/>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="help">32 tags maximum.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- This whole hack is just to get the "Expiry" and "Visibility" fields on the same line -->
|
||||||
</div>
|
<div class="level">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class='row is-full'>
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column is-5">
|
|
||||||
<nav class="level">
|
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
<div class="level-item is-pulled-left mr-1">
|
<div class="level-item is-pulled-left mr-1">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="subtitle has-text-weight-semibold "
|
<label class="label" for="paste_expire_date">Expiry</label>
|
||||||
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">
|
|
||||||
Expiry
|
|
||||||
</div>
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<?php
|
<?php
|
||||||
|
@ -105,8 +89,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<select name="paste_expire_date">
|
<select name="paste_expire_date" id="paste_expire_date">
|
||||||
|
|
||||||
<?= optionsForSelect(
|
<?= optionsForSelect(
|
||||||
['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'],
|
['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'],
|
||||||
['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'],
|
['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'],
|
||||||
|
@ -119,11 +102,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item is-pulled-left mx-1">
|
<div class="level-item is-pulled-left mx-1">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="subtitle has-text-weight-semibold "
|
<label class="label" for="visibility">Visibility</label>
|
||||||
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">
|
|
||||||
Visibility
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<?php
|
<?php
|
||||||
|
@ -134,7 +113,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<select name="visibility">
|
<select name="visibility" id="visibility">
|
||||||
<option
|
<option
|
||||||
value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>>
|
value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>>
|
||||||
Public
|
Public
|
||||||
|
@ -157,24 +136,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</div>
|
||||||
<nav>
|
<div class="field">
|
||||||
<div class="level-left">
|
<div class="control">
|
||||||
<!-- Password -->
|
<input type="text" class="input pp-width-auto" name="pass" id="pass"
|
||||||
<div class="columns">
|
placeholder="Password (optional)" autocomplete="new-password"
|
||||||
<div class="column">
|
|
||||||
<input type="text" class="input" name="pass" id="pass"
|
|
||||||
placeholder="Password" autocomplete="new-password"
|
|
||||||
value="<?php echo (isset($_POST['pass'])) ? pp_html_escape($_POST['pass']) : ''; ?>"/>
|
value="<?php echo (isset($_POST['pass'])) ? pp_html_escape($_POST['pass']) : ''; ?>"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<br>
|
|
||||||
<nav>
|
|
||||||
<div class="level-left">
|
|
||||||
<!-- Encrypted -->
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
<div class="control">
|
||||||
<input class="is-checkradio is-info has-background-color" id="encrypt"
|
<input class="is-checkradio is-info has-background-color" id="encrypt"
|
||||||
checked="checked" disabled="disabled" type="checkbox">
|
checked="checked" disabled="disabled" type="checkbox">
|
||||||
<label for="encrypt">
|
<label for="encrypt">
|
||||||
|
@ -182,12 +154,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
<div class="column is-3">
|
|
||||||
</div>
|
|
||||||
<div class="column is-4">
|
|
||||||
<!-- CAPTCHA -->
|
|
||||||
<?php if ($captcha_enabled && $current_user === null): ?>
|
<?php if ($captcha_enabled && $current_user === null): ?>
|
||||||
<div class="is-one-quarter">
|
<div class="is-one-quarter">
|
||||||
<div class="captcha_container">
|
<div class="captcha_container">
|
||||||
|
@ -209,13 +176,9 @@
|
||||||
<?php if (isset($csrf_token)): ?>
|
<?php if (isset($csrf_token)): ?>
|
||||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
|
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -21,35 +21,13 @@
|
||||||
<?php if ($using_highlighter): ?>
|
<?php if ($using_highlighter): ?>
|
||||||
<link rel="stylesheet" href="/vendor/scrivo/highlight.php/styles/default.css"/>
|
<link rel="stylesheet" href="/vendor/scrivo/highlight.php/styles/default.css"/>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
|
||||||
$protocol = paste_protocol();
|
|
||||||
$bg = array('/img/loader.gif', '/img/loader2.gif', '/img/loader3.gif'); // array of filenames
|
|
||||||
$i = rand(0, count($bg) - 1); // generate random number size of the array
|
|
||||||
$selectedloader = "$bg[$i]"; // set variable equal to which random filename was chosen
|
|
||||||
?>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.preloader {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
z-index: 99999999;
|
|
||||||
background-image: url('<?= $selectedloader ?>'); /* your icon gif file path */
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-color: #FFF;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#stop-scrolling {
|
#stop-scrolling {
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<main class="bd-main" id="dstop-scrolling">
|
<main class="bd-main" id="stop-scrolling">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="bd-duo">
|
<div class="bd-duo">
|
||||||
<div class="bd-lead">
|
<div class="bd-lead">
|
||||||
|
|
Loading…
Add table
Reference in a new issue