template readonly, make it plain html for fast
This commit is contained in:
@@ -3,20 +3,18 @@
|
||||
<html>
|
||||
<header>
|
||||
<title>{{ .This.Title }}</title>
|
||||
{{ template "_import" }}
|
||||
{{ template "_import" }}
|
||||
</header>
|
||||
<body class="fullscreen tb_fullscreen lr_fullscreen" style="position: absolute">
|
||||
<div class="rows" style="height: inherit;">
|
||||
{{ template "_searchbar" }}
|
||||
{{ template "_searchbar" }}
|
||||
<div class="columns thic_flex tb_buffer" style="height: calc(100% - 4rem);">
|
||||
{{ template "_filetree" . }}
|
||||
{{ template "_filetree" . }}
|
||||
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
||||
{{ if .This.ReadOnly }}
|
||||
<div id="readonly"></div>
|
||||
{{ .This.Content }}
|
||||
</script>
|
||||
{{ template "_readonly" . }}
|
||||
{{ else }}
|
||||
{{ template "_editor" . }}
|
||||
{{ template "_editor" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
9
server/public/ui/templates/'
Normal file
9
server/public/ui/templates/'
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ define "_readonly" }}
|
||||
<div class="fullscreen tb_fullscreen">
|
||||
<article id="article">
|
||||
</article>
|
||||
<script>
|
||||
document.getElementById("article").innerHTML = {{ .This.Content }}
|
||||
</script>
|
||||
</div>
|
||||
{{ end }}
|
||||
8
server/public/ui/templates/_readonly.ctmpl
Normal file
8
server/public/ui/templates/_readonly.ctmpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "_readonly" }}
|
||||
<div class="fullscreen tb_fullscreen">
|
||||
<article id="article"></article>
|
||||
<script>
|
||||
document.getElementById("article").innerHTML = {{ .This.Content }}
|
||||
</script>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user