File: button

package info (click to toggle)
libtemplate-perl 2.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 5,496 kB
  • ctags: 667
  • sloc: perl: 15,349; makefile: 62; xml: 7; sh: 5
file content (47 lines) | stat: -rw-r--r-- 1,639 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[%  # splash/button: a bar with rounded corners
    #
    #  ARGS: content, style
    # STYLE: col, bgcol, align, width
    #
    SET
        default = splash.style.default
    ;
    DEFAULT 
        style   = default
        col     = style.col.fore     or default.col.fore
        bgcol   = style.col.back     or default.col.back
        align   = style.button.align or default.button.align
    ;
    SET
        rgbcol  = splash.rgb.$col
        imgbase = "$splash.images/$bgcol"
        imgsize = splash.imgsize
        imgtype = splash.imgtype
    ;
-%]
<!-- tt2.splash.button -->  
<table bgcolor="[% rgbcol %]"[% IF width %] width="[% width %]"[% END %]
       border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="[% imgsize %]"><img
        src="[% imgbase %]/tl.[% imgtype %]"
        width="[% imgsize %]" height="[% imgsize %]" alt=""></td>
    <td rowspan="2" valign="middle"
        [%- IF align %] align="[% align %]"[% END %]
        [%- IF width %] width="100%"[% END %]>
        [%- content.length ? content : '&nbsp;' -%]</td>
    <td width="[% imgsize %]" align="right"><img 
        src="[% imgbase %]/tr.[% imgtype %]" 
        width="[% imgsize %]" height="[% imgsize %]" alt=""></td>
  </tr>
  <tr valign="bottom">
     <td width="[% imgsize %]" align="left"><img 
         src="[% imgbase %]/bl.[% imgtype %]" 
         width="[% imgsize %]" height="[% imgsize %]" alt=""></td>
     <td width="[% imgsize %]" align="right"><img 
         src="[% imgbase %]/br.[% imgtype %]" 
         width="[% imgsize %]" height="[% imgsize %]" alt=""></td>
  </tr>
</table>
<!-- /tt2.splash.button -->