mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
2a4b879c21
commit
63664e6c1c
1155 changed files with 62261 additions and 84 deletions
29
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.css
vendored
Normal file
29
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.css
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
div.prism-show-language {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.prism-show-language > div.prism-show-language-label[data-language] {
|
||||
color: black;
|
||||
background-color: #CFCFCF;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
font-size: 0.9em;
|
||||
border-radius: 0 0 0 5px;
|
||||
padding: 0 0.5em;
|
||||
text-shadow: none;
|
||||
z-index: 1;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-transform: none;
|
||||
-moz-transform: none;
|
||||
-ms-transform: none;
|
||||
-o-transform: none;
|
||||
transform: none;
|
||||
}
|
43
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.js
vendored
Normal file
43
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.js
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
(function(){
|
||||
|
||||
if (typeof self === 'undefined' || !self.Prism || !self.document) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The languages map is built automatically with gulp
|
||||
var Languages = /*languages_placeholder[*/{"css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","asciidoc":"AsciiDoc","aspnet":"ASP.NET (C#)","autoit":"AutoIt","autohotkey":"AutoHotkey","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","css-extras":"CSS Extras","fsharp":"F#","glsl":"GLSL","http":"HTTP","inform7":"Inform 7","latex":"LaTeX","lolcode":"LOLCODE","matlab":"MATLAB","mel":"MEL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","powershell":"PowerShell","jsx":"React JSX","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","typescript":"TypeScript","vhdl":"VHDL","vim":"vim","wiki":"Wiki markup","yaml":"YAML"}/*]*/;
|
||||
Prism.hooks.add('before-highlight', function(env) {
|
||||
var pre = env.element.parentNode;
|
||||
if (!pre || !/pre/i.test(pre.nodeName)) {
|
||||
return;
|
||||
}
|
||||
var language = Languages[env.language] || (env.language.substring(0, 1).toUpperCase() + env.language.substring(1));
|
||||
pre.setAttribute('data-language', language);
|
||||
|
||||
/* check if the divs already exist */
|
||||
var sib = pre.previousSibling;
|
||||
var div, div2;
|
||||
if (sib && /\s*\bprism-show-language\b\s*/.test(sib.className) &&
|
||||
sib.firstChild &&
|
||||
/\s*\bprism-show-language-label\b\s*/.test(sib.firstChild.className)) {
|
||||
div2 = sib.firstChild;
|
||||
if (div2.getAttribute('data-language') !== language) {
|
||||
div2.setAttribute('data-language', language);
|
||||
div2.innerHTML = language;
|
||||
}
|
||||
} else {
|
||||
div = document.createElement('div');
|
||||
div2 = document.createElement('div');
|
||||
|
||||
div2.className = 'prism-show-language-label';
|
||||
div2.setAttribute('data-language', language);
|
||||
div2.innerHTML = language;
|
||||
|
||||
div.className = 'prism-show-language';
|
||||
div.appendChild(div2);
|
||||
|
||||
pre.parentNode.insertBefore(div, pre);
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
1
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.min.js
vendored
Normal file
1
dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",asciidoc:"AsciiDoc",aspnet:"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",glsl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab:"MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx:"React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki markup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var s=a.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var t=e[a.language]||a.language.substring(0,1).toUpperCase()+a.language.substring(1);s.setAttribute("data-language",t);var i,r,l=s.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.className)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.className)?(r=l.firstChild,r.getAttribute("data-language")!==t&&(r.setAttribute("data-language",t),r.innerHTML=t)):(i=document.createElement("div"),r=document.createElement("div"),r.className="prism-show-language-label",r.setAttribute("data-language",t),r.innerHTML=t,i.className="prism-show-language",i.appendChild(r),s.parentNode.insertBefore(i,s))}})}}();
|
Loading…
Add table
Add a link
Reference in a new issue