ADDED examples/mediaquery.tcl Index: examples/mediaquery.tcl ================================================================== --- /dev/null +++ examples/mediaquery.tcl @@ -0,0 +1,75 @@ +# This application demonstrates responsive CSS design principles using +# the media-query mechanism. To run this app: +# +# wapptclsh mediaquery.tcl --server 8080 +# +# Then connect various devices to see how their display changes according +# to the viewport size. Or resize the browser window. Or twist the +# handheld device between landscape and portrait modes. +# +# The foreground and background colors change according to the viewport size +# of the device. In a real application, the CSS would be extended to make +# other changes according to the viewport size. +# +source wapp.tcl +proc wapp-default {} { + wapp-content-security-policy {default_src 'self' 'unsafe-inline'} + set top [wapp-param SCRIPT_NAME] + wapp-trim { + + +
+ + + + +Viewport-size: +