Skip to content

Commit

Permalink
Fix issues with GoldenTemplate (#1661)
Browse files Browse the repository at this point in the history
* Fix issues with GoldenTemplate

* Do not allow closing sidebar

* Disable popout icons
  • Loading branch information
philippjfr authored Oct 20, 2020
1 parent 86fd8f1 commit a76fada
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 14 additions & 1 deletion panel/template/golden/golden.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ body {

.main-content {
height: 100%;
overflow: auto;
}

#header {
position: absolute;
height: 64px;
z-index: 7;
background-color: black;
width: 100%;
width: 100vw;
color: white;
display: flex;
align-items: center;
Expand All @@ -34,6 +35,10 @@ body {
color: white;
}

.header-contents {
overflow: hidden;
}

.app-header {
display: flex;
}
Expand All @@ -53,6 +58,7 @@ img.app-logo {
font: 1.5em Arial, sans-serif;
color: white;
text-align: center;
white-space: nowrap;
}

p.bk.golden-card-button {
Expand All @@ -76,6 +82,13 @@ p.bk.golden-card-button {
padding-right: 2px !important;
}

.lm_content {
overflow-y: scroll !important;
}

.lm_goldenlayout {
overflow: auto;
}

.pn-modal {
overflow-y: scroll;
Expand Down
10 changes: 7 additions & 3 deletions panel/template/golden/golden.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{% endif %}
<span class="header-title">{{ app_title }}</span>
</div>
<section>
<section class="header-contents">
{% for doc in docs %}
{% for root in doc.roots %}
{% if "header" in root.tags %}
Expand Down Expand Up @@ -74,7 +74,8 @@
title: "Sidebar",
model: '{% for doc in docs %}{% for root in doc.roots %}{% if "nav" in root.tags %} {{ embed(root) }} {% endif %}{% endfor %}{% endfor %}'
},
width: 20
width: 20,
isClosable: false
},
{
type: 'stack',
Expand All @@ -98,7 +99,10 @@
}
]
}
]
],
settings: {
showPopoutIcon: false
}
};

var myLayout = new GoldenLayout(config, $('#main-content'));
Expand Down

0 comments on commit a76fada

Please sign in to comment.