proposal for kdevelop.org new website design
Sam S.
smls75 at gmail.com
Mon May 17 16:56:24 UTC 2010
In the PressOn Sun, May 16, 2010 at 23:46, Amilcar do Carmo Lucas wrote:
> [...]
> Can we keep the moduleentry() function call and change its contents to
> <h1></h1> ?
> I would hate to have to change all the pages + translated pages.
What if I did it? :-)
Surely it must be possible to semi-automate this task...
On Mon, May 17, 2010 at 12:21 AM, Niko Sams <niko.sams at gmail.com> wrote:
> I heavily modified it already, it's actually quite nice no have a
> single function
> to change....
The problem is that the "*<moduleentry><h1>TITLE</h1><div>CONTENT</div></**
moduleentry**>*" of the old style (which the module_head()/module_tail() php
functions provided) doesn't map one-to-one with any single piece of markup
that cleanly satisfies all possibilities encountered in the new style...
Depending on the situation, the new style would ideally want that markup
replaced by:
1. "*<h1>TITLE</h1> CONTENT*" (the first section of most pages other than
the main page, e.g. "Logos and Banners" page)
2. "*<h2>TITLE</h2> CONTENT*" (subsections on various pages, e.g. the
news section on the front page)
3. "*<box>CONTENT</box>*" (e.g. the "what is KDevelop" box on the front
page) ["<box></box>" is meant to symbolize the markup needed for the
"Important content" boxes]
4. "*<h2>TITLE></h2> <box>CONTENT</box>*" (e.g. the "KDev3 vs KDev4" box
on the front page)
Niko already tried to accommodate multiple (but not all) of these cases in a
unified way, but it'll only get messier and messier.
That's why I think the best solution would be to edit the HTML files and
just replace those php function calls by whatever <h1></h1> / <h2></h2> /
etc. markup is actually needed in each situation.
It would of course make sense to use appropriate php functions for
generating the markup of *actual boxes* (i.e., pieces of content which are
actually graphically styled boxes in the new design), though.
I've committed an updated theme4.php that deprecates module_head()/
module_tail() and defines box_head()/box_tail() (for graphically styled
content boxes like on the front page), as well as linkbox_head()/
linkbox_tail() (for the link boxes, as these need different markup). [The
commit is self-contained and touches only this one file, so it should be
easy to revert if you don't want this.]
Anyhow, with this, *all* occurences of module_head()/module_tail() can be
nicely replaced by different combinations of <h1>'s, <h2>'s and the
aforementioned new box functions.
For example, the "KDev3 vs KDev4" section,
"<?php module_head('Versions:', 'border main-versions');?> ... <?php
module_tail();?>"
would become:
"<h2>Versions:</h2> <?php box_head('border main-versions');?> ... <?php
box_tail();?>"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100517/82293ef6/attachment.html>
More information about the KDevelop-devel
mailing list