Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 040E2895B for ; Tue, 9 Aug 2011 01:08:21 +0000 (UTC) Received: (qmail 3779 invoked by uid 500); 9 Aug 2011 01:08:20 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 3665 invoked by uid 500); 9 Aug 2011 01:08:20 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 3655 invoked by uid 99); 9 Aug 2011 01:08:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 01:08:19 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave2wave@comcast.net designates 76.96.30.64 as permitted sender) Received: from [76.96.30.64] (HELO qmta07.emeryville.ca.mail.comcast.net) (76.96.30.64) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 01:08:09 +0000 Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta07.emeryville.ca.mail.comcast.net with comcast id J0ma1h0091HpZEsA717jTe; Tue, 09 Aug 2011 01:07:43 +0000 Received: from [192.168.1.9] ([67.180.51.144]) by omta14.emeryville.ca.mail.comcast.net with comcast id J17j1h00L36gVt78a17jpc; Tue, 09 Aug 2011 01:07:44 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: [www] OOo Website Conversion (was: Re: Moving OOo web: results of fetch-all-web.sh) From: Dave Fisher In-Reply-To: <4E4002DE.3080601@gmail.com> Date: Mon, 8 Aug 2011 18:07:46 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <80C9E0B2-FF9B-43EF-A782-7475847DC765@comcast.net> <4E3EB0B2.10304@gmail.com> <4E4002DE.3080601@gmail.com> To: ooo-dev@incubator.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org Hi - Progress. On Aug 8, 2011, at 8:38 AM, Kay Schenk wrote: > On 08/08/2011 08:29 AM, Dave Fisher wrote: >> Hi Kay, >>=20 >> I was able to get HTML wrapped using the Apache CMS last night. I'm = not ready to commit anything yet. I'll summarize where I am and possible = next steps. >>=20 >> In order to make progress the key was investigating the source for = the {% %} template tagging. This is found here: >>=20 >> cms/build/lib/Dotiac/DTL/Tag >>=20 >> I changed view.pm to include an html_page procedure >>=20 >> In path.pm I added a pattern for html wrapping. >>=20 >> our @patterns =3D ( >> [qr!\.mdtext$!, single_narrative =3D> { template =3D> = "single_narrative.html" }], >> [qr!\.html$!, html_page =3D> { template =3D> = "html_page.html" }], >> ) ; >=20 > ah! good! So this can be parsed on a page by page basis? If so, super! >=20 >=20 >>=20 >> The template html_page.html looks a lot like single_narrative.html = but adds an override to the content block. >>=20 >> {% extends "skeleton.html" %} >> {% block content %}{% autoescape off %}{{ content }}{% endautoescape = %}{% endblock %} Now is this: {% extends "skeleton.html" %} {% block content %}{% autoescape off %}{{ content }}{% endautoescape = %}{% endblock %} {$ endextends $} >>=20 >> We keep a single skeleton which is good. >=20 > This is great news! Thanks for your wonderful insights and work! You are welcome. With a few tweaks things are committed and the process = works! >=20 >>=20 >> Next steps are >>=20 >> - blocks for javascript and css insertion. For testing purposes I split the www/index.html into an index.style and = shortened index.html. I'm not sure if this is best or if the split needs to be done while = processing the view. This is a subject for tomorrow. Also, this page needs a lot of work on styles to make it look like = before. Kenai stores content in places we may not have access to via the = svn repos like "branding" >> - controlling sidenav. The current html_page.html is not very good = for the pages that Carl modified in the download directory. For all html wrapped content I now turn off the sidenav. For mdtext the = sidenav remains. >> - header and footer framework For tomorrow. >> - online cms editing of html Confirmed the editing of html. There is syntax coloring in the CMS = WebGUI. >> - scripting of Kenai html into CMS compatible - stripping of headers = and extraction of javascript and css. To be discussed. It depends on how many sets of special page styles are = really needed. Here is how it currently works: Here is the script for wrapping the html: sub html_page { my %args =3D @_; my %styleargs =3D @_; my $file =3D "content$args{path}"; my $template =3D $args{template}; $args{breadcrumbs} =3D breadcrumbs($args{path}); read_text_file $file, \%args; my $page_path =3D $file; $page_path =3D~ s/\.[^.]+$/.page/; if (-d $page_path) { for my $f (grep -f, glob "$page_path/*.mdtext") { $f =3D~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; $args{$1} =3D {}; read_text_file $f, $args{$1}; } } my $style_path =3D $file; $style_path =3D~ s/\.[^.]+$/.style/; if (-f $style_path) { read_text_file $style_path, \%styleargs; $args{scriptstyle} =3D $styleargs{content}; } return Template($template)->render(\%args), html =3D> \%args; } Which interacts with templates/skeleton.html {% block title %}{{ headers.title }}{% endblock %} =20 {% autoescape off %}{% if scriptstyle %}{{ scriptstyle }}{% else %}{% = include "scriptstyle.html"%}{% endif %}{% endautoescape %} So you see there is a default location for css and javascript. The question is if there should be a set of selectable javascript/css = templates, or if we want to have these files be next to the file they = apply to. If we go to a specific set of templates method then we would change to: {% autoescape off %}{% if scriptstyle %}{% include scriptstyle %}{% else = %}{% include "scriptstyle.html"%}{% endif %}{% endautoescape %} Regards, Dave >>=20 >> Regards, >> Dave >>=20 >> On Aug 7, 2011, at 8:35 AM, Kay Schenk wrote: >>=20 >>>=20 >>>=20 >>> On 08/06/2011 09:03 PM, Dave Fisher wrote: >>>>=20 >>>> On Aug 4, 2011, at 12:16 PM, Kay Schenk wrote: >>>>=20 >>>>> I just wanted to report that this script worked just fine as near >>>>> as I can tell. >>>>=20 >>>> Great. When I did the work for the www and download project I used = a >>>> different script which is still a stub as there was a hand editing >>>> step to correct inconsistent line endings. >>>>=20 >>>>> The post about the script has shown up in several places, but >>>>> placing it as its own subject seemed appropriate. >>>=20 >>> yes...it got buried! :) >>>=20 >>>>>=20 >>>>> Now back to investigating headers/footers. >>>>=20 >>>> I added a page to the wiki with some of my thoughts today about >>>> headers and footers for the websites including the MediaWiki and = User >>>> Forums. >>>>=20 >>>> = https://cwiki.apache.org/confluence/display/OOOUSERS/Website+Template >>>=20 >>> good! this needs regular updating as we iron out issues...I'll take = a look >>>>=20 >>>> I am going to try a new template/skeleton.html tomorrow. >>>>=20 >>>> Regards, Dave >>>=20 >>> OK, I'm going to try to start "migrating" some of the old OO.o pages = to the "www" area on Apache today. I won't link them in to anything. = This will just be for my education at this point. >>>=20 >>> So, I am kind of wondering why you took "download" off the main line = so to speak. Thoughts? >>>=20 >>> As far as I'm concerned given the current layout and "incubator" = status, we might consider just leaving the side navigation items as they = are or augmenting them somewhat, and using this existing "template" = instead of the more involved "top tab" business currently with the OO.o = site. But...we'll see what we think after a few "tests" I guess. >>>=20 >>> later... >>>>=20 >>>>>=20 >>>>> -- >>>>> = --------------------------------------------------------------------------= ------------- >>>>>=20 >>>>>=20 >>> MzK >>>>>=20 >>>>> "If you can keep your head when all others around you are losing >>>>> theirs - maybe you don't fully understand the situation!" -- >>>>> Unknown >>>>=20 >>>=20 >>> -- >>> = ------------------------------------------------------------------------ >>> MzK >>>=20 >>> "Those who love deeply never grow old; >>> they may die of old age, but they die young." >>> -- Sir Arthur Pinero >>=20 >=20 > --=20 > = ------------------------------------------------------------------------ > MzK >=20 > "Those who love deeply never grow old; > they may die of old age, but they die young." > -- Sir Arthur Pinero