Don Coyote, thank you for taking time to read it over.
- I feel very very strongly about not using tables for layout, so I am not too sorry for my prosthelytizing. I will not go into how frames are evil however. (I will not include frames in the module.)
- Yes, I was inconsistent when it came to the code block description, so the inconsistency has been removed.
- With the paragraph and sparagraph descriptions, I was hoping to avoid repetition so I put them together. Separating the separator now would lead to many headaches since I have already implemented it throughout my many many pages.
I am not sure how to determine what tab level the user is at when using the functions, or if the user wants tabs at all. A user could set my $tab = 0; and not have any tabs with any function used as follows.
# Unwritten elements used in this example, however they will be soon.
my $tab = 0;
my @list = (
['red, { style => 'color:#ff0000' }],
['green', { style => 'color:#00ff00' }],
['blue', { style => 'color:#0000ff' }]
);
html($tab, sub {
head($tab, sub {
title($tab, 'My page title');
});
body($tab, sub {
div($tab, sub {
heading($tab, 1, 'My sample heading', { id => 'sample_heading'
+, style => 'color:#666666' });
paragraph($tab, 'A sample paragraph so you can see how this wo
+rks.');
list($tab, \@list, { id => 'colors' }); # list items will get
+tabbed.
paragraph($tab, 'Another paragraph for you');
heading($tab, 1, 'A second sample heading');
}, { class => 'div_class' });
paragraph($tab, 'Some end remarks.', { id => 'end_remarks', clas
+s => 'remarks' });
});
});
A user could set up the tabs like the following.
my $tab = 0;
html($tab, sub {
$tab++;
head($tab, sub {
$tab++;
title($tab, 'My page title');
$tab--;
});
body($tab, sub {
$tab++;
div($tab, sub {
$tab++;
heading($tab, 1, 'My sample heading', { id => 'sample_heading'
+, style => 'color:#666666' });
$tab++;
paragraph($tab, 'A sample paragraph so you can see how this wo
+rks.');
list($tab, \@list, { id => 'colors' });
paragraph($tab, 'Another paragraph for you');
$tab--;
heading($tab, 1, 'A second sample heading');
$tab--;
}, { class => 'div_class' });
paragraph($tab, 'Some end remarks.', { id => 'end_remarks', clas
+s => 'remarks' });
$tab--;
});
$tab--;
});
I will not force too many unwanted tabs onto a user. Make sense?
Have a cookie and a very nice day!
Lady Aleena
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.