Fixed order of plugins and langs in the file builder

This commit is contained in:
Lea Verou 2013-06-27 12:29:28 -04:00
parent 08c4c6ee7a
commit a276a52eb3
4 changed files with 30 additions and 17 deletions

View File

@ -21,21 +21,6 @@ var components = {
'prism-okaidia': 'Okaidia',
'prism-twilight': 'Twilight'
},
plugins: {
meta: {
path: 'plugins/{id}/prism-{id}',
link: 'plugins/{id}/'
},
'line-highlight': 'Line Highlight',
'line-numbers': 'Line Numbers',
'show-invisibles': 'Show Invisibles',
'autolinker': 'Autolinker',
'wpd': 'WebPlatform Docs',
'file-highlight': {
title: 'File Highlight',
noCSS: true
}
},
languages: {
meta: {
path: 'components/prism-{id}',
@ -103,5 +88,20 @@ var components = {
'http': {
title: 'HTTP',
}
},
plugins: {
meta: {
path: 'plugins/{id}/prism-{id}',
link: 'plugins/{id}/'
},
'line-highlight': 'Line Highlight',
'line-numbers': 'Line Numbers',
'show-invisibles': 'Show Invisibles',
'autolinker': 'Autolinker',
'wpd': 'WebPlatform Docs',
'file-highlight': {
title: 'File Highlight',
noCSS: true
}
}
};

View File

@ -48,6 +48,7 @@ form > p:first-of-type > label {
section.options {
width: 33.3%;
width: calc(100% / 3);
float: left;
}
@ -64,6 +65,18 @@ section.options#category-languages {
column-span: all;
}
section.options#category-themes {
width: 66.6%;
width: calc(100% * 2/3);
column-count: 2;
overflow: visible;
float: none;
}
section.options#category-themes > h1 {
column-span: all;
}
section.download {
width: 50%;
float: left;

View File

@ -1,6 +1,6 @@
(function(){
if (!window.Prism || !document.querySelector) {
if (!self.Prism || !self.document || !document.querySelector) {
return;
}

View File

@ -1 +1 @@
(function(){if(!window.Prism||!document.querySelector)return;var e={js:"javascript",html:"markup",svg:"markup"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){var n=t.getAttribute("data-src"),r=(n.match(/\.(\w+)$/)||[,""])[1],i=e[r]||r,s=document.createElement("code");s.className="language-"+i;t.textContent="";s.textContent="Loading…";t.appendChild(s);var o=new XMLHttpRequest;o.open("GET",n,!0);o.onreadystatechange=function(){console.log(o.readyState,o.status,n);if(o.readyState==4)if(o.status<400&&o.responseText){s.textContent=o.responseText;Prism.highlightElement(s)}else o.status>=400?s.textContent="✖ Error "+o.status+" while fetching file: "+o.statusText:s.textContent="✖ Error: File does not exist or is empty"};o.send(null)})})();
(function(){if(!self.Prism||!self.document||!document.querySelector)return;var e={js:"javascript",html:"markup",svg:"markup"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){var n=t.getAttribute("data-src"),r=(n.match(/\.(\w+)$/)||[,""])[1],i=e[r]||r,s=document.createElement("code");s.className="language-"+i;t.textContent="";s.textContent="Loading…";t.appendChild(s);var o=new XMLHttpRequest;o.open("GET",n,!0);o.onreadystatechange=function(){console.log(o.readyState,o.status,n);if(o.readyState==4)if(o.status<400&&o.responseText){s.textContent=o.responseText;Prism.highlightElement(s)}else o.status>=400?s.textContent="✖ Error "+o.status+" while fetching file: "+o.statusText:s.textContent="✖ Error: File does not exist or is empty"};o.send(null)})})();