You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by wa...@apache.org on 2011/08/14 01:19:42 UTC

svn commit: r1157441 - in /incubator/ooo/site/trunk: content/openofficeorg/www/index.html content/openofficeorg/www/index.style lib/view.pm templates/scriptstyle.html templates/skeleton.html

Author: wave
Date: Sat Aug 13 23:19:41 2011
New Revision: 1157441

URL: http://svn.apache.org/viewvc?rev=1157441&view=rev
Log:
The process for html pages is now - (1) extract the head and body content and (2) place the head content into the skeleton and the body with the content section of the framework. Some files were removed. ooo css is currently always inserted.

Removed:
    incubator/ooo/site/trunk/content/openofficeorg/www/index.style
    incubator/ooo/site/trunk/templates/scriptstyle.html
Modified:
    incubator/ooo/site/trunk/content/openofficeorg/www/index.html
    incubator/ooo/site/trunk/lib/view.pm
    incubator/ooo/site/trunk/templates/skeleton.html

Modified: incubator/ooo/site/trunk/content/openofficeorg/www/index.html
URL: http://svn.apache.org/viewvc/incubator/ooo/site/trunk/content/openofficeorg/www/index.html?rev=1157441&r1=1157440&r2=1157441&view=diff
==============================================================================
--- incubator/ooo/site/trunk/content/openofficeorg/www/index.html (original)
+++ incubator/ooo/site/trunk/content/openofficeorg/www/index.html Sat Aug 13 23:19:41 2011
@@ -1,5 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+  <meta name="verify-v1" content="7/WnCcvax+gnJU1u0eXYQOYtS6zlmE13fsCzq+qnlUs="/>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title> - The Free and Open Productivity Suite</title>
+  <link rel="stylesheet" type="text/css" href="/openofficeorg/css/ooo.css"/>
+  <link rel="stylesheet" type="text/css" href="/openofficeorg/www/product/product.css" media="screen"/>
+    <link href="http://asset-1.openoffice.org/branding/kenai/stylesheets/layout.css?20110729.62b47ea" media="screen" rel="stylesheet" type="text/css" /> 
+    <link rel="alternate" href="http://planet.services.openoffice.org/atom.xml" title="" type="application/atom+xml" /> 
+    <link rel="shortcut icon" type="image/x-icon" href="/branding/kenai/images/favicon.ico" /> 
+    <link rel="icon" type="image/x-icon" href="/branding/kenai/images/favicon.ico" /> 
+    
+    <!--[if IE 7]>
+    <link href="http://asset-1.openoffice.org/stylesheets/ie7_packaged.css?20110729.62b47ea" media="screen" rel="stylesheet" type="text/css" />    <![endif]--> 
+    <!--[if IE 6]>
+    <link href="http://asset-2.openoffice.org/stylesheets/iex60.css?20110729.62b47ea" media="screen" rel="stylesheet" type="text/css" />    <![endif]--> 
+    <link href="http://asset-3.openoffice.org/stylesheets/print_packaged.css?20110729.62b47ea" media="print" rel="stylesheet" type="text/css" /> 
+    <script src="http://asset-1.openoffice.org/javascripts/head_packaged.js?20110729.62b47ea" type="text/javascript"></script> 
+        <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> 
+    <script type="text/javascript"> 
+        stLight.options({
+                publisher:'bcd30425-1749-43d6-a311-18a82f89771a',
+        });
+    </script> 
+    <script type="text/javascript"> 
+//<![CDATA[
+var page={"token":"229af270ad506a3621a82cad981cef639b7e04d3"};
+//]]>
+</script> 
+    <link href="http://asset-0.openoffice.org/branding/kenai/stylesheets/style_kenai.css?20110729.62b47ea" media="screen" rel="stylesheet" type="text/css" /> 
+    <link href="http://asset-2.openoffice.org/branding/kenai/stylesheets/print.css?20110729.62b47ea" media="print" rel="stylesheet" type="text/css" /> 
+  <script type="text/javascript" src="http://download.openoffice.org/globalvars.js"></script>
+  <script type="text/javascript" src="http://download.openoffice.org/languages.js"></script>
+  <script type="text/javascript" src="http://download.openoffice.org/download.js"></script>
+  <script type="text/javascript" src="http://download.openoffice.org/download_bouncer.js"></script>
+  <script type="text/javascript" src="http://download.openoffice.org/download_mirrorbrain.js"></script>
+
+  <script type="text/javascript">
+  <!--
+  var SHOWDOWNLOAD = false;
+
+  function toggleDownload() {
+	if (!SHOWDOWNLOAD) {
+		SHOWDOWNLOAD = true;
+		showDownload();
+	} else {
+		SHOWDOWNLOAD = false;
+		hideDownload();
+	}
+  }
+
+  function showDownload() {
+	var LINK         = getLink( VERSION, MIRROR, SCHEMA );
+	var downloadCont = document.getElementById("action-download-extra");
+	var newHTML      = "<div id=\"buttonwrap\"><div id=\"downloadbutton\" onclick=\"openItem('optionitem1','" + LINK + "'); return false;\">";
+
+	if ( hasMirrorLink() ) {
+		newHTML += "<h3><a href=\"" + LINK + "\" title=\"" + LINK + "\">Download now!</a></h3>"
+		+ "<p>Start downloading OpenOffice.org " + VERSION + " for " + getPlatform() + " in "
+		+ getLanguage() + "<br/>(Java Runtime Environment (JRE) included for all OS versions except Linux 32/64-bit Debian and Mac OS)</p>";
+	} else {
+		newHTML += "<h3><a href=\""+ LINK + "\" title=\"" + LINK + "\">Download now!</a></h3><p>Get OpenOffice.org from your "
+		+ getLanguage() + " Native Language community</p>";
+
+	}
+
+	newHTML += "</div><p class=\"options\"><a href=\"http://download.openoffice.org/other.html\""
+	+ "title=\"Get all platforms and languages, non-JRE versions, language packs to download\" onclick=\"document.location = this.href; return false;\">"
+	+ "Get all platforms and languages</a> | "
+	+ "<a href=\"http://development.openoffice.org/releases/" + VERSION + ".html\""
+	+ "title=\"What is new, what has been improved in OOo " + VERSION + "?\">Release Notes</a> | "
+	+ "<a href=\"http://download.openoffice.org/md5sums/" + VERSION + "_md5sums.txt\" title=\"MD5 checksums for OOo " + VERSION
+	+ "\">MD5 checksums</a> | " + "<a href=\"http://distribution.openoffice.org/cdrom/iso_download.html\" title=\"ISO images\">ISO images</a> | "
+	+ "<a href=\"http://distribution.openoffice.org/cdrom/index.html#cdrom\" title=\"Order CD-ROM\""
+	+ "onclick=\"document.location = this.href; return false;\" >order CD-ROM</a> | "
+	+ "<a href=\"http://distribution.openoffice.org/p2p/\" title=\"P2P downloads\""
+	+ "onclick=\"document.location = this.href; return false;\" >P2P downloads</a></p></div>";
+	downloadCont.innerHTML = newHTML;
+  }
+
+  function hideDownload() {
+	var downloadCont       = document.getElementById("action-download-extra");
+	var newHTML            = "";
+	downloadCont.innerHTML = newHTML;
+  }
+  //-->
+  </script>
+</head>
+
+<body>
+
   <!-- commment added in the online CMS -->
-  <div id="actionstatements">
+<div id="actionstatements">
   <ul>
   <li><div class="action-info"><div class="action-text action-link">
   <h2><a name="content" href="http://why.openoffice.org/">I want to learn more about OpenOffice.org</a></h2>
@@ -34,9 +126,9 @@
   </div></div></li>
   <li><hr/></li>
   </ul>
-  </div>
+</div>
 
-  <div id="news">
+<div id="news">
   <div class="campaign">
   <h2>OpenOffice.org Blog at Apache</h2>
   <p>Keep up with latest developments in the OpenOffice.org to Apache project transition at the
@@ -52,8 +144,7 @@
   currently a catch all list for planning OpenOffice.org's existence in the ASF environment. We welcome your continued involvement!<br />
   OpenOffice.org downloads and support will continue to be available from this OpenOffice.org site during the transition phase. </p>
   </div>
-  
-  
+
   <!--
   <div class="campaign">
   <h2>Welcome to new Infrastructure</h2>
@@ -71,4 +162,9 @@
   alt="MirrorBrain - A download redirector and metalink generator"/></a>
   </div>
   -->
-  </div>
+
+</div>
+  
+
+</body>
+</html>

Modified: incubator/ooo/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/site/trunk/lib/view.pm?rev=1157441&r1=1157440&r2=1157441&view=diff
==============================================================================
--- incubator/ooo/site/trunk/lib/view.pm (original)
+++ incubator/ooo/site/trunk/lib/view.pm Sat Aug 13 23:19:41 2011
@@ -109,12 +109,8 @@ sub html_page {
         }
     }
 
-    my $style_path = $file;
-    $style_path =~ s/\.[^.]+$/.style/;
-    if (-f $style_path) {
-	read_text_file $style_path, \%styleargs;
-	$args{scriptstyle} = $styleargs{content};
-    }
+    $args{header} = `sed -n '/<head>/,/<\\/head>/p' ${file} | sed -e '1s/.*<head>//' -e 's/<\\/head>.*//'`;
+    $args{content} = `sed -n '/<body>/,/<\\/body>/p' ${file} | sed -e '1s/.*<body>//' -e "s/<\\/body>.*//"`;
 
     return Template($template)->render(\%args), html => \%args;
 }

Modified: incubator/ooo/site/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/incubator/ooo/site/trunk/templates/skeleton.html?rev=1157441&r1=1157440&r2=1157441&view=diff
==============================================================================
--- incubator/ooo/site/trunk/templates/skeleton.html (original)
+++ incubator/ooo/site/trunk/templates/skeleton.html Sat Aug 13 23:19:41 2011
@@ -18,10 +18,12 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-  <title>{% block title %}{{ headers.title }}{% endblock %}</title>
-  
-{% autoescape off %}{% if scriptstyle %}{{ scriptstyle }}{% else %}{% include "scriptstyle.html"%}{% endif %}{% endautoescape %}
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<link href="/openofficeorg/css/ooo.css" rel="stylesheet" type="text/css">
+{% if header %}{% autoescape off %}{{ header }}{% endautoescape %}{% else %}
+<title>{% block title %}{{ headers.title }}{% endblock %}</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+{% endif %}
 </head>
 
 <body>