Re: [website-dev] is there a way to clean the template code of OOo
Alexandro Colorado <[email protected]>
| Newsgroups | gmane.comp.openoffice.devel.website |
|---|---|
| Message-ID | <[email protected]> |
On Tue, May 11, 2010 at 2:41 AM, Ivan M <[email protected]> wrote: > Hi Alexandro, > > On Tue, May 11, 2010 at 4:03 PM, Alexandro Colorado <[email protected]> wrote: >> Hi I wonder if it was possible to clean the OOo website default >> template code. So far it seems is very very ... "all over the place". >> I see a lot of linespaces that just make it almost impossible to read. >> Also there is no comment. I have donde a more simplistic schema that >> we could try to implement. >> >> http://jza.pastebin.com/UBWrt6YQ >> >> Is not yet finished but would gladly share it if there is interest in >> cleaning this html code, I understand the template is generated from >> JSP code, but maybe this will help it produce more legible. >> >> Even if for the most part it works, there is some issues here since >> there is a lot of space to simplify the code and make it more >> straightforward. There is still some information lacking on some of >> the classes and ids on what/why they are encapsulated. >> >> Things like classes like navcol, navcolumn and navigation as well as >> navgroup. Maybe some documentation could be created or enhanced. This >> will make it easy in case we want to re-design the site with a fresh >> look at least we could more easily map it. >> >> Please give some feedback on the idea. > > I noticed the messiness too, but that's just the way that the > CollabNet templates produce static HTML output. The template code is > reasonably clean and well indented [1], but the code it spits out > isn't. I hope that we can start with a blank slate (with regard to > HTML) in the (hopefully) upcoming redesign and get rid of the tables, > clean up the code, etc. It's high time that it was done. > > Regards, > Ivan. > > [1] e.g. see > http://www.openoffice.org/source/browse/look/www/overrides/templates/PreServlet.vm?rev=1.65&view=markup > I see, there most be a bug with the JSP that even if it doesnt print the data, it 'reserves' the space. Looking at the vm, I can see that there is a lot of unecessary identation, or rather, identation only relevant to the portlet but unecessary to the final code. Still wonder how come there is a huge space break between line 31 and line 42 of regular html, which is the space between the div id="nonfooter" and the div id="header". This seems to responde to the PreServlet.vm. <!-- PreServlet.vm line 27 to 31--> <div id="nonfooter"><!-- closed in footer --> #parsePrefix("NewBanner.vm") <div id="content"> On HTML: <div id="nonfooter"><!-- closed in footer --> <div id="header"> Finally there are things that we could improve like inserting the comments I put on my copy and also try to improve the comments as well to make it easier to understand. Ivan M I saw you have also edit all these files, do you have any ideas on how this happens. -- Alexandro Colorado OpenOffice.org Español http://es.openoffice.org