[geeklog-devel] CSS-Layout possible!

Oliver Spiesshofer oliver at spiesshofer.com
Sun Sep 23 23:55:58 EDT 2007


Here is the current state of affairs regarding the layout:

It would be quite easy to do CSS-only layouts, as I found out now. Only 
very minor changes are necessary to create a center-left-right HTML/CSS, 
one of them being to add a right_blocks_in_footer config to the 
left_blocks_in_footer, and the other a flag to COM_showBlocks that makes 
the function simply return if there are left or right blocks in the 
layout and therefore assign different classes to elements in either 
footer or header.

Now the problem: If we want a layout that has the center in the html 
before the left and right blocks, we cannot have a footer anymore that 
spans the whole page as far as I could find out. The ideal layout for 
center-first HTML is described here: http://glish.com/css/7.asp If 
anyone manages to put a footer there, please tell me how. The footer 
would have only the width of the story, if the left/right blocks are 
shorter, there will be a blank space.

So the only thing left over, if we want a footer, is to have a left, 
right, center, footer order in HTML and float everything to the left 
(http://css.maxdesign.com.au/floatutorial/tutorial0916.htm). This would 
require to display all blocks in the header, I do not really know 
however what those left_blocks_in_footer are doing in the config in the 
first place, this should be set only in the theme.... well, in an ideal 
world this would not be necessary anyhow since all elements would be 
joined together in one central function.

So here is my proposal:
1. modify COM_siteHeader and COM_siteFooter so that either of them can 
display right and left blocks (for the left blocks, that is already the 
case, so why not for both?) This is to allow theme authors to really do 
what they want and not be forced to a certain order of the main 3 
elements. This would be obsolete once we introduce step 5.
2. Add an option to simply tell if blocks are there to COM_showBlocks, 
so that in the header and footer, layouts of elements can differ 
depending on the existence of left and right blocks.
3. Use a table-free layout for the professional theme with 
left-right-center floated.
4. (draft) Introduce a minimal-layout where the CSS only is changed to 
display the center first. I am not sure how to make mobile devices to 
choose this by default, and how this will look like, but I will try to 
find a proper solution before introducing any of this.
5. (draft) Create a new function that creates all elements in one go and 
replaces the COM_siteHeader + center + COM_siteFooter. Both ways will be 
available but the aforementioned will be deprecated and removed 3-4 (?) 
versions later.

comments, suggestions, flying axes?

Oliver

Oliver Spiesshofer wrote:
> Dirk,
>
> I do not insist to du this in this version. if the work is worth it or 
> not is surely hard to judge.
> the current way of display (header + leftblock) + content + 
> (rightblock  + footer), it surely makes it harder to work.
> However, I have been thinking about this for a while now and came to 
> the following point:
> There is no need for big change. The formerly proposed solution would 
> require to run two different thtml for the same thing, depending if 
> you use the new method or the old.
>
> I rather do the following: I move both left and right blocks into the 
> footer, make a simple check if left or right blocks exist and put that 
> check into the header, then assign a different class to the center 
> that makes the margin around the center existent or not depending on 
> the outcome. Then we even have the proper sequence of content for 
> small-screen rendering, no right floats etc.
> I am not sure however if that puts a big strain on the system, or if 
> it is even worth to call the blocks in the header and pass it via a 
> global to the footer.
>
> Still, I think it would be good to deprecate the current practice over 
> time and introduce a function that does the content in one go 
> depending on variables. This could happen over 2-3 versions. If we 
> stick to what he have now, we are never really flexible in the way to 
> create layouts.
>
> Oliver
>
> Dirk Haun wrote:
>> Oliver Spiesshofer wrote:
>>
>>  
>>> Still, before I do this, I would like to hear if there are any 
>>> objections to that.
>>>     
>>
>> Okay, I've finally caught up with this thread. But I fail to see the
>> real advantage of the proposed changes.
>>
>> I mean, are there any actual, immediate problems with the way things are
>> done currently? Quite a few nice new themes have been developed recently
>> without these changes - would they have made the theme developer's lifes
>> (significantly) easier? Eric? Mark?
>>
>> Sure, a fully CSS-based layout would be nice. That's the holy grail of
>> web development. But with all the proposed changes I wonder if it's 
>> worth it.
>>
>> Not to mention that I was actually hoping to enter a phase of
>> consolidation of the code base now so we can get a release out ...
>>
>> bye, Dirk
>>
>>
>>   
>
>




More information about the geeklog-devel mailing list