Skip to content

Commit

Permalink
MaterialTemplate header bar fixes (#1645)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Oct 18, 2020
1 parent 39c2e1d commit 5a1a8ed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
13 changes: 10 additions & 3 deletions panel/template/material/material.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@ body {
}

.mdc-top-app-bar__title {
display: flex;
display: contents;
padding-left: 10px;
font-size: 1.5em;
}

.title-bar {
display: contents;
justify-content: center;
align-content: center;
width: 100%;
}

img.app-logo {
padding-right: 10px;
}

.main-content {
height: 100%;
margin-left: 20px;
margin-right: 20px;
margin-left: 10px;
margin-right: 10px;
}

#header {
Expand Down
26 changes: 14 additions & 12 deletions panel/template/material/material.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
{% if nav %}
<button class="material-icons mdc-top-app-bar__navigation-icon mdc-icon-button">menu</button>
{% endif %}
<span class="mdc-top-app-bar__title">
{% if app_logo %}
<img src="{{ app_logo }}" height="30" class="app-logo"></img>
<div class="title-bar">
<span class="mdc-top-app-bar__title">
{% if app_logo %}
<img src="{{ app_logo }}" height="30" class="app-logo"></img>
{% endif %}
{{ app_title }}
</span>
{% for doc in docs %}
{% for root in doc.roots %}
{% if "header" in root.tags %}
{{ embed(root) | indent(8) }}
{% endif %}
{{ app_title }}
</span>
{% for doc in docs %}
{% for root in doc.roots %}
{% if "header" in root.tags %}
{{ embed(root) | indent(8) }}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</section>
{% if busy %}
<div class="pn-busy-container">
Expand Down

0 comments on commit 5a1a8ed

Please sign in to comment.