The [tabbed] function itself claims control of the Bootstrap navigation bar at the top of the screen. You're free to create additional navigation bars within the main content of tabs.

On 12/23/2015 09:12 AM, emil brusic wrote:
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 <[email protected] <mailto:[email protected]>> 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


_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to