incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1226353 - in /incubator/ooo/ooo-site/trunk: content/css/ooo.css lib/view.pm templates/api/ templates/api/leftnav.mdtext templates/sidenav.mdtext templates/skeleton.html
Date Mon, 02 Jan 2012 06:39:35 GMT
Author: wave
Date: Mon Jan  2 06:39:35 2012
New Revision: 1226353

URL: http://svn.apache.org/viewvc?rev=1226353&view=rev
Log:
Several enhancements: Shorter banner; better display in narrow windows - breadcrumbs go below
the topbar; support for leftnav for api; support for topnav and leftnav overrides; only a
single "clear" div.

Added:
    incubator/ooo/ooo-site/trunk/templates/api/
    incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext   (with props)
Removed:
    incubator/ooo/ooo-site/trunk/templates/sidenav.mdtext
Modified:
    incubator/ooo/ooo-site/trunk/content/css/ooo.css
    incubator/ooo/ooo-site/trunk/lib/view.pm
    incubator/ooo/ooo-site/trunk/templates/skeleton.html

Modified: incubator/ooo/ooo-site/trunk/content/css/ooo.css
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/css/ooo.css?rev=1226353&r1=1226352&r2=1226353&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/css/ooo.css (original)
+++ incubator/ooo/ooo-site/trunk/content/css/ooo.css Mon Jan  2 06:39:35 2012
@@ -22,23 +22,23 @@ body {
 }
 
 #bannera {
-  height: 145px;
-  padding: 0 0 0 0;
+  height: 105px;
+  padding: 0 0 0 8px;
   color: black;
   font-family: Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
-  font-size:14pt;
+  font-size:12pt;
   vertical-align: middle;
 }
 
 #bannerright {
   text-align: right;
   float: right;
-  padding: 10pt 36pt 10pt 36pt;
-  width: 200px;
+  padding: 4pt 20pt 4pt 16pt;
+  width: 180px;
 }
 
 #bannercenter {
-  padding: 46pt 2pt 34pt 2pt;
+  padding: 31pt 2pt 14pt 2pt;
   float: center;
   color: #107EC0;
 }
@@ -46,7 +46,6 @@ body {
 #bannerleft {
   text-align: left;
   float: left;
-  height: 94pt;
 }
 
 a {
@@ -75,11 +74,10 @@ h1,h2,h3,h4,h5,h6 {
 }
 
 #content {
-  margin: 0 50px 20px 50px;
-  padding: 0 8px 40px;
+  margin: 0 32px 20px 32px;
+  padding: 12px 8px 32px 8px;
   color: #333;
   overflow: auto;
-  clear: both;
 }
 
 #content h1,h2,h3,h4,h5,h6 {
@@ -196,7 +194,7 @@ td {
   border-radius: 10px;
 }
 
-#topbara {
+#topbara{
   border-top: 1px solid #c6cbdd;
   border-bottom: 1px solid #c6cbdd;
   height: 24pt;
@@ -207,6 +205,7 @@ td {
   font-family: Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
   font-size:14pt;
   vertical-align: middle;
+  clear: both;
 }
 
 #breadcrumbsa {
@@ -265,28 +264,27 @@ td {
  text-decoration:underline;
 }
 
-#sidenav {
+#leftnav {
   border: 1px solid #e6ebed;
   border-left: none;
-  -moz-border-radius: 0 10px 10px 0;
-  border-radius: 0 10px 10px 0;
-  font-size: 0.9em;
+  -moz-border-radius: 0 0 10px 0;
+  border-radius: 0 0 10px 0;
   color: #003;
   float: left;
-  padding: 15px 15px 5px 25px;
-  width: 180px;
+  padding: 15px 15px 5px 20px;
+  width: 150px;
   background: none repeat scroll 0 0 #f5f8fa;
-  margin: 0 0 20px 0;
+  margin: 0 12px 20px 0;
 }
 
-#sidenav img {
+#leftnav img {
   padding-bottom: 15px;
   margin-left: auto;
   margin-right: auto;
   display: block;
 }
 
-#sidenav h1 {
+#leftnav h1 {
   color: #000;
   font-size: 1em;
   padding: 0;
@@ -295,26 +293,27 @@ td {
   border-bottom: 1px solid #a3afb6;
 }
 
-#sidenav ul {
+#leftnav ul {
   margin: 0 0;
   padding: 0;
   list-style: none;
 }
 
-#sidenav li {
+#leftnav li {
   border-bottom: 1px solid #e6ebed; 
   margin: 0.2em 0;
   padding: 0;
 }
 
-#sidenav li a {
+#leftnav li a {
   margin: 0;
   text-decoration:none;
 }
 
-#sidenav li a:hover {
-  color: #193240;
-  background: none;
+#leftnav li a:hover {
+  color: #107EC0;
+  background-color: #c6cbdd;
+  text-decoration:underline;
 }
 
 #navigation {
@@ -409,10 +408,33 @@ td {
 
 #asf-logo {
   width: 180px;
-  padding-top: 20px;
+  padding-top: 8px;
 }
 
+#ooo-logo {
+  height: 100px;
+  padding-top: 4px;
+  padding-left: 8px;
+}
 
+input {
+  border: 1px solid #999;
+  background-color: #EEE;
+  padding: 1px;
+}
+
+.topsrchbutton {
+  cursor: pointer;
+  height:24px;
+  width: 52px;
+  margin: 0 0 0 3px;
+}
+
+#query {
+  width: 115px;
+  border: 1px solid #C6CBDD;
+  padding: 2px;
+}
 
 /* definition lists */
 dd {}

Modified: incubator/ooo/ooo-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/lib/view.pm?rev=1226353&r1=1226352&r2=1226353&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/lib/view.pm (original)
+++ incubator/ooo/ooo-site/trunk/lib/view.pm Mon Jan  2 06:39:35 2012
@@ -79,6 +79,29 @@ sub html_page {
         }
     }
 
+# default navbars and mdtext from templates folder.
+
+    my $templates_folder = "templates";
+    if (-d $templates_folder) {
+	for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+           $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
+           $args{$1} = {};
+           read_text_file $f, $args{$1};
+	}
+    }
+
+# folder specific overrides
+
+    $templates_folder = templatesfolder($args{path});
+    $args{templates_folder} = $templates_folder;
+    if (-d $templates_folder) {
+	for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+           $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
+           $args{$1} = {};
+           read_text_file $f, $args{$1};
+	}
+    }
+
     $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>.*//"`;
 
@@ -139,6 +162,13 @@ sub breadcrumbs {
     return join "&nbsp;&raquo&nbsp;", @rv;
 }
 
+sub templatesfolder {
+    my @path = split m!/!, shift;
+    my $relpath = "templates/";
+    $relpath .= $path[1];
+    return $relpath;
+}
+
 1;
 
 =head1 LICENSE

Added: incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext?rev=1226353&view=auto
==============================================================================
--- incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext (added)
+++ incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext Mon Jan  2 06:39:35 2012
@@ -0,0 +1,26 @@
+# Developer's Guide
+
+  - [Content Table](http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide)
+  - [IDL reference](/api/docs/common/ref/com/sun/star/module-ix.html)
+
+# API
+
+  - [Module structure](/api/modules.html)
+
+# SDK
+
+  - [Examples](/api/SDK/example_collection.html)
+  - [Java UNO Reference](/api/docs/java/ref/overview-summary.html)
+  - [C++ UNO Reference](/api/docs/cpp/ref/names/index.html)
+  - [Download](/download/sdk/)
+
+# Tips 'n' Tricks
+
+  - [FAQ](/api/faq.html)
+  - [Internal OO Spots](/api/TipsAndTricks/internal.html)
+  - [External Resources](/api/TipsAndTricks/external.html)
+
+# Miscellaneous
+
+  - [Developer Projects](http://wiki.services.openoffice.org/wiki/API/To-Dos)
+  - [Mailing List Rules](/api/listrules.html)

Propchange: incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/ooo/ooo-site/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/templates/skeleton.html?rev=1226353&r1=1226352&r2=1226353&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/templates/skeleton.html (original)
+++ incubator/ooo/ooo-site/trunk/templates/skeleton.html Mon Jan  2 06:39:35 2012
@@ -11,11 +11,10 @@
 
 <body>
   <div id="bannera">
-    <div id="bannerleft">
-      <img id="ooo-logo" alt="Apache OpenOffice.org (Incubating)" src="/images/ooo-logo.png"/></div>
-    <div id="bannerright"><a title="Apache Incubator" href="http://incubator.apache.org">
-      <img id="asf-logo" alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a>
-      <div style="relative; margin: 24px 0 0 0; float: right; height: 20px;">
+    <div id="bannerleft"><img id="ooo-logo" alt="Apache OpenOffice.org (Incubating)"
src="/images/ooo-logo.png"/></div>
+    <div id="bannerright">
+      <a title="Apache Incubator" href="http://incubator.apache.org"><img id="asf-logo"
alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a>
+      <div style="relative; margin: 14px 0 0 0; height: 24px;">
 	<form id="cse-search-box-header" action="http://www.google.com/search" method="get">
 	  <div>
 	    <input type="hidden" name="domains" value="ooo-site.apache.org"/>
@@ -23,40 +22,28 @@
 	  </div>
 	  <div style="width: 180px">
 	    <input name="resultsPerPage" value="40" type="hidden"/> 
-	    <input name="q" id="query" alt="search" type="text" style="float: left; width: 115px;
border: 1px solid #C6CBDD; padding: 2px;"/> 
-	    <input name="Button" value="Search" type="submit" style="height:24px; width: 55px;
margin: 0 0 0 3px;"/>
+	    <input name="q" id="query" alt="search" type="text"/>
+	    <input name="Button" value="Search" type="submit" class="topsrchbutton"/>
 	  </div>
 	</form>
       </div>
     </div>
     <div id="bannercenter"><br/>(incubating)&nbsp;|&nbsp;The Free and
Open Productivity Suite</div>
   </div>
-  <div id="clear"></div>
   <div id="topbara">
+    {% if topnav.content %}<div id="topnava">{% block topnav %}{{ topnav.content|markdown
}}{% endblock %}</div>{% endif %}
     <div id="breadcrumbsa">{% block breaddcrumbs %}{% autoescape off %}{{ breadcrumbs
}}{% endautoescape %}{% endblock %}</div>
-    <div id="topnava">{% if topnav.content %}
-      {% autoescape off %}{{ topnav.content }}{% endautoescape %}
-    {% else %}
-      {% filter markdown %}{% include "topnav.mdtext" %}{% endfilter %}
-    {% endif %}</div>
   </div>
   <div id="clear"></div>
-  {% if sidenav %}
-  <div id="sidenav">
-    {% filter markdown %}{% include "sidenav.mdtext" %}{% endfilter %}
-  </div>
-  <div id="contenta">
-  {% else %}
+  {% if leftnav.content %}<div id="leftnav">{% block leftnav %}{{ leftnav.content|markdown
}}{% endblock %}</div>{% endif %}
+  {% if rightnav.content %}<div id="rightnav">{% block rightnav %}{{ rightnav.content|markdown
}}{% endblock %}</div>{% endif %}
   <div id="content">
-  {% endif %}
     {% block title %}{% if headers.title %}<h1 class="title">{{ headers.title }}</h1>{%
endif %}{% endblock %}
     {% block content %}{{ content|markdown }}{% endblock %}
   </div>
 
   <div id="footera">
-    <div id="poweredbya">
-      <p><img src="/images/feather-small.gif"/></p>
-    </div>
+    <div id="poweredbya"><p><img src="/images/feather-small.gif"/></p></div>
     <div id="copyrighta">
       <p>
 	Apache "OpenOffice.org" is an effort undergoing incubation at The Apache Software Foundation
(ASF), sponsored by the Apache Incubator.



Mime
View raw message