mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
Split code into classes to make the codebase look cleaner
Added a new favicon/icon Add more checks before uploading a paste, changed alert to use the showNotification function Added password modal for private pastes instead of using alert Fix a paste page navigation in dashboard Improve auth css
This commit is contained in:
@@ -8,12 +8,24 @@
|
||||
}
|
||||
|
||||
#blur {
|
||||
z-index: 999;
|
||||
z-index: 50;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
#notification-container {
|
||||
position: fixed;
|
||||
z-index: 10001;
|
||||
top: 24px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
width: fit-content;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.paste-information {
|
||||
@@ -55,7 +67,7 @@
|
||||
#paste-content {
|
||||
padding: 10px;
|
||||
max-width: 100%;
|
||||
max-height: 20vh;
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
@@ -103,6 +115,7 @@ button:active {
|
||||
.hljs-ln-numbers {
|
||||
border-right: 1px solid var(--neutral-700);
|
||||
padding-right: 8px !important;
|
||||
padding-left: 8px !important;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -122,9 +135,10 @@ pre code.hljs {
|
||||
code.hljs {
|
||||
padding: 3px 5px
|
||||
}
|
||||
|
||||
.hljs {
|
||||
color: #c9d1d9;
|
||||
background: var(--neutral-900);
|
||||
background: #1e1e1e;
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
@@ -225,11 +239,15 @@ code.hljs {
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Minimal, clean style for paste information card */
|
||||
.paste-information-card {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -244,6 +262,7 @@ code.hljs {
|
||||
border-bottom: 1px solid var(--neutral-700);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.paste-info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -256,20 +275,24 @@ code.hljs {
|
||||
padding: 0 6px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
font-size: 1em;
|
||||
opacity: 0.7;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
#author-link {
|
||||
color: var(--neutral-100);
|
||||
text-decoration: underline dotted;
|
||||
font-weight: 400;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
#author-link:hover {
|
||||
color: #4ea1f7;
|
||||
}
|
||||
|
||||
.paste-header h1#paste-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
@@ -286,18 +309,189 @@ code.hljs {
|
||||
vertical-align: middle;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.syntax-icon {
|
||||
background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23aaa" stroke-width="2" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 7l-4 3 4 3M13 7l4 3-4 3"/></svg>') no-repeat center/1em 1em;
|
||||
}
|
||||
|
||||
.date-icon {
|
||||
background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23aaa" stroke-width="2" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="8"/><path d="M10 6v4l2 2"/></svg>') no-repeat center/1em 1em;
|
||||
}
|
||||
|
||||
.size-icon {
|
||||
background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23aaa" stroke-width="2" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect x="4" y="3" width="12" height="14" rx="2"/><path d="M10 7v5m0 0l-2-2m2 2l2-2"/></svg>') no-repeat center/1em 1em;
|
||||
}
|
||||
|
||||
.views-icon {
|
||||
background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23aaa" stroke-width="2" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><ellipse cx="10" cy="10" rx="8" ry="5"/><circle cx="10" cy="10" r="2.5"/></svg>') no-repeat center/1em 1em;
|
||||
}
|
||||
|
||||
.author-icon {
|
||||
background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23aaa" stroke-width="2" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="7.5" r="3.5"/><path d="M3 17c0-3.3 3.1-6 7-6s7 2.7 7 6"/></svg>') no-repeat center/1em 1em;
|
||||
}
|
||||
|
||||
#password-modal-bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
#password-modal {
|
||||
background: var(--neutral-900);
|
||||
padding: 2em 2.5em 1.5em 2.5em;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 32px #000a;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 320px;
|
||||
border: 1px solid var(--neutral-800);
|
||||
font-family: inherit;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#password-modal .modal-title {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
letter-spacing: 0.5px;
|
||||
color: white
|
||||
}
|
||||
|
||||
#password-modal label {
|
||||
margin-bottom: 1em;
|
||||
color: white;
|
||||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#password-modal input[type="password"] {
|
||||
margin-bottom: 1em;
|
||||
padding: 0.7em 1em;
|
||||
width: 100%;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--neutral-900);
|
||||
background: var(--neutral-800);
|
||||
color: white;
|
||||
font-size: 1em;
|
||||
outline: none;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
#password-modal input[type="password"]:focus {
|
||||
border-color: var(--neutral-700);
|
||||
}
|
||||
|
||||
#password-modal .modal-btn-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
#password-modal button {
|
||||
padding: 0.5em 1.5em;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
#password-modal button:first-child {
|
||||
background: var(--neutral-700);
|
||||
border: 1px solid var(--neutral-600);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#password-modal button:first-child:hover {
|
||||
background: var(--neutral-600);
|
||||
border: 1px solid var(--neutral-500);
|
||||
}
|
||||
|
||||
#password-modal button:last-child {
|
||||
background: var(--neutral-700);
|
||||
border: 1px solid var(--neutral-600);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#password-modal button:last-child:hover {
|
||||
background: var(--neutral-600);
|
||||
border: 1px solid var(--neutral-500);
|
||||
}
|
||||
|
||||
.has-true-size-tooltip {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.true-size-tooltip {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 120%;
|
||||
transform: translateX(-50%);
|
||||
background: var(--neutral-900, #23272e);
|
||||
color: var(--neutral-50, #fff);
|
||||
padding: 6px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.95em;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 2px 8px #0007;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.2s;
|
||||
z-index: 200;
|
||||
border: 1px solid var(--neutral-700, #444);
|
||||
}
|
||||
|
||||
.has-true-size-tooltip:hover .true-size-tooltip {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
||||
.main-container {
|
||||
max-height: 100% !important;
|
||||
}
|
||||
|
||||
#password-modal-bg {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#password-modal {
|
||||
padding: 1.5em 2em 1em 2em;
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
#paste-content {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.paste-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.paste-actions button {
|
||||
width: 30%;
|
||||
margin: 0;
|
||||
margin-right: 2.5px;
|
||||
margin-left: 2.5px;
|
||||
}
|
||||
|
||||
.paste-information-card {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user