liquid_feedback_frontend

diff env/ui/title.lua @ 1045:701a5cf6b067

Imported LiquidFeedback Frontend 3.0 branch
author bsw
date Thu Jul 10 01:19:48 2014 +0200 (2014-07-10)
parents 418b590fa9ed
children 32cc544d5a5b
line diff
     1.1 --- a/env/ui/title.lua	Thu Jul 10 01:02:43 2014 +0200
     1.2 +++ b/env/ui/title.lua	Thu Jul 10 01:19:48 2014 +0200
     1.3 @@ -1,5 +1,31 @@
     1.4 -function ui.title(content)
     1.5 -  slot.select("head", function()
     1.6 -    ui.container{ attr = { class = "title" }, content = content }
     1.7 -  end)
     1.8 -end
     1.9 \ No newline at end of file
    1.10 +function ui.title ( content )
    1.11 +  
    1.12 +  slot.select ( "title", function ()
    1.13 +    
    1.14 +    -- home link
    1.15 +    ui.link {
    1.16 +      module = "index", view = "index",
    1.17 +      attr = { class = "home", title = _"Home" },
    1.18 +      content = function ()
    1.19 +        ui.image { 
    1.20 +          attr = { class = "icon24", alt = title },
    1.21 +          static = "icons/48/home.png"
    1.22 +        }
    1.23 +      end
    1.24 +    }
    1.25 +  
    1.26 +    if content then
    1.27 +      ui.tag { attr = { class = "spacer" }, content = function()
    1.28 +        slot.put ( " ยป " )
    1.29 +      end }
    1.30 +      ui.tag { tag = "span", content = content }
    1.31 +    else
    1.32 +      ui.tag { attr = { class = "spacer" }, content = function()
    1.33 +        slot.put ( " " )
    1.34 +      end }
    1.35 +      ui.tag { tag = "span", content = _"Home" }
    1.36 +    end
    1.37 +    
    1.38 +  end )
    1.39 +  
    1.40 +end

Impressum / About Us