Notebook

/views/vnotebook/Notebook.html (789 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% import (
"{{{ .Package }}}/app"
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/views/components"
"{{{ .Package }}}/views/layout"
) %}

{% code type Notebook struct {
layout.Basic
BaseURL string
Path string
} %}

{% func (p *Notebook) Body(as *app.State, ps *cutil.PageState) %}
<style>
html {
height: 100%;
}
body {
min-height: 100%;
}
.iframe-container {
height: calc(100vh - var(--nav-height));
}
.iframe {
width: 100%;
height: calc(100% - 4px);
border: 0;
}
</style>
<div class="iframe-container">
<h3 style="display: none;">{%= components.SVGRefIcon(`notebook`, ps) %}Notebook</h3>
<iframe class="iframe" src="{%s p.BaseURL %}/{%s p.Path %}"></iframe>
</div>
{% endfunc %}