Subject: NetBSD www pages, some ideas
To: None <netbsd-docs@netbsd.org>
From: Julio Merino <jmmv@hispabsd.org>
List: netbsd-docs
Date: 05/13/2002 20:36:07
--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello

I've started translating some html pages of the website to spanish,
and I would like to comment/ask some things about what I have seen
until now.

The first one refers to HTML 4.0. It is a Good Thing(TM) that they
validate as good html, and you ask writters to validate their pages,
though I think that it may be time to start converting pages to XHTML
1.0, preferably strict. I have done several pages with this standard
and I find the resulting code more structured and readable. If you
want, take a look to http://www.hispabsd.org, which uses xhtml (not
strict though).

The second point that is related with the above is about CSS. By doing
pages with XHTML and CSS it would be *very easy* to change all site
look, or for example, have all pages with the same format with minimun
effort. I personally do not like to see tags like font, small, big...
etc to simulate headers. And even worse, if we would like (some day, or
never) to change document's style, it would be a pain.

And the third point is about automation. I have seen that the index
page is rebuilt by a makefile, which adds events and news. Well, I
think this would be extended to other things: the platforms list and
the languages list, just to have all things in one place. This would
also be done with php (+ postgresql, though the database server is
optional as I comment now), dunno if you don't like/want it. With some
include's, it is really easy to do those things; and the main advantadge
of using include's is in other pages... all of them have some links at
the end (or the copyright notice). A single file would contain all
this information. Note that these inclusions would also be done with
a Makefile or cpp, if you do not like php.

For example, suppose you have a header.php which contains the start of
an xhtml document, like the head and the body start. It accepts some
variables for customization, like $title. Then you also have a
footer.php, which finishes body, and prints the copyright notice, plus
cvs tag, etc. Lets look at the following sample page:

----- sample page -----
<?php
$section =3D "About NetBSD";
$cvstag =3D "$NetBSD$"
include("header.php"); ?>

<p>This is the page text, note that the above three lines have already
written the page title, h1, header meta information, etc etc. The cvstag
is used to keep track of each document tag.</p>

<h2>This would be a subsection</h2>

<p>More text</p>

<?php include("footer.php"); ?>

<!-- note: the last line has echoed cvstag, copyright notice, closed body,
closed html, etc. -->
----- sample page -----

I know that adapting any of these points is a *lot* of work, but it
would be a great help for new translations, as code would look better
and shorter, as a consequence of inclusions. As said, all these php
things would also be done with cpp, using some #define's and #include's.

So... you may think I'm crazy... despite the work that this may need,
which is your oppinion on these ideas?

Thank you.

--=20
Of course it runs NetBSD - http://www.netbsd.org
HispaBSD member - http://www.hispabsd.org
Julio Merino <jmmv@hispabsd.org>

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE84AeXzz00ZOPKycwRAoUrAJ4xLNu/E2glscZryCrDm6h75wYuLQCfXZN1
NDY7kpNHop48jZRaCuN4Dgw=
=W0jV
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--