About this web site

This is a pure static1 web site - as minimalistic as it can be. Table-based main layout, navigation chapters, TOC using inline frames and articles written as text files with a few lighweight markup. Styled with CSS. These files has been converted to minimal HTML before uploading to the server by a small JavaScript program I wrote.

1. Dynamic web-site means there are some programs running either on the web-server or the client computer to make html pages. A great way to make complex stuff, but it immediately brings in a lot of problems. Dependency. Compatibility. Support. I tried to avoid this here.

Lightweight to HTML

How to make html from marked up text?

I write a lot of text files: notes during development, figures to understand and explain stuff, small articles. I use my favourite text editor: Crimson Editor 3.70. It's the column-mode for making small ASCII-figs for me that kicks ss. During writing I use a few basic text markup to emphasise words, making lists, headers, paragraphs, pre-formatted blocks for ASCII-art figs.

There are so many formats, programs and almost standards for this, so I ended up writing my own converter that matches my style of writing.

It does substitutions of f.eks. asterisk to <em> and a few block-level elements, like paragraphs, headers, nested unordered list and preformatted text. Later we can style all these with CSS. Here are some examples (check out the text source by changing the URL to .txt):


It's easy to start a new paragraph by pressing ENTER more, than twice.
It's also easy to start a new line by simply starting a new line.

Emphasising words are important, sometimes as strong, or even in nested way like this, or maybe like this if it is needed.

We have to have headers, at least four levels:

Chapter

Title

Topic

Sub-topic

Writing lists are inevitable. At present I can write nested unordered lists. I like that the html source remain also readable (just check it out):

Talking about programming I couldn't avoid super- and sub-scripts, how can I write log2 or 28 differently?

It's also very nice to write notes, remarks in a smaller text, which are not so important.

And to insert source code related text inline, like this C function: printf(), styled with CSS so if it looks too big or small or whatever, I can change it later.

And now we get to my several ASCII-art figs I wrote during these years: start a line with TAB will be a pre-formatted block. Again, styled with CSS:

+--------------------+
| TEXT -------> HTML |
+--------------------+

Links:


Layout

My wish was to have a toc-tree on the left for selecting articles, and the article itself on the right. With no coding, static pages. The articles are text files with a few markup: they have to be converted to HTML before put it on the server. TOC should exist only in one copy. Links in the TOC tree has target="article" attribute set, and the article itself is an iframe:

    |               
TOC |  
    |  article 
    |
    |

It's also very nice to have a header and maybe a footer. And the whole page should expand/shrink with the browser window size:

-----------------   
     header 
-----------------   
    |
TOC |  
    |  articles
    |
    |
-----------------   
     footer 
-----------------   

But as the TOC grows, it's nice to divide the content into chapers and make a navigation-bar on the top. The idea is to include the whole chapter as an iframe in the main page: so I can select another chapter by clicking a navigation item. Again, no coding: only using target="chapter" for the links of nav. Chapters correspond to directories on the server:

-----------------   
     header 
-----------------   
      nav
-----------------   
     
       
    chapter     
     
     
-----------------   
     footer 
-----------------   

The chapter itself will be one of the TOC/article page. Finally, the main page shows header, nav, chapter and footer in one HTML table. All sizes are maximized inside the browser with CSS:

-----------------   
     header 
-----------------   
      nav
-----------------   
    |
TOC |  
    |  articles
    |
    |
-----------------   
     footer 
-----------------   

This layout worked for me well that I'll stuck with it. Files for each chapter are in a separate directory. Each chapter.html has it's own TOC (that file I edit as HTML) and an iframe for the articles, separate text-to-html preconverted files.

Notes on HTML TABLE vs. CSS table and div-s

Although using CSS tables is considered more correct these days - I made HTML tables for the main page layout. It's only one page and it was easier to put resizable content into cells. The CSS is also shorter. I've tried both and I just cannot see the advantage of CSS tables over HTML tables. Criticise me.

Table of contents

How can I do that? With static web pages we could include TOC in all pages. Painful when TOC changes, a page is added/removed, then I have to go through all pages and paste the new TOC. That's not good. There are HTML frames and framesets, but then we need a different layout for the main page. iframe comes handy: with a link target set to an iframe will show another artice by clicking links in the toc-tree. I liked that.

Future thoughts

Thinking about the future - when code might run on the web server or the client computer - it's written in JavaScript. Who knows. My hosting service can run php only, but I don't know php. I did client-side JS too, but it has the limitation, or it's not trivial, how to access a .txt file on the server, convert to html markup and make a html page from it. Need some header/footer html for the document too. This is really server-side programming.

I could also make automatic TOC generation for a chapter based on the place of the .txt files in the directory structure. I'll try this, but then I have to check the hyperlinks, probably modify them too. Everything is just bringing in more and more troubles.

Design decisions: