Creating adp box tags for consistent html/css
Created by openacs community, last modified by Gustaf Neumann 26 Aug 2020, at 02:01 PM
Box tag code:
# The box tag is intended to make the markup around a "box"
# standard sitewide so that you can use the same css everywhere to
# style the site.
template_tag box { chunk params } {
set class [ns_set iget $params class]
if {[template::util::is_nil class]} {
set class box
}
set id [ns_set iget $params id]
if {![template::util::is_nil id]} {
set id " id=\\\"$id\\\""
}
template::adp_append_code "append __adp_output \"<div class=\\\"$class\\\"$id><div class=\\\"boxTop\\\"></div><div class=\\\"boxContent\\\">\""
template::adp_compile_chunk $chunk
template::adp_append_code "append __adp_output {</div><div class=\"boxBottom\"></div></div>}"
}