liquid_feedback_frontend
annotate env/ui/title.lua @ 1706:2558d9c15c44
Show top MOTD only when no unit or area is selected
author | bsw |
---|---|
date | Mon Sep 27 11:03:28 2021 +0200 (2021-09-27) |
parents | 32cc544d5a5b |
children |
rev | line source |
---|---|
bsw@1045 | 1 function ui.title ( content ) |
bsw@1045 | 2 |
bsw@1045 | 3 slot.select ( "title", function () |
bsw@1045 | 4 |
bsw@1045 | 5 -- home link |
bsw@1045 | 6 ui.link { |
bsw@1045 | 7 module = "index", view = "index", |
bsw@1045 | 8 attr = { class = "home", title = _"Home" }, |
bsw@1045 | 9 content = function () |
bsw/jbe@1309 | 10 ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "home" } |
bsw@1045 | 11 end |
bsw@1045 | 12 } |
bsw@1045 | 13 |
bsw@1045 | 14 if content then |
bsw@1045 | 15 ui.tag { attr = { class = "spacer" }, content = function() |
bsw@1045 | 16 slot.put ( " ยป " ) |
bsw@1045 | 17 end } |
bsw/jbe@1309 | 18 ui.tag { content = content } |
bsw@1045 | 19 else |
bsw@1045 | 20 ui.tag { attr = { class = "spacer" }, content = function() |
bsw@1045 | 21 slot.put ( " " ) |
bsw@1045 | 22 end } |
bsw/jbe@1309 | 23 ui.tag { content = _"Home" } |
bsw@1045 | 24 end |
bsw@1045 | 25 |
bsw@1045 | 26 end ) |
bsw@1045 | 27 |
bsw@1045 | 28 end |