mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
Add server side syntax validation, and paste view counter functionality. Improve frontend syntax highlighting, add more syntax highlighting options. Improve code block styling (majority of it is from github dark theme), better addContent function since highlightjs lets you use the code blocks for plain text.
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
max-height: 80% !important;
|
||||
}
|
||||
|
||||
.paste-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -47,14 +51,21 @@
|
||||
border-radius: 5px;
|
||||
border: 1px solid var(--neutral-700);
|
||||
}
|
||||
|
||||
#paste-content {
|
||||
padding: 10px;
|
||||
max-width: 100%;
|
||||
max-height: 20vh;
|
||||
overflow-y: scroll;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
border-radius: 0px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
.paste-actions{
|
||||
|
||||
.paste-actions {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid var(--neutral-700);
|
||||
@@ -72,4 +83,125 @@ button {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.hljs-ln-numbers {
|
||||
border-right: 1px solid var(--neutral-700);
|
||||
padding-right: 8px !important;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.hljs-ln-code {
|
||||
padding-left: 16px !important;
|
||||
text-align: left;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
pre code.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 1em
|
||||
}
|
||||
|
||||
code.hljs {
|
||||
padding: 3px 5px
|
||||
}
|
||||
/*
|
||||
SLIGHTLY MODIFIED GITHUB DARK THEME
|
||||
*/
|
||||
.hljs {
|
||||
color: #c9d1d9;
|
||||
background: var(--neutral-900);
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-keyword,
|
||||
.hljs-meta .hljs-keyword,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-type,
|
||||
.hljs-variable.language_ {
|
||||
color: #ff7b72
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-title.class_,
|
||||
.hljs-title.class_.inherited__,
|
||||
.hljs-title.function_ {
|
||||
color: #d2a8ff
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-attribute,
|
||||
.hljs-literal,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-operator,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-id,
|
||||
.hljs-variable {
|
||||
color: #79c0ff
|
||||
}
|
||||
|
||||
.hljs-meta .hljs-string,
|
||||
.hljs-regexp,
|
||||
.hljs-string {
|
||||
color: #a5d6ff
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-symbol {
|
||||
color: #ffa657
|
||||
}
|
||||
|
||||
.hljs-code,
|
||||
.hljs-comment,
|
||||
.hljs-formula {
|
||||
color: #8b949e
|
||||
}
|
||||
|
||||
.hljs-name,
|
||||
.hljs-quote,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-selector-tag {
|
||||
color: #7ee787
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
color: #c9d1d9
|
||||
}
|
||||
|
||||
.hljs-section {
|
||||
color: #1f6feb;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.hljs-bullet {
|
||||
color: #f2cc60
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
color: #c9d1d9;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
color: #c9d1d9;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #aff5b4;
|
||||
background-color: #033a16
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #ffdcd7;
|
||||
background-color: #67060c
|
||||
}
|
||||
Reference in New Issue
Block a user