Re: mu homepage

From: Michele Andreoli (m.andreoli@tin.it)
Date: Wed Nov 20 2002 - 22:49:01 CET


On Wed, Nov 20, 2002 at 09:32:14PM +0100, Michael Gruner nicely wrote:
> Hello Michele,
>
> sometimes ago you told us about creating the new mulinux homepage with
> somthing of a M4 makro processor. Did you use wml for that? Where is a
> good point to start creating webpages with that m4 ?
>
> thx in advance
>

M4 is simply a command that read a file, replace in it some string, and
output the result. It is the GNU macroprocessor used in sendmail, for example.
M4 is well documented trought 'info', and not through (how should write
this word: trough, through, mah?!) manpages.

I simply created a little library called lib.m4 with additional functions,
like MENU(), ITEM(), H1(), H2() etc.

This is the menu.m4, from my site. It gets translated in the menu.html:

                m4 lib.m4 menu.m4 > menu.html

menu.html is the left-side-part in each page on my site.
It look like:

=====================================================================
MENU_START

<center>
  <a href="http://sunsite.dk/">
  <img src="http://sunsite.dk/images/hostedby.png" border=0 alt="Hosted by Sunsite.dk">
  </a>
</center>

MENU(Basic Info)
ITEM(What's mulinux,mulinux.html)
ITEM(Features,features.html)
ITEM(Screenshots,screen.html)
ITEM(What's News,news.html)

.... many cancelled rows ....

MENU(Miscellanea)
ITEM(Sunsite Statistics, stat.html)
ITEM(License, license.html)
ITEM(Author, author.html)
MENU_END

<center>
<img src=mu/img/pp-2.gif>
</center>

=====================================================================

As you can see, I can mix HTML and Macros. M4 only translate macros,
producing html.

In lib.m4 I also have some parameter, like table dimensions, colors,
background, etc ...

I just created for You the m4html.tgz package. You can find it in the
Other section, on mulinux.sunsite.dk

Michele

-- 
"Physics is like sex: it may give some practical
results, but that's not why we do it"  (Richard Feynman)
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:23 CET