diff --git a/panel/template/base.py b/panel/template/base.py index 520623f59d..249085fdae 100644 --- a/panel/template/base.py +++ b/panel/template/base.py @@ -655,6 +655,9 @@ class BasicTemplate(BaseTemplate): header_color = param.String(doc=""" Optional header text color override.""") + header_height = param.String(default="64px", doc=""" + Optional header height override.""") + location = param.Boolean(default=True, readonly=True) _actions = param.ClassSelector(default=TemplateActions(), class_=TemplateActions) @@ -772,6 +775,7 @@ def _update_vars(self, *args) -> None: self._render_variables['app_favicon'] = favicon self._render_variables['app_favicon_type'] = self._get_favicon_type(self.favicon) self._render_variables['header_background'] = self.header_background + self._render_variables['header_height'] = self.header_height self._render_variables['header_color'] = self.header_color self._render_variables['main_max_width'] = self.main_max_width self._render_variables['sidebar_width'] = self.sidebar_width diff --git a/panel/template/fast/list/fast_list_template.html b/panel/template/fast/list/fast_list_template.html index 20bf109031..ba1a246d33 100644 --- a/panel/template/fast/list/fast_list_template.html +++ b/panel/template/fast/list/fast_list_template.html @@ -40,6 +40,13 @@ background-color: var(--background-color); font-family: var(--body-font); } + #header { + {% if header_height.startswith('0') %} + display: none; + {% else %} + height: {{ header_height }}; + {% endif %} + } #header a { color: currentColor; } @@ -87,7 +94,7 @@
-