templates!

master
Bel LaPointe 2022-02-14 08:50:48 -07:00
parent 7eb260bfcf
commit f0f6f2c842
5 changed files with 15 additions and 4 deletions

View File

@ -1,19 +1,21 @@
{{ define "files" }}
<!DOCTYPE html>
<html>
<header>
<title>{{ .Title }}</title>
{{ template "imports" . }}
{{ template "_import" . }}
</header>
<body class="lr_fullscreen tb_fullscreen" onload="init(); return false;">
<br>
<div class="rows">
{{ template "searchbar" . }}
{{ template "_searchbar" . }}
<div class="columns thic_flex tb_buffer">
{{ template "filetree" . }}
{{ template "_filetree" . }}
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
{{ template "editor" . }}
{{ template "_editor" . }}
</div>
</div>
</div>
</body>
</html>
{{ end }}

View File

@ -1,3 +1,4 @@
{{ define "_editor" }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css">
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
<style>
@ -201,3 +202,4 @@
status: ["lines", "words", "cursor"],
})
</script>
{{ end }}

View File

@ -1,6 +1,9 @@
{{ define "_filetree" }}
<div>
My file tree
<!-- TODO {{ .Branches }} -->
{{ range $key, $value := .Branches }}
<!-- TODO {{ $key }}{{ $value }} -->
{{ end }}
</div>
{{ end }}

View File

@ -1,3 +1,4 @@
{{ define "_import" }}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -13,3 +14,4 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/light.css">
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
-->
{{ end }}

View File

@ -1,4 +1,6 @@
{{ define "_searchbar" }}
<form class="columns" action="/ui/search" method="GET">
<input class="thic_flex" type="text" name="searchbox" placeholder="space delimited search regexp"/>
<input class="info lil_btn" type="submit" value="search"/>
</form>
{{ end }}