com web/doc: Few optimizations: templates/all/www/contact.tpl.php templates/all/www/copyright.tpl.php templates/all/www/credits.tpl.php templates/all/www/shared/footer.tpl.php templates/all/www/shared/header.tpl.php www/contact.php www/copyright.php www/credits.php www/style/pngerizer.js www/style/site.css

[email protected] (Hannes Magnusson)
Newsgroups php.doc.web
Message-ID <[email protected]>
Commit:    6a96934dcddf8d2616a12318486a19cadbaba514
Author:    Sobak <[email protected]>         Sat, 15 Mar 2014 21:28:51 +0100
Parents:   7617e3872987b5265d4ce17c0181c97db40cef95
Branches:  master

Link:       http://git.php.net/?p=web/doc.git;a=commitdiff;h=6a96934dcddf8d2616a12318486a19cadbaba514

Log:
Few optimizations

Changed paths:
  D  templates/all/www/contact.tpl.php
  D  templates/all/www/copyright.tpl.php
  D  templates/all/www/credits.tpl.php
  M  templates/all/www/shared/footer.tpl.php
  M  templates/all/www/shared/header.tpl.php
  D  www/contact.php
  D  www/copyright.php
  D  www/credits.php
  D  www/style/pngerizer.js
  M  www/style/site.css
diff_6a96934dcddf8d2616a12318486a19cadbaba514.txt (text/plain, 8.1 KB)
diff --git a/templates/all/www/contact.tpl.php b/templates/all/www/contact.tpl.php
deleted file mode 100644
index e5368c2..0000000
--- a/templates/all/www/contact.tpl.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<h2>&docweb.contact.license.header;</h2>
-<p>
- &docweb.contact.license.text;
-</p>
diff --git a/templates/all/www/copyright.tpl.php b/templates/all/www/copyright.tpl.php
deleted file mode 100644
index 0bb4e9d..0000000
--- a/templates/all/www/copyright.tpl.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>&docweb.copyright.section.source;</h2>
-
-<p>
- &docweb.copyright.source;
-</p>
-
-<h2>&docweb.copyright.section.doc;</h2>
-
-<p>
- &docweb.copyright.doc;
-</p>
-
diff --git a/templates/all/www/credits.tpl.php b/templates/all/www/credits.tpl.php
deleted file mode 100644
index 7f240c0..0000000
--- a/templates/all/www/credits.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<p>
- &docweb.credits.subhead;
-</p>
-
-<dl>
- <dt>&docweb.credits.section.admin;</dt>
- <dd>The PHP Documentation Team</dd>
- <dt>&docweb.credits.section.php-services;</dt>
- <dd>&docweb.credits.php-systems;</dd>
- <dt>&docweb.credits.section.devs;</dt>
- <dd>
-  See <a href="http://svn.php.net/viewvc/web/doc/trunk/">SVN</a> for commit details.
- </dd>
-</dl>
-
-<p>
- &docweb.credits.section.icons;
- <a href="http://jimmac.musichall.cz/">Jakub 'jimmac' Steiner</a>.
-</p>
diff --git a/templates/all/www/shared/footer.tpl.php b/templates/all/www/shared/footer.tpl.php
index c78b29b..b1d41bc 100644
--- a/templates/all/www/shared/footer.tpl.php
+++ b/templates/all/www/shared/footer.tpl.php
@@ -1,16 +1,16 @@
  </div>
  <div id="footer">
   <p>
-   <a href="<?php echo $master; ?>copyright.php">&docweb.common.footer.copyright;</a> 2004-2014 &docweb.common.footer.copyright-text;.
+   <a href="http://php.net/copyright.php">&docweb.common.footer.copyright;</a> 2004-2014 &docweb.common.footer.copyright-text;.
   </p>
   <?php 
     if(isset($cvs_version)) { 
         echo "<p>\n    $cvs_version\n  </p>\n  "; 
     } 
   ?><p>
-   <a href="<?php echo $master; ?>credits.php">&docweb.common.footer.credits;</a>
+   <a href="http://php.net/credits.php">&docweb.common.footer.credits;</a>
    |
-   <a href="<?php echo $master; ?>contact.php">&docweb.common.footer.contact;</a>
+   <a href="http://php.net/contact.php">&docweb.common.footer.contact;</a>
   </p>
  </div>
 </body>
diff --git a/templates/all/www/shared/header.tpl.php b/templates/all/www/shared/header.tpl.php
index 62f0828..c3ea735 100644
--- a/templates/all/www/shared/header.tpl.php
+++ b/templates/all/www/shared/header.tpl.php
@@ -3,19 +3,13 @@
 <head>
  <title><?php echo $page_title; ?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $encoding; ?>" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta http-equiv="Content-Language" content="<?php echo $lang; ?>" />
- <script type="text/javascript" src="/style/pngerizer.js"></script>
- <link rel="shortcut icon" href="/images/favicon/<?php echo $project; ?>/favicon.ico" />
- <style type="text/css">
-  @import url(/style/site.css);
-  <?php
+ <link rel="icon" href="/images/favicon/<?php echo $project; ?>/favicon.ico" />
+ <link rel="stylesheet" type="text/css" href="/style/site.css" />
+ <?php
   foreach ($styles as $style_file) {
-      echo "@import url(/style/$style_file);\n";
-  }
-  ?>
- </style>
+     echo '<link rel="stylesheet" type="text/css" href="/style/' . $style_file . '" />' . "\n";
+ }
+ ?>
 </head>
 <body>
  <div id="header">
diff --git a/www/contact.php b/www/contact.php
deleted file mode 100644
index 6033bb5..0000000
--- a/www/contact.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-/* $Id$ */
-
-// TODO: list of all project mailing lists somewhere (not here!)
-include_once '../include/init.inc.php';
-echo site_header('docweb.common.header.contact');
-echo DocWeb_Template::get('contact.tpl.php');
-echo site_footer();
-
-?>
\ No newline at end of file
diff --git a/www/copyright.php b/www/copyright.php
deleted file mode 100644
index fda6ce1..0000000
--- a/www/copyright.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/* $Id$ */
-
-include_once '../include/init.inc.php';
-echo site_header('docweb.common.header.copyright');
-echo DocWeb_Template::get('copyright.tpl.php');
-echo site_footer();
-?>
diff --git a/www/credits.php b/www/credits.php
deleted file mode 100644
index 23c8e83..0000000
--- a/www/credits.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/* $Id$ */
-
-include '../include/init.inc.php';
-echo site_header('docweb.common.header.credits');
-echo DocWeb_Template::get('credits.tpl.php');
-echo site_footer();
-?>
\ No newline at end of file
diff --git a/www/style/pngerizer.js b/www/style/pngerizer.js
deleted file mode 100644
index bff05e6..0000000
--- a/www/style/pngerizer.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**********************************************************
-Below code derived from Sleight (c) 2001 Aaron Boodman
-http://www.youngpup.net
-**********************************************************/
-window.onload = function() { loadPNGs(); }
-
-function loadPNGs() {
-    if (navigator.platform != "Win32"
-	|| navigator.appName != "Microsoft Internet Explorer") {
-	return;
-    }
-
-    for (var i = document.images.length - 1, img = null;
-	 (img = document.images[i]); i--) {
-	loadPNG(img);
-    }
-}
-
-function loadPNG(img) {
-    if (navigator.platform != "Win32"
-	|| navigator.appName != "Microsoft Internet Explorer") {
-	return;
-    }
-
-    var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
-    var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
-
-    if (itsAllGood && img.src.match(/\.png$/i) != null) {
-	var src = img.src;
-	img.style.width = img.width + "px";
-	img.style.height = img.height + "px";
-	img.src = "/images/spacer.png";
-	img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')";
-    }
-}
diff --git a/www/style/site.css b/www/style/site.css
index cc09819..9290481 100644
--- a/www/style/site.css
+++ b/www/style/site.css
@@ -1,5 +1,5 @@
 body, td {
-	margin: 0px;
+	margin: 0;
 	font-size: 12px;
 	font-family: sans-serif;
 }
@@ -11,36 +11,36 @@ body, td {
 }
 #header h1 {
 	position: absolute;
-	bottom: 0px;
+	bottom: 0;
 	left: 15px;
-	margin: 0px;
-	padding: 0px;
+	margin: 0;
+	padding: 0;
 	font-size: 1.5em;
 }
 #langs {
-	background-color: #ffff99;
+	background-color: #FF9;
 	border-bottom: 1px solid #cdcdcd;
 	text-align: right;
-	padding: 2px 18px 0px;
-        height:18px;
+	padding: 2px 18px 0;
+	height: 18px;
 }
 #langs img {
 	vertical-align: middle;
 }
 #langs a.active {
-        position:relative;
-        z-index:2;
+	position: relative;
+	z-index: 2;
 }
 #langs span.active {
-	position:absolute;
-        z-index:0;
-        width:17px;
-        height:19px;
-        margin-left:-2px;
-        margin-top:-1px;
+	position: absolute;
+	z-index: 0;
+	width: 17px;
+	height: 19px;
+	margin-left: -2px;
+	margin-top: -1px;
 	background-color: #fff;
-	border:1px solid #000;
-        border-bottom:0px;
+	border: 1px solid #000;
+	border-bottom: 0;
 }
 
 h2 {
@@ -50,7 +50,7 @@ h2 {
 	padding: 1em 1.5em 0.2em 1.5em;
 }
 #page {
-	padding: 0px 15px;
+	padding: 0 15px;
 }
 
 #sidebar {
@@ -58,7 +58,7 @@ h2 {
 	width: 250px;
 }
 #sidebar h2 {
-	margin: 0px;
+	margin: 0;
 }
 #sidebar .sidebox {
 	margin: 0.5em 0 0.5em 1em;
@@ -167,11 +167,7 @@ td.ulcell {
     border: 1px solid #ccc;
 }
 
-#nav a.active {
-    background: #ddf;
-}
-
-#nav a:hover {
+#nav a.active, #nav a:hover {
     background: #ddf;
 }
 
@@ -189,9 +185,9 @@ div.success {
 }
 
 div.errors {
-    border: 1px dashed #660000;
+    border: 1px dashed #600;
     background: #fee;
-    color: #660000;
+    color: #600;
 }
 
 div.warnings {
@@ -201,20 +197,20 @@ div.warnings {
 }
 
 div.explain {
-    border: 1px dashed #000066;
-    color: #000066;
+    border: 1px dashed #006;
+    color: #006;
 }
 
 div.success {
-    border: 1px dashed #006600;
-    background-color: #CCFF99;
-    color: #006600;
+    border: 1px dashed #060;
+    background-color: #CF9;
+    color: #060;
 }
 
 div.errors ul,
 div.warnings ul,
 div.explain ul,
 div.success ul {
-    margin-top: 0em;
-    margin-bottom: 0em;
-}
+    margin-top: 0;
+    margin-bottom: 0;
+}
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.