Add support for new Bulma 'navbar' menu for bobcat theme
unfortunately the /menu.mako can't be shared (yet?) so apps must maintain a separate one if they wish to support this new theme. also, now when changing app theme we totally clear the lookup object's template cache. this was necessary for sake of /menu.mako but seems to be 'safe' so far
This commit is contained in:
parent
0ba1d65b11
commit
a76a7dd54c
|
@ -103,13 +103,12 @@
|
||||||
* tweaks for root user
|
* tweaks for root user
|
||||||
******************************/
|
******************************/
|
||||||
|
|
||||||
.menubar .root-user .ui-button-text,
|
.navbar .navbar-end .navbar-link.root-user,
|
||||||
.menubar .root-user.ui-menu-item a {
|
.navbar .navbar-end .navbar-link.root-user:hover,
|
||||||
|
.navbar .navbar-end .navbar-link.root-user.is_active,
|
||||||
|
.navbar .navbar-end .navbar-item.root-user,
|
||||||
|
.navbar .navbar-end .navbar-item.root-user:hover,
|
||||||
|
.navbar .navbar-end .navbar-item.root-user.is_active {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: black;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menubar .root-user.ui-menu-item a {
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
|
@ -22,10 +22,11 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
|
||||||
<ul class="menubar">
|
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||||
|
<div class="navbar-menu">
|
||||||
${main_menu_items()}
|
${main_menu_items()}
|
||||||
</ul>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
|
|
|
@ -140,8 +140,8 @@ def set_app_theme(request, theme, session=None):
|
||||||
# overwrite first entry in lookup's directory list
|
# overwrite first entry in lookup's directory list
|
||||||
lookup.directories[0] = theme_path
|
lookup.directories[0] = theme_path
|
||||||
|
|
||||||
# remove base template from lookup cache, so it will reload from new theme path
|
# clear template cache for lookup object, so it will reload each (as needed)
|
||||||
lookup._collection.pop('/base.mako', None)
|
lookup._collection.clear()
|
||||||
|
|
||||||
api.save_setting(session, 'tailbone.theme', theme)
|
api.save_setting(session, 'tailbone.theme', theme)
|
||||||
request.registry.settings['tailbone.theme'] = theme
|
request.registry.settings['tailbone.theme'] = theme
|
||||||
|
|
Loading…
Reference in a new issue