Commit a276a52eb346ad846935bb8b232a5f2685c3acb8

Lea Verou 2013-06-27T12:29:28

Fixed order of plugins and langs in the file builder

diff --git a/components.js b/components.js
index 51a2bf5..4908d4c 100644
--- a/components.js
+++ b/components.js
@@ -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
+		}
 	}
 };
\ No newline at end of file
diff --git a/download.html b/download.html
index ebf4bdf..f7d45cf 100644
--- a/download.html
+++ b/download.html
@@ -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;
diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js
index 8c4b941..76d167b 100644
--- a/plugins/file-highlight/prism-file-highlight.js
+++ b/plugins/file-highlight/prism-file-highlight.js
@@ -1,6 +1,6 @@
 (function(){
 
-if (!window.Prism || !document.querySelector) {
+if (!self.Prism || !self.document || !document.querySelector) {
 	return;
 }
 
diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js
index cb13511..c813753 100644
--- a/plugins/file-highlight/prism-file-highlight.min.js
+++ b/plugins/file-highlight/prism-file-highlight.min.js
@@ -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)})})();
\ No newline at end of file
+(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)})})();
\ No newline at end of file