Rev 8278 | Rev 8287 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3374 | bpr | 1 | !if $wims_read_parm!=slib_header |
2 | !goto proc |
||
3 | !endif |
||
3756 | bpr | 4 | |
8278 | bpr | 5 | slib_author=Olivier, Bado; Bernadette, Perrin-Riou |
6 | slib_wims_version=4.09a |
||
6833 | bpr | 7 | !exit |
3799 | bpr | 8 | |
3374 | bpr | 9 | :proc |
10 | slib_out= |
||
8277 | obado | 11 | |
8280 | bpr | 12 | !reset slib_text,slib_color,slib_width,slib_height,slib_option,bubbleOpts,slib_stylesheet,slib_tripos,slib_hw |
3756 | bpr | 13 | !distribute items $wims_read_parm into slib_text,slib_color,slib_width,slib_height,slib_option |
8277 | obado | 14 | |
15 | slib_width=$[$slib_width] |
||
16 | slib_height=$[$slib_height] |
||
17 | !if $slib_width>0 |
||
18 | slib_width=width:$(slib_width)px; |
||
19 | !else |
||
20 | !reset slib_width |
||
21 | !endif |
||
22 | !if $slib_height>0 |
||
23 | slib_height=height:$(slib_height)px; |
||
24 | !else |
||
25 | !reset slib_height |
||
26 | !endif |
||
8280 | bpr | 27 | !if $slib_width$slib_height!=$empty |
28 | slib_hw=style="$slib_width$slib_height" |
||
29 | !endif |
||
8277 | obado | 30 | |
3756 | bpr | 31 | !default slib_color=antiquewhite |
8277 | obado | 32 | slib_tripos=!getopt triangle in $slib_option |
33 | !default slib_tripos=btm-left |
||
34 | slib_num=!getopt number in $slib_option |
||
35 | !default slib_num=!randint 1,1000 |
||
3374 | bpr | 36 | slib_text=!declosing $slib_text |
37 | |||
8277 | obado | 38 | !if rectangle notwordof $slib_option |
39 | bubbleOpts=$bubbleOpts round |
||
40 | !if btm-right iswordof $slib_tripos |
||
41 | slib_tripos=btm-right-in |
||
42 | !endif |
||
43 | !endif |
||
3374 | bpr | 44 | |
8277 | obado | 45 | !if border iswordof $slib_option |
46 | bubbleOpts=$bubbleOpts border |
||
47 | !endif |
||
3374 | bpr | 48 | |
8277 | obado | 49 | !if noshadow notwordof $slib_option |
50 | bubbleOpts=$bubbleOpts shadow |
||
3374 | bpr | 51 | !endif |
52 | |||
8277 | obado | 53 | slib_stylesheet = <style type="text/css">\ |
54 | #bubble_$slib_num{background-color: $slib_color;}\ |
||
55 | #bubble_$slib_num.triangle:not(.btm-left):after{border-top-color: $slib_color;}\ |
||
56 | #bubble_$slib_num.triangle.left-in:after{ border-right-color: $slib_color;}\ |
||
57 | #bubble_$slib_num.triangle.btm-left:after{ border-left-color: $slib_color;}\ |
||
58 | #bubble_$slib_num.triangle.btm-left-in:after{ border-left-color: $slib_color;}\ |
||
59 | #bubble_$slib_num.triangle.btm-right-in:after{ border-right-color: $slib_color;}\ |
||
60 | #bubble_$slib_num.triangle.btm-right:after{ border-right-color: $slib_color;}\ |
||
61 | #bubble_$slib_num.triangle.right-in:after{ border-left-color: $slib_color;}\ |
||
62 | </style> |
||
63 | |||
64 | slib_out=$slib_stylesheet\ |
||
8280 | bpr | 65 | <div id="bubble_$slib_num" class="inline talk-bubble triangle $slib_tripos $bubbleOpts" $slib_hw>\ |
8277 | obado | 66 | <div class="talktext">\ |
67 | <p>$slib_text</p>\ |
||
68 | </div>\ |
||
69 | </div> |
||
70 | |||
71 | |||
72 |