103 103

Updated: 29-11-2002; 3:57:38 PM.

myNotes

This is a yellow note box, I can write anything I like in it and it should scale reasonably well.
I'm playing a little with Radio macros. Straight out from the Going Even Crazyer With Macros tutorial I have made this little macro that lets me add small Post-It™ looking comments to my pages.

To include the yellow note on the right I inserted at the beginning of the first paragraph the following macro:

<%myNote("This is a yellow note box, I can write anything I like in it and it should scale reasonably well", "yellow", "left")%>

Another note, aligned to the right, with an ivory background. Notice how the shadow gracefully blend into the background color.
It's about as simple as it looks, the first parameter is the text inside the box, the second is the background color, the third is the alignement. Default values for color and alignement are ivory (as in this last note) and left.

The other detail I find interesting is that shadows are made using transparent png files, meaning that they will blend as they are supposed to do, whatever your background color is.

If you want to try to use these notes, you can download the macro here. You should also add a line of code to your template.txt that should be sitting in your www folder. Inside the <style type="text/css"> tag copy and paste this:

.notes { color: #000; font-size: 10px; line-height: 12px; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none }

Yet another one :-) You can add images if you like:

but you will have to remember to add backslashes before double quotes like this: \" otherwise you will get a macro error
If you won't it's not a big deal, the contents of your notes will simply be written using your default page font. You can add any kind of html code inside the tag, but remember to add a backslash before double quotes, otherwise you will get a Macro Error.

Enjoy,

Paolo

103

H O M E



Click here to send an email to the editor of this weblog.

Radio Tools
Stories
Weblogs:
Italians:
evectors:
readers:


banner_ita.jpg

banner_uk.jpg

banner_radiotools.gif

15 15
© Copyright 2002 Paolo Valdemarin.