Share My Creation [UOENow] Create beautiful Bootstrap 4 Websites with Now UI Kit+BANano

Download

Hi there

UOENow is a wrap of the beautiful theme from Creative Tim to create Bootstrap 4 websites. UONow wraps the Now UI kit around BANano for one to create beautiful things with this theme.

The attached video is the generation of the theme directly from Creative Tim, done to ensure that everything works the same.


You can view the Creative Tim Now UI Kit here, https://www.creative-tim.com/product/now-ui-kit

The download is a an uncompiled lib that you can run and it will open up the example page to generate the page. The code has been simplified as much as possible and one can use BANano methods to set/get elements, styles etc.

 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
How can I use event?
Cool. When you create the elements, you can give them an id and the use the normal banano events for example.
B4X:
BANano.GetElement("#button1").On("click", Me, "operatex")

This adding of events to elements SHOULD be done after the Page.Create call as Page.Create injects the html elements to the body element.

Then you can add the sub for the event like...

B4X:
Sub operatex(e as bananoevent)
do xys
End Sub
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User


So I wanted to add some badges to my icons and also add a dropdown avatar.

B4X:
'add avatar
    Dim avatar As UOENowNavItemAvatar
    avatar.Initialize(App,"avatar","./assets/sponge.png","Anele Mbanga","","")
    avatar.AddAnchor("","My Profile","#","","")
    avatar.AddAnchor("","My Inbox","#","","")
    avatar.AddAnchor("","Timeline","#","","")
    avatar.AddAnchor("","Chats","#","","")
    avatar.AddDivider
    avatar.AddAnchor("","Logout","#","","")
    Page.NavBar.AddDropDownAvatar(avatar)

To add the badges, depending on whether there is an icon or not in an anchor, themeable badges using the current UOENowBadge was rather nice.

Also the avatar image can be changed. Below are some examples to set the badge numbers with themes and also with the avatar ability to change the border color to the theme you need. Setting the badges is ONLY possible after Page.Create.

B4X:
'set twitter feeds number
    Page.SetBadge("twitter","10",App.EnumThemes.Primary)
    Page.SetBadge("facebook","3",App.EnumThemes.Success)   
    Page.SetBadge("instagram","5",App.EnumThemes.Warning)
    'set the border color for avatar
    Page.SetAvatarTheme("avatar", App.EnumThemes.Warning)
    'update the image
    Page.SetAvatarImage("avatar", "./assets/default-avatar.png")
 

joulongleu

Active Member
Licensed User
Longtime User
Thank you so much, I have solved the problem that has been confused, and UOEBANanoDemo.zip seems to have not been updated, I am looking forward to updating.
 

Mashiane

Expert
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…