Template:Test
Left, Right, and Center text on same line
It needs to work when the page is resized.
http://stackoverflow.com/questions/525961/css-same-line-aligning
[[Lab #2] Back to Lab #2 |
{{#ifexist: Lab #4 | [[Lab #4 | Forward to Lab #4]] }} |
Experiment with variablized links
Here is the result of an inserted [ eclipse plugin].
Experiment with tight table rows
Old
Data | ||
Store data in a powerful "database on steroids". |
New
Data | |||||||||||
|
Tight Table Rows
Looking for the magical formula to create rows with no space between them.
- The 4 padding/margin values = top, right, bottom, left
- Some browsers respond to margin, others to padding, so both need to be specified
- Applied to the table, they determine where the borders appear within a larger "box".
- To apply to individual cells, the border properties need to be specified on each cell
- The CSS rule below does that.
It applies only to <td>elements in tables that specify class="tight-rows":
table.tight-rows td { padding:0 5px 0 5px; margin:0 5px 0 5px; }
stuff stuff more more
Horizontal and Vertical Bars
LJ Horizontal ruler:
ATT Ruler:
CSS-styled Ruler:
Normal Ruler:
stuff
foo
barAnd more stuff:
Link Tests
Test a link to an embedded internal anchor: #end
Test a link that transcludes the host URL from Template:DOCHOST.
Add Line Numbers to Source Code Listings
But make it possible to copy the source code without the line numbers...
<pre> </pre> |
line 1 of code
line 2 of code
line 3 of code
{{{1}}}
|
The trick, obviously, is to find the CSS that GeSHI uses, and to figure out a way to automate the numbering. (Both tough, but the latter is the hardest.)
This template adds line-numbers to code listings, while making it possible to copy the code without the numbers.
TODO: IN CodeJS, ESCAPE ALL <'s (replace with <)
- Usage
{{Code | {language} | code line 1 code line 2 etc. }}
where:
- {language} = java, html, xml
How it works:
- Create an array called lines, where \n is the delimiter
- Create a table with 2 cells
- Generate numbers, one per line, in first cell (output "i", then increment it)
- Put code in second cell, where it can be copied
<a name="end"/>