[Ur] UPO framework - Ui.Make functor
emil brusic
emil.brusic at gmail.com
Wed Dec 23 09:12:47 EST 2015
Thanks Adam for your quick reply.
So, fun tabbed can not be use for anything but bootstrap navbar-nav.
On Wed, Dec 23, 2015 at 12:35 PM, emil brusic <emil.brusic at gmail.com> wrote:
> Greetings to all community!
>
> I have just started to learn about Ur/Web and UPO framework with Bootstrap.
> In upo/ui.ur, functor Make, there is function tabbed which is use for
> boostrap navbar:
> fun tabbed [ts] (fl : folder ts) titl (ts : $(map (fn a => option string
> * t a) ts)) = ...
> This is how I use it:
>
> fun main () =
> about <- aboutUs(lng);
> usr <- User.userIdNam();
> login <- User.blurb();
> Theme.tabbed titl
> ((Some (case lng of
> HR => "O nama"
> | EN => "About us")
> , Ui.const about)
> ,(case usr of
> None =>
> Some (case lng of
> HR => "Prijava"
> | EN => "Login")
> | Some u =>
> case lng of
> HR => Some ("Korisnik: " ^ u.Nam)
> | EN => Some ("User: " ^ u.Nam)
> , Ui.const login)
> (* this navbar-right is not showing in browser: *)
> ,(None
> , Ui.const (<xml>
> <ul class="bs3-nav navbar-nav navbar-right">
> <li><a link={lg()}><span class="glyphicon
> glyphicon-user"></span> Sign Up</a></li>
> <li><a link={lg()}><span class="glyphicon
> glyphicon-log-in"></span> Login</a></li>
> </ul>
> </xml>))
> )
> Everything pass type checking and compiling, but navbar-right menu entries
> with glyphicons are not shown.
> So I wrote new test function without using UPO framework:
> fun test () = ...
> ...
> <div id={nid} class="collapse navbar-collapse">
> ...
> <ul class="bs3-nav navbar-nav navbar-right">
> <li><a href={log}><span class="glyphicon
> glyphicon-user"></span> Sign Up</a></li>
> <li><a href={log}><span class="glyphicon
> glyphicon-log-in"></span> Login</a></li>
> </ul>
> </div>
> ...
> In this case navbar-right is shown.
> Probably I missed something with code:
> ,(None, Ui.const (<xml> ... </xml>))
> Also I have noticed that vertical collapse menu for mobile devices is not
> shown even in UPO site - http://upo.csail.mit.edu/
>
> I will be grateful if anyone help me to find out what is wrong with my
> code, or how to use tabbed function for
> navbar-right.
>
> Best regards,
> Emil
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20151223/e05f0dd0/attachment.html>
More information about the Ur
mailing list