files compiles ok
parent
464ea7bf51
commit
931c3bdda8
|
|
@ -5,11 +5,10 @@
|
||||||
<title>{{ .This.Title }}</title>
|
<title>{{ .This.Title }}</title>
|
||||||
{{ template "_import" }}
|
{{ template "_import" }}
|
||||||
</header>
|
</header>
|
||||||
<body class="lr_fullscreen tb_fullscreen" onload="init(); return false;">
|
<body class="fullscreen tb_fullscreen lr_fullscreen" style="position: absolute">
|
||||||
<br>
|
<div class="rows" style="height: inherit;">
|
||||||
<div class="rows">
|
|
||||||
{{ template "_searchbar" }}
|
{{ template "_searchbar" }}
|
||||||
<div class="columns thic_flex tb_buffer">
|
<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;">
|
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
||||||
{{ template "_editor" . }}
|
{{ template "_editor" . }}
|
||||||
|
|
|
||||||
|
|
@ -119,11 +119,17 @@ newlines
|
||||||
tmpl := t(p)
|
tmpl := t(p)
|
||||||
defer log.Printf("rendering %s (...%s) as %s", templateToExecute, path.Join(path.Base(path.Dir(p)), path.Base(p)), target)
|
defer log.Printf("rendering %s (...%s) as %s", templateToExecute, path.Join(path.Base(path.Dir(p)), path.Base(p)), target)
|
||||||
if strings.HasPrefix(templateToExecute, "_") {
|
if strings.HasPrefix(templateToExecute, "_") {
|
||||||
testTemplate := `{{ define "test" }}`
|
testTemplate := `
|
||||||
|
{{ define "test" }}
|
||||||
|
<body class="fullscreen" style="border: 10px solid red;">
|
||||||
|
`
|
||||||
for _, subtemplate := range always {
|
for _, subtemplate := range always {
|
||||||
testTemplate += fmt.Sprintf(`{{ template %q . }}`, subtemplate)
|
testTemplate += fmt.Sprintf(`{{ template %q . }}`, subtemplate)
|
||||||
}
|
}
|
||||||
testTemplate += fmt.Sprintf(`{{ template %q . }}{{ end }}`, templateToExecute)
|
testTemplate += fmt.Sprintf(`{{ template %q . }}{{ end }}`, templateToExecute)
|
||||||
|
testTemplate += `
|
||||||
|
</body>
|
||||||
|
`
|
||||||
tmpl = template.Must(tmpl.Parse(testTemplate))
|
tmpl = template.Must(tmpl.Parse(testTemplate))
|
||||||
templateToExecute = "test"
|
templateToExecute = "test"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,8 @@
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
#article {
|
#article {
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
padding: 5px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: scroll;
|
|
||||||
}
|
}
|
||||||
#titlepath, #title {
|
#titlepath, #title {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
|
@ -69,33 +62,35 @@
|
||||||
}, body, headers)
|
}, body, headers)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<article id="article">
|
<div class="fullscreen tb_fullscreen">
|
||||||
<div class="columns">
|
<article id="article">
|
||||||
<span class="r_buffer">
|
<div class="columns">
|
||||||
<form action="#" onsubmit="pushFile(); return false;"> <!-- TODO -->
|
<span class="r_buffer">
|
||||||
<input class="button-info lil_btn" type="submit" value="SAVE"/>
|
<form action="#" onsubmit="pushFile(); return false;"> <!-- TODO -->
|
||||||
</form>
|
<input class="button-info lil_btn" type="submit" value="SAVE"/>
|
||||||
</span>
|
</form>
|
||||||
<span id="titlePath">
|
</span>
|
||||||
/
|
<span id="titlePath">
|
||||||
{{ if ne .This.PID "" }}
|
/
|
||||||
<a href="/ui/files/{{ .This.PID }}">{{ .This.PTitle }}</a> /
|
{{ if ne .This.PID "" }}
|
||||||
{{ end }}
|
<a href="/ui/files/{{ .This.PID }}">{{ .This.PTitle }}</a> /
|
||||||
</span>
|
{{ end }}
|
||||||
<span id="title" class="thic_flex" contenteditable>{{ .This.Title }}</span>
|
</span>
|
||||||
<span class="l_buffer">
|
<span id="title" class="thic_flex" contenteditable>{{ .This.Title }}</span>
|
||||||
<form action="" method="delete" onsubmit="return confirm('are you sure?');"> <!-- TODO -->
|
<span class="l_buffer">
|
||||||
<input class="button-error lil_btn" type="submit" value="DELETE"/>
|
<form action="" method="delete" onsubmit="return confirm('are you sure?');"> <!-- TODO -->
|
||||||
</form>
|
<input class="button-error lil_btn" type="submit" value="DELETE"/>
|
||||||
</span>
|
</form>
|
||||||
</div>
|
</span>
|
||||||
<!-- todo: each line no is an anchor -->
|
</div>
|
||||||
<div id="easyMDEwrap" class="monospace">
|
<!-- todo: each line no is an anchor -->
|
||||||
<textarea id="my-text-area"></textarea>
|
<div id="easyMDEwrap" class="monospace">
|
||||||
</div>
|
<textarea id="my-text-area"></textarea>
|
||||||
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
</div>
|
||||||
</div>
|
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
||||||
</article>
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
const easyMDE = new EasyMDE({
|
const easyMDE = new EasyMDE({
|
||||||
autoDownloadFontAwesome: true,
|
autoDownloadFontAwesome: true,
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,10 @@
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<details open id="filetree">
|
<div class="fullscreen tb_fullscreen">
|
||||||
</details>
|
<details open id="filetree">
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function drawTree(tree) {
|
function drawTree(tree) {
|
||||||
document.getElementById("filetree").innerHTML = branchHTML("", tree)
|
document.getElementById("filetree").innerHTML = branchHTML("", tree)
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,6 @@
|
||||||
html, body {
|
html, body {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
.lr_fullscreen {
|
|
||||||
width: 90%;
|
|
||||||
max-width: 1024px;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
.tb_fullscreen {
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
.columns {
|
.columns {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
@ -65,6 +56,24 @@
|
||||||
}
|
}
|
||||||
input, label, textarea {
|
input, label, textarea {
|
||||||
margin: initial;
|
margin: initial;
|
||||||
|
}
|
||||||
|
.fullscreen {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
.lr_fullscreen {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1024px;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.tb_fullscreen {
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue