# HG changeset patch # User jbe # Date 1340817078 -7200 # Node ID bfae497543a35eb9503ce2bc1a501af576c08469 # Parent ca3f7b001014eecfb7332f0151b43c9850f5bdcc Added ui.anchor{...} diff -r ca3f7b001014 -r bfae497543a3 framework/env/ui/anchor.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/framework/env/ui/anchor.lua Wed Jun 27 19:11:18 2012 +0200 @@ -0,0 +1,20 @@ +--[[-- +ui.anchor{ + name = name, -- name of anchor + attr = attr, -- table of HTML attributes + content = content -- string to be HTML encoded, or function to be executed +} + +This function writes an HTML anchor into the active slot. + +--]]-- + +function ui.anchor(args) + local attr = table.new(attr) + attr.name = args.name + return ui.tag{ + tag = "a", + attr = attr, + content = content + } +end