mirror of
https://gitnet.fr/deblan/gist.git
synced 2021-08-14 08:30:49 +02:00
New language highlight: markdown
This commit is contained in:
parent
426cf0e1f1
commit
f6136404c9
@ -98,6 +98,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -98,6 +98,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -99,6 +99,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -98,6 +98,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -98,6 +98,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -99,6 +99,7 @@ form:
|
|||||||
php: 'PHP'
|
php: 'PHP'
|
||||||
sql: 'SQL'
|
sql: 'SQL'
|
||||||
yaml: 'YAML'
|
yaml: 'YAML'
|
||||||
|
markdown: 'MARKDOWN'
|
||||||
perl: 'PERL'
|
perl: 'PERL'
|
||||||
c: 'C/C++'
|
c: 'C/C++'
|
||||||
asp: 'ASP'
|
asp: 'ASP'
|
||||||
|
@ -97,6 +97,7 @@ class CreateGistForm extends AbstractForm
|
|||||||
'sql' => '',
|
'sql' => '',
|
||||||
'xml' => '',
|
'xml' => '',
|
||||||
'yaml' => '',
|
'yaml' => '',
|
||||||
|
'markdown' => '',
|
||||||
'perl' => '',
|
'perl' => '',
|
||||||
'c' => '',
|
'c' => '',
|
||||||
'asp' => '',
|
'asp' => '',
|
||||||
|
@ -75,6 +75,7 @@ class Gist extends BaseGist
|
|||||||
'bash' => 'sh',
|
'bash' => 'sh',
|
||||||
'actionscript3' => 'as',
|
'actionscript3' => 'as',
|
||||||
'text' => 'txt',
|
'text' => 'txt',
|
||||||
|
'markdown' => 'md',
|
||||||
);
|
);
|
||||||
|
|
||||||
return str_replace(array_keys($data), array_values($data), $this->getType());
|
return str_replace(array_keys($data), array_values($data), $this->getType());
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+actionscript+c+aspnet+bash+cpp+csharp+css-extras+diff+perl+php+php-extras+python+sql+yaml&plugins=line-highlight+line-numbers+autolinker+previewer-base+previewer-color+previewer-gradient+previewer-easing+previewer-time+previewer-angle */
|
/* PrismJS 1.15.0
|
||||||
|
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+actionscript+c+csharp+bash+cpp+aspnet+css-extras+diff+markup-templating+markdown+perl+php+php-extras+sql+python+yaml&plugins=line-highlight+line-numbers+autolinker */
|
||||||
/**
|
/**
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
* prism.js default theme for JavaScript, CSS and HTML
|
||||||
* Based on dabblet (http://dabblet.com)
|
* Based on dabblet (http://dabblet.com)
|
||||||
@ -105,7 +106,7 @@ pre[class*="language-"] {
|
|||||||
.token.url,
|
.token.url,
|
||||||
.language-css .token.string,
|
.language-css .token.string,
|
||||||
.style .token.string {
|
.style .token.string {
|
||||||
color: #a67f59;
|
color: #9a6e3a;
|
||||||
background: hsla(0, 0%, 100%, .5);
|
background: hsla(0, 0%, 100%, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +116,8 @@ pre[class*="language-"] {
|
|||||||
color: #07a;
|
color: #07a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.function {
|
.token.function,
|
||||||
|
.token.class-name {
|
||||||
color: #DD4A68;
|
color: #DD4A68;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,15 +184,20 @@ pre[data-line] {
|
|||||||
bottom: .4em;
|
bottom: .4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre.line-numbers {
|
.line-numbers .line-highlight:before,
|
||||||
|
.line-numbers .line-highlight:after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre[class*="language-"].line-numbers {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 3.8em;
|
padding-left: 3.8em;
|
||||||
counter-reset: linenumber;
|
counter-reset: linenumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre.line-numbers > code {
|
pre[class*="language-"].line-numbers > code {
|
||||||
position: relative;
|
position: relative;
|
||||||
white-space: inherit;
|
white-space: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-numbers .line-numbers-rows {
|
.line-numbers .line-numbers-rows {
|
||||||
@ -223,245 +230,7 @@ pre.line-numbers > code {
|
|||||||
padding-right: 0.8em;
|
padding-right: 0.8em;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token a {
|
.token a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
.prism-previewer,
|
|
||||||
.prism-previewer:before,
|
|
||||||
.prism-previewer:after {
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.prism-previewer,
|
|
||||||
.prism-previewer:after {
|
|
||||||
left: 50%;
|
|
||||||
}
|
|
||||||
.prism-previewer {
|
|
||||||
margin-top: -48px;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
margin-left: -16px;
|
|
||||||
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity .25s;
|
|
||||||
-o-transition: opacity .25s;
|
|
||||||
transition: opacity .25s;
|
|
||||||
}
|
|
||||||
.prism-previewer.flipped {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: -48px;
|
|
||||||
}
|
|
||||||
.prism-previewer:before,
|
|
||||||
.prism-previewer:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.prism-previewer:before {
|
|
||||||
top: -5px;
|
|
||||||
right: -5px;
|
|
||||||
left: -5px;
|
|
||||||
bottom: -5px;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 5px solid #fff;
|
|
||||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75);
|
|
||||||
}
|
|
||||||
|
|
||||||
.prism-previewer:after {
|
|
||||||
top: 100%;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
margin: 5px 0 0 -7px;
|
|
||||||
border: 7px solid transparent;
|
|
||||||
border-color: rgba(255, 0, 0, 0);
|
|
||||||
border-top-color: #fff;
|
|
||||||
}
|
|
||||||
.prism-previewer.flipped:after {
|
|
||||||
top: auto;
|
|
||||||
bottom: 100%;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
border-top-color: rgba(255, 0, 0, 0);
|
|
||||||
border-bottom-color: #fff;
|
|
||||||
}
|
|
||||||
.prism-previewer.active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.prism-previewer-color {
|
|
||||||
background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb);
|
|
||||||
background-size: 10px 10px;
|
|
||||||
background-position: 0 0, 5px 5px;
|
|
||||||
}
|
|
||||||
.prism-previewer-color:before {
|
|
||||||
background-color: inherit;
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prism-previewer-gradient {
|
|
||||||
background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb);
|
|
||||||
background-size: 10px 10px;
|
|
||||||
background-position: 0 0, 5px 5px;
|
|
||||||
|
|
||||||
width: 64px;
|
|
||||||
margin-left: -32px;
|
|
||||||
}
|
|
||||||
.prism-previewer-gradient:before {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
.prism-previewer-gradient div {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
left: -5px;
|
|
||||||
right: -5px;
|
|
||||||
bottom: -5px;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 5px solid #fff;
|
|
||||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75);
|
|
||||||
}
|
|
||||||
.prism-previewer-easing {
|
|
||||||
margin-top: -76px;
|
|
||||||
margin-left: -30px;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
background: #333;
|
|
||||||
}
|
|
||||||
.prism-previewer-easing.flipped {
|
|
||||||
margin-bottom: -116px;
|
|
||||||
}
|
|
||||||
.prism-previewer-easing svg {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
.prism-previewer-easing circle {
|
|
||||||
fill: hsl(200, 10%, 20%);
|
|
||||||
stroke: white;
|
|
||||||
}
|
|
||||||
.prism-previewer-easing path {
|
|
||||||
fill: none;
|
|
||||||
stroke: white;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-width: 4;
|
|
||||||
}
|
|
||||||
.prism-previewer-easing line {
|
|
||||||
stroke: white;
|
|
||||||
stroke-opacity: 0.5;
|
|
||||||
stroke-width: 2;
|
|
||||||
}
|
|
||||||
@-webkit-keyframes prism-previewer-time {
|
|
||||||
0% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
stroke-dasharray: 100, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: -100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@-o-keyframes prism-previewer-time {
|
|
||||||
0% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
stroke-dasharray: 100, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: -100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@-moz-keyframes prism-previewer-time {
|
|
||||||
0% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
stroke-dasharray: 100, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: -100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes prism-previewer-time {
|
|
||||||
0% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
stroke-dasharray: 100, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: -100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.prism-previewer-time:before {
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.prism-previewer-time:after {
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
.prism-previewer-time svg {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
-webkit-transform: rotate(-90deg);
|
|
||||||
-moz-transform: rotate(-90deg);
|
|
||||||
-ms-transform: rotate(-90deg);
|
|
||||||
-o-transform: rotate(-90deg);
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
.prism-previewer-time circle {
|
|
||||||
fill: transparent;
|
|
||||||
stroke: hsl(200, 10%, 20%);
|
|
||||||
stroke-opacity: 0.9;
|
|
||||||
stroke-width: 32;
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
-webkit-animation: prism-previewer-time linear infinite 3s;
|
|
||||||
-moz-animation: prism-previewer-time linear infinite 3s;
|
|
||||||
-o-animation: prism-previewer-time linear infinite 3s;
|
|
||||||
animation: prism-previewer-time linear infinite 3s;
|
|
||||||
}
|
|
||||||
.prism-previewer-angle:before {
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.prism-previewer-angle:after {
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
.prism-previewer-angle svg {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
-webkit-transform: rotate(-90deg);
|
|
||||||
-moz-transform: rotate(-90deg);
|
|
||||||
-ms-transform: rotate(-90deg);
|
|
||||||
-o-transform: rotate(-90deg);
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
.prism-previewer-angle[data-negative] svg {
|
|
||||||
-webkit-transform: scaleX(-1) rotate(-90deg);
|
|
||||||
-moz-transform: scaleX(-1) rotate(-90deg);
|
|
||||||
-ms-transform: scaleX(-1) rotate(-90deg);
|
|
||||||
-o-transform: scaleX(-1) rotate(-90deg);
|
|
||||||
transform: scaleX(-1) rotate(-90deg);
|
|
||||||
}
|
|
||||||
.prism-previewer-angle circle {
|
|
||||||
fill: transparent;
|
|
||||||
stroke: hsl(200, 10%, 20%);
|
|
||||||
stroke-opacity: 0.9;
|
|
||||||
stroke-width: 32;
|
|
||||||
stroke-dasharray: 0, 500;
|
|
||||||
}
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user