The splash/text element can be used to apply a particular style to a
piece of content text. If no style is specified then the default
style is used (which may do nothing). In addition to font face, size,
colour and boldness, you can also specify a 'link' value to convert it
to a hyperlink.
Source #1:
[% INCLUDE splash/text
content = "Hello World"
%]
|
HTML Output #1:
<font color="#000000">Hello World</font>
|
Output #1:
|
|
Source #2:
[% # set default font face
splash.style.default.font.face = 'Helvetica, Arial, Sans-Serif'
%]
[% WRAPPER splash/text %]
The Meaning of it All
[% END %]
|
HTML Output #2:
<font face="Helvetica, Arial, Sans-Serif" color="#000000">
The Meaning of it All
</font>
|
Output #2:
|
|
Source #3:
[% # reset default font
splash.style.default.font.face = ''
%]
[% # set other options directly
INCLUDE splash/text
content = "Hello World"
col = 'blood'
link = 'http://www.tt2.org/'
bold = 1
%]
|
HTML Output #3:
<a href="http://www.tt2.org/"><font color="#800000"><b>Hello
World</b></font></a>
|
Output #3:
|
|
Source #4:
[%# build a blue background to show up the white text %]
<table border=0 bgcolor="[% splash.rgb.marine %]" cellpadding=8>
<tr>
<td>
[% # use inbuilt "select" style
INCLUDE splash/text
content = 'Six Easy Pieces'
style = splash.style.select
-%]
</td>
</tr>
</table>
|
HTML Output #4:
<table border=0 bgcolor="#0066cc" cellpadding=8>
<tr>
<td>
<font color="#ffffff"><b>Six Easy Pieces</b></font>
</td>
</tr>
</table>
|
Output #4:
|
|
Source #5:
[% # create custom style
bigred = {
font = {
face = 'Helvetica, Arial, Sans-Serif'
size = '+1'
bold = 1
}
col = {
text = 'blood'
}
}
%]
[% WRAPPER splash/text style=bigred %]
Surely You're Joking?
[% END %]
|
HTML Output #5:
<font size="+1" face="Helvetica, Arial, Sans-Serif" color="#800000"><b>
Surely You're Joking?
</b></font>
|
Output #5:
|