Difference between revisions of "Template:Test"
imported>Aeric |
imported>Aeric |
||
Line 1: | Line 1: | ||
== Left, Right, and Center text on same line == | |||
It needs to work when the page is resized... | |||
1.<br> | |||
<div style="text-align: right;"> | |||
<div style="float: left;">Left text</div> | |||
Right text | |||
</div> | |||
2.<br> | |||
<div> | |||
<div style="text-align: right;"> | |||
<div style="float: left;">Left text</div> | |||
<div style="float: center;">Center text</div> | |||
Right text | |||
</div> | |||
3.<br> | |||
<table border="1" cellpadding=".3em" cellspacing="1.5em"> | |||
<tr> | |||
<td style="text-align:left; width:33%; "> | |||
[[Lab #2] Back to Lab #2 | |||
</td> | |||
<td cstyle="text-align:center; width:34%; "> | |||
[[...|Up to Lab Index]] | |||
</td> | |||
<td style=" text-align:right; width:33%; "> | |||
<nowiki>{{#ifexist: Lab #4 | [[Lab #4 | Forward to Lab #4]] }}</nowiki> | |||
</td> | |||
</tr> | |||
</table> | |||
==Experiment with variablized links== | ==Experiment with variablized links== | ||
Here is the result of an inserted [{{EclipsePluginLink}} eclipse plugin]. | Here is the result of an inserted [{{EclipsePluginLink}} eclipse plugin]. |
Revision as of 18:17, 29 August 2011
Left, Right, and Center text on same line
It needs to work when the page is resized...
1.
Right text
2.
Right text
3.
[[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"/>