1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 21:15:24 +02:00

Provide Bash/Shell code syntax in Rich Text Editor

Closes #322
This commit is contained in:
sauls8t 2019-09-18 11:25:21 +01:00
parent 00889f0e0e
commit 6b723568d3
4 changed files with 119 additions and 42 deletions

View file

@ -1,5 +1,5 @@
/* PrismJS 1.15.0
https://prismjs.com/download.html?#themes=prism-solarizedlight&languages=markup+css+clike+javascript+c+csharp+cpp+coffeescript+ruby+docker+elixir+markup-templating+erlang+fsharp+git+go+less+handlebars+haskell+http+java+json+markdown+makefile+nginx+objectivec+perl+php+sql+powershell+scss+python+jsx+typescript+rust+swift+yaml&plugins=line-numbers */
/* PrismJS 1.17.1
https://prismjs.com/download.html#themes=prism-solarizedlight&languages=markup+css+clike+javascript+c+csharp+bash+cpp+aspnet+coffeescript+clojure+ruby+markup-templating+docker+elixir+erlang+fsharp+git+go+graphql+less+handlebars+haskell+http+java+php+markdown+json+latex+makefile+typescript+nginx+objectivec+perl+sql+powershell+scss+python+jsx+rust+plsql+swift+yaml+toml+regex+wasm&plugins=line-numbers+toolbar+highlight-keywords+show-language */
/*
Solarized Color Schemes originally by Ethan Schoonover
http://ethanschoonover.com/solarized
@ -34,6 +34,7 @@ code[class*="language-"],
pre[class*="language-"] {
color: #657b83; /* base00 */
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
@ -192,3 +193,68 @@ pre[class*="language-"].line-numbers > code {
text-align: right;
}
div.code-toolbar {
position: relative;
}
div.code-toolbar > .toolbar {
position: absolute;
top: .3em;
right: .2em;
transition: opacity 0.3s ease-in-out;
opacity: 0;
}
div.code-toolbar:hover > .toolbar {
opacity: 1;
}
/* Separate line b/c rules are thrown out if selector is invalid.
IE11 and old Edge versions don't support :focus-within. */
div.code-toolbar:focus-within > .toolbar {
opacity: 1;
}
div.code-toolbar > .toolbar .toolbar-item {
display: inline-block;
}
div.code-toolbar > .toolbar a {
cursor: pointer;
}
div.code-toolbar > .toolbar button {
background: none;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none; /* for button */
-moz-user-select: none;
-ms-user-select: none;
}
div.code-toolbar > .toolbar a,
div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
color: #bbb;
font-size: .8em;
padding: 0 .5em;
background: #f5f2f0;
background: rgba(224, 224, 224, 0.2);
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
border-radius: .5em;
}
div.code-toolbar > .toolbar a:hover,
div.code-toolbar > .toolbar a:focus,
div.code-toolbar > .toolbar button:hover,
div.code-toolbar > .toolbar button:focus,
div.code-toolbar > .toolbar span:hover,
div.code-toolbar > .toolbar span:focus {
color: inherit;
text-decoration: none;
}

File diff suppressed because one or more lines are too long