I’m trying to use a frame_card, to create a dynamic header with a text and an icon. But the text appears and the icon doesn’t appear. I have a folder in the project named Static with a subfolder named Images where the png file is located
My code is:
import os
from h2o_wave import app, Q, ui, main
example_dir = os.path.dirname(os.path.realpath(file))
_local_path = ‘c:\temp\teste\’
_app_host = ‘127.0.0.1’
_app_port = ‘10102’
HTMLheader = ‘’’
Utopia 2.0
‘’’
async def showpage(q: Q):
q.page[‘meta’] = ui.meta_card(box=’’, layouts=[
ui.layout(
breakpoint=‘m’,
zones=[
ui.zone(‘header’),
]
)
])
q.page['header'] = ui.frame_card(
box='header',
title='',
content=HTMLheader,
)
await q.page.save()
@app(’/UTopIA20’)
async def serve(q: Q):
if not q.client.initialized:
q.client.initialized = True
await showpage(q)
#route = q.args['#']
#if not route:
# route = 'header'
#await show_example(q)
print(’----------------------------------------’)
print(’ Welcome to UTopIA20’)
print(’’)
print(’ Go to http://localhost:10101/UTopIA20’)
print(’----------------------------------------’)