From c75e3d259dad8c37829af91651d017a89dee3fb7 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Wed, 27 May 2015 16:39:36 -0400 Subject: minify html and css --- (limited to 'site') diff --git a/site/contrib/index.php b/site/contrib/index.php index 524c101..713f62d 100644 --- a/site/contrib/index.php +++ b/site/contrib/index.php @@ -18,6 +18,7 @@ */ ?> @@ -28,7 +29,7 @@ <?php echo gettext("Libreboot project maintainers"); ?> @@ -89,4 +90,7 @@ - + \ No newline at end of file diff --git a/site/download/index.php b/site/download/index.php index 750e604..0abe97e 100644 --- a/site/download/index.php +++ b/site/download/index.php @@ -18,6 +18,7 @@ */ ?> @@ -28,7 +29,7 @@ <?php echo gettext("Download libreboot"); ?> @@ -293,4 +294,7 @@ - + \ No newline at end of file diff --git a/site/functions.php b/site/functions.php index fb023b9..b90a35e 100644 --- a/site/functions.php +++ b/site/functions.php @@ -18,7 +18,21 @@ */ /* Functions */ - + + /* Minified HTML output (note: needs work for
 tags) */
+	function miniHtml($strHtml) {
+		return $strHtml = preg_replace(
+			array('/(\s)+/s', '/\>[^\S ]+/s', '/[^\S ]+\', '<'), 
+			$strHtml
+		);
+	}
+
+	/* Minified CSS output */
+	function miniCss($strCss) {
+		return preg_replace("/\r|\n/", "", $strCss);
+	}
+
 	/* Generic function for showing a list of URLs */
 	function mirrorList($arrayMirrors,$strNotFoundMessage,$forIndexStart,$forIndexbelow) {
 
diff --git a/site/index.php b/site/index.php
index 246a327..5b82484 100644
--- a/site/index.php
+++ b/site/index.php
@@ -18,6 +18,7 @@
 */
 ?>
 
@@ -28,7 +29,7 @@
 	
 
 
 
 	<?php echo gettext("Libreboot project"); ?>
@@ -106,4 +107,7 @@
 
 
 
-
+
\ No newline at end of file
--
cgit v0.9.1