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 2012/02/20 05:02:50 UTC
svn commit: r1291125 - in /incubator/ooo/ooo-site/trunk: lib/ templates/
templates/api/
Author: wave
Date: Mon Feb 20 04:02:49 2012
New Revision: 1291125
URL: http://svn.apache.org/viewvc?rev=1291125&view=rev
Log:
Change templates to only use ssi.mdtext files for header parameters to control ssi use in the skeleton.html
Added:
incubator/ooo/ooo-site/trunk/templates/api/ssi.mdtext (with props)
incubator/ooo/ooo-site/trunk/templates/ssi.mdtext (with props)
Removed:
incubator/ooo/ooo-site/trunk/templates/api/brand.mdtext
incubator/ooo/ooo-site/trunk/templates/api/leftnav.mdtext
incubator/ooo/ooo-site/trunk/templates/brand.mdtext
incubator/ooo/ooo-site/trunk/templates/footer.mdtext
incubator/ooo/ooo-site/trunk/templates/topnav.mdtext
Modified:
incubator/ooo/ooo-site/trunk/lib/view.pm
incubator/ooo/ooo-site/trunk/templates/skeleton.html
Modified: incubator/ooo/ooo-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/lib/view.pm?rev=1291125&r1=1291124&r2=1291125&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/lib/view.pm (original)
+++ incubator/ooo/ooo-site/trunk/lib/view.pm Mon Feb 20 04:02:49 2012
@@ -39,10 +39,10 @@ sub single_narrative {
read_text_file $f, $args{$1};
}
}
- # default navbars and mdtext from templates folder.
+ # default navbars and mdtext from templates/ssi.mdtext.
my $templates_folder = "templates";
if (-d $templates_folder) {
- for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+ for my $f (grep -f, glob "$templates_folder/ssi.mdtext") {
$f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
$args{$1} = {};
read_text_file $f, $args{$1};
@@ -52,7 +52,7 @@ sub single_narrative {
$templates_folder = templatesfolder($args{path});
$args{templates_folder} = $templates_folder;
if (-d $templates_folder) {
- for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+ for my $f (grep -f, glob "$templates_folder/ssi.mdtext") {
$f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
$args{$1} = {};
read_text_file $f, $args{$1};
@@ -68,8 +68,8 @@ sub single_narrative {
$args{scriptstyle} = $styleargs{content};
}
- $args{breadcrumbs} =~ s/home/$args{brand}{headers}{home}/;
-
+ $args{breadcrumbs} =~ s/home/$args{ssi}{headers}{home}/;
+
return Template($template)->render(\%args), html => \%args;
}
@@ -98,10 +98,10 @@ sub html_page {
read_text_file $f, $args{$1};
}
}
- # default navbars and mdtext from templates folder.
+ # default navbars and mdtext from templates/ssi.mdtext.
my $templates_folder = "templates";
if (-d $templates_folder) {
- for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+ for my $f (grep -f, glob "$templates_folder/ssi.mdtext") {
$f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
$args{$1} = {};
read_text_file $f, $args{$1};
@@ -111,7 +111,7 @@ sub html_page {
$templates_folder = templatesfolder($args{path});
$args{templates_folder} = $templates_folder;
if (-d $templates_folder) {
- for my $f (grep -f, glob "$templates_folder/*.mdtext") {
+ for my $f (grep -f, glob "$templates_folder/ssi.mdtext") {
$f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
$args{$1} = {};
read_text_file $f, $args{$1};
@@ -122,7 +122,7 @@ sub html_page {
@args{qw/header bodytag content/} = ($1, $2, $3);
}
- $args{breadcrumbs} =~ s/home/$args{brand}{headers}{home}/;
+ $args{breadcrumbs} =~ s/home/$args{ssi}{headers}{home}/;
return Template($template)->render(\%args), html => \%args;
}
Added: incubator/ooo/ooo-site/trunk/templates/api/ssi.mdtext
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/templates/api/ssi.mdtext?rev=1291125&view=auto
==============================================================================
--- incubator/ooo/ooo-site/trunk/templates/api/ssi.mdtext (added)
+++ incubator/ooo/ooo-site/trunk/templates/api/ssi.mdtext Mon Feb 20 04:02:49 2012
@@ -0,0 +1,6 @@
+brand: /brand.html
+footer: /footer.html
+topnav: /topnav.html
+leftnav: /api/leftnav.html
+legacy: Content for OpenOffice.org version 3.3.
+home: home
Propchange: incubator/ooo/ooo-site/trunk/templates/api/ssi.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=1291125&r1=1291124&r2=1291125&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/templates/skeleton.html (original)
+++ incubator/ooo/ooo-site/trunk/templates/skeleton.html Mon Feb 20 04:02:49 2012
@@ -10,21 +10,21 @@
</head>
<body>
-<!--#include virtual="{{ brand.headers.ssipath }}" -->
+<!--#include virtual="{{ ssi.headers.brand }}" -->
<div id="topbara">
- {% if topnav.headers %}<!--#include virtual="{{ topnav.headers.ssipath }}" -->{% endif %}
+ {% if ssi.headers.topnav %}<!--#include virtual="{{ ssi.headers.topnav }}" -->{% endif %}
<div id="breadcrumbsa">{% block breaddcrumbs %}{% autoescape off %}{{ breadcrumbs }}{% endautoescape %}{% endblock %}</div>
</div>
<div id="clear"></div>
- {% if leftnav.headers %}<!--#include virtual="{{ leftnav.headers.ssipath }}" -->{% endif %}
- {% if rightnav.headers %}<!--#include virtual="{{ rightnav.headers.ssipath }}" -->{% endif %}
+ {% if ssi.headers.leftnav %}<!--#include virtual="{{ ssi.headers.leftnav }}" -->{% endif %}
+ {% if ssi.headers.rightnav %}<!--#include virtual="{{ ssi.headers.rightnav }}" -->{% endif %}
<div id="content">
- {% block legacy %}{% if brand.headers.legacy %}<div class="legacy">{{ brand.headers.legacy }}</div>{% endif %}{% endblock %}
+ {% block legacy %}{% if ssi.headers.legacy %}<div class="legacy">{{ ssi.headers.legacy }}</div>{% endif %}{% endblock %}
{% block title %}{% if headers.title %}<h1 class="title">{{ headers.title }}</h1>{% endif %}{% endblock %}
{% block content %}{{ content|markdown }}{% endblock %}
</div>
-<!--#include virtual="{{ footer.headers.ssipath }}" -->
+<!--#include virtual="{{ ssi.headers.footer }}" -->
</body>
</html>
Added: incubator/ooo/ooo-site/trunk/templates/ssi.mdtext
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/templates/ssi.mdtext?rev=1291125&view=auto
==============================================================================
--- incubator/ooo/ooo-site/trunk/templates/ssi.mdtext (added)
+++ incubator/ooo/ooo-site/trunk/templates/ssi.mdtext Mon Feb 20 04:02:49 2012
@@ -0,0 +1,4 @@
+brand: /brand.html
+footer: /footer.html
+topnav: /topnav.html
+home: home
Propchange: incubator/ooo/ooo-site/trunk/templates/ssi.mdtext
------------------------------------------------------------------------------
svn:eol-style = native