-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add v.App to examples #56
Comments
In Vuetify this is done by setting the In Voila-vuetify the |
You can get around this by making sure the |
@nmearl I couldn't get it to work with the absolute property set to True. But I found another way to get what i wanted. Now working v nicely. app = v.App(v_model=None)
navDrawer = v.NavigationDrawer(v_model=True, children=[
v.Select(label='select1', items=[1,2,], prepend_icon = 'fa-truck'),
v.TextField(label='text', prepend_icon = 'mdi-heart'),
v.Select(label='select3', prepend_icon = 'mdi-magnify')
])
navDrawer.mini_variant = True
navDrawer.expand_on_hover = True
navDrawer.width =300
navDrawer.mini_variant_width = 30
toolBarButton = v.Btn(
icon = True,
children=[
v.Icon(children=['mdi-dots-vertical'])
])
def on_click(widget, event, data):
navDrawer.v_model = not navDrawer.v_model
if navDrawer.v_model:
navDrawer.mini_variant_width = 30
else:
navDrawer.mini_variant_width = 0
toolBarButton.on_event('click', on_click)
randomButton = v.Btn(
icon = False,
children=[
v.Icon(children=['mdi-heart']),
'Random Button...',
])
appBar = v.AppBar(
color="deep-purple accent-4",
dense=True,
dark = True ,
children = [
toolBarButton,
v.ToolbarTitle(children=['App example']),
])
content = v.Col(children = [randomButton,v.TextField(label='text', prepend_icon = 'mdi-heart'), ])
drawersWithContent = v.Container(
class_="fill-height",
# fluid=False,
children = [
v.Row(
align="top",
justify="left",
children = [navDrawer,content]
)
])
app.children = [appBar,drawersWithContent]
app |
Nice! So the trick is putting NavigationDrawer next to Content in a Row? |
@mariobuikhuizen Yes, putting the NavigationDrawer next to Content in a v.Row seems to do the trick. I will keep this issue open until there is an App ipynb example. I will work on it but I can't promise anything amazing .. relative to the full capabilities of Ipyvuetify . :-) |
Ah, I see what you were after. According to Vuetify, this is not the intended way the hover the navigation drawer works; temporarily expanded drawers are supposed to slide over content, not push it apparently. Glad you were able to find a way around that! |
@nmearl Ah. I think i might be confusing the types of drawers. I was originally trying to replicate the pre-made layouts. e.g. https://vuetifyjs.com/en/examples/layouts/baseline/. I wanted to replicate the behaviour.... where the buttons in the middle adjust to the navigation drawer (and centere justify on the remaining width of content area). But in this other example, https://vuetifyjs.com/en/examples/layouts/complex/ there are also temporary drawers that slide over the content. I think both drawer types are useful. |
Please add an example of an App with a navigation drawer and AppBar to the example.ipynb.
I have tried to put something together. See below. But its not quite right yet. I can't work out how to get the content of the app to move when the navigation drawer is activated. Do you know how to fix this?
The text was updated successfully, but these errors were encountered: