Webtags as boolean operators in HTML: Difference between revisions

m
Line 8: Line 8:
All the [[Webtags#Alarms]] are boolean. Suppose you had an image of a bell ringing and gave it the filename '''bell_1.png'''. If a second image with the name '''bell_0.png''' showed someone asleep, then the following HTML code would pick the appropriate image relating to whether the weather station was communicating with Cumulus.
All the [[Webtags#Alarms]] are boolean. Suppose you had an image of a bell ringing and gave it the filename '''bell_1.png'''. If a second image with the name '''bell_0.png''' showed someone asleep, then the following HTML code would pick the appropriate image relating to whether the weather station was communicating with Cumulus.
   <img src="bell_<#DataStopped>.png">
   <img src="bell_<#DataStopped>.png">
NOTE: Some versions of HTML would require slightly different syntax
NOTE: Some versions of HTML would require slightly different syntax (note space before slash)
   <img src="bell_<#DataStopped>.png" />
   <img src="bell_<#DataStopped>.png" />
but both will work in the latest HTML5.
but both will work in the latest HTML5.
== New extremes ==
== New extremes ==
An easy modification to [[Customised_templates | recordsT.htm]] is to add an image against each record that has just been updated with a new extreme. Again, you need two images perhaps looking like a light-emitting diode type indicator. In one image it would be off, in the other it would be coloured as if on. The next code extract uses two such pairs to place the right image beside the label, in this case grey for no new extreme, blue for a new minimum and red for a new maximum.
An easy modification to [[Customised_templates | recordsT.htm]] is to add an image against each record that has just been updated with a new extreme. Again, you need two images perhaps looking like a light-emitting diode type indicator. In one image it would be off, in the other it would be coloured as if on. The next code extract uses two such pairs to place the right image beside the label, in this case grey for no new extreme, blue for a new minimum and red for a new maximum.
5,838

edits