diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-02-26 19:54:48 +0100 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-18 16:30:36 +0200 |
commit | c8e1328164e9ffbd681c3c0e449f1e6b9856b896 (patch) | |
tree | faee639a4c55c5dc3bfc59a5400026822c40221d /templates | |
download | lens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.tar.gz lens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.tar.bz2 lens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.zip |
feat: Inicial commit
It contains rough template for the server and runners.
It contains rough template for the server and runners.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/error.html | 5 | ||||
-rw-r--r-- | templates/fs.html | 29 | ||||
-rw-r--r-- | templates/layout.html | 29 | ||||
-rw-r--r-- | templates/login.html | 24 | ||||
-rw-r--r-- | templates/media.html | 18 | ||||
-rw-r--r-- | templates/settings.html | 25 |
6 files changed, 130 insertions, 0 deletions
diff --git a/templates/error.html b/templates/error.html new file mode 100644 index 0000000..cbde400 --- /dev/null +++ b/templates/error.html @@ -0,0 +1,5 @@ +{{template "layout.html" .}} +{{define "title"}} Not Found {{end}} +{{define "content"}} +{{.}} +{{end}} diff --git a/templates/fs.html b/templates/fs.html new file mode 100644 index 0000000..608289d --- /dev/null +++ b/templates/fs.html @@ -0,0 +1,29 @@ +{{template "layout.html" .}} +{{define "title"}} {{.Title}} {{end}} +{{define "content"}} +<div class="panel"> + <div class="panel-block"> + <div class="columns file-row is-gapless is-mobile"> + <div id="path" class="container-fluid"> + <small>{{range .Data.Page.History}}<a href="/fs?path={{.UrlEncodedPath}}" >{{.Name}}/</a>{{end}}</small> + </div> + </div> + </div> + {{range .Data.Page.Files}} + <div class="panel-block"> + <div class="columns file-row is-gapless is-mobile"> + <div class="column"> + {{if $.Data.ShowMode}}{{.Info.Mode}} {{end}} + {{if $.Data.ShowOwner}}{{.Info.Sys.Gid}}:{{.Info.Sys.Uid}} {{end}} + {{if .Info.IsDir}} + <a href="/?path={{.UrlEncodedPath}}">{{.Info.Name}}/</a> + {{else}} + {{.Info.Name}} + {{end}} + </div> + <div class="column has-text-right">{{.Info.Size}} B</div> + </div> + </div> + {{end}} +</div> +{{end}} diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..56d02f8 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>img | {{block "title" .}} noop {{end}}</title> + <link rel="stylesheet" href="/static/main.css"> + <link rel="icon" href="static/square.svg" sizes="any" type="image/svg+xml"> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + </head> + <body> + <nav class="navbar"> + <div class="navbar-start"> + <a href="/fs" class="navbar-item"> + files + </a> + <a href="/media" class="navbar-item"> + media + </a> + <a href="/settings" class="navbar-item"> + settings + </a> + </div> + </nav> + <div class="container is-max-desktop"> + {{block "content" .}}noop{{end}} + </div> + </body> + {{block "script" .}}{{end}} +</html> diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..f71d9d3 --- /dev/null +++ b/templates/login.html @@ -0,0 +1,24 @@ +{{template "layout.html" .}} +{{define "title"}} Register {{end}} +{{define "content"}} +<form action="/login" method="post"> + <div class="field"> + <label class="label">Username</label> + <div class="control"> + <input class="input" name="username" type="text"> + </div> + </div> + <div class="field"> + <label class="label">Password</label> + <div class="control"> + <input class="input" name="password" type="password"> + </div> + </div> + <div class="field"> + <a href="#" class="is-pulled-left">forgot password?</a> + </div> + <div class="field"> + <input class="button is-pulled-right" value="login" type="submit"> + </div> +</form> +{{end}} diff --git a/templates/media.html b/templates/media.html new file mode 100644 index 0000000..478d8ae --- /dev/null +++ b/templates/media.html @@ -0,0 +1,18 @@ +{{template "layout.html" .}} +{{define "title"}} {{.Title}} {{end}} +{{define "content"}} +<div class="columns is-multiline"> +{{range .Data.Medias}} +<div class="card"> + <div class="card-image"> + <figure class="image is-fit"> + <img src="/media/image?path_hash={{.PathHash}}"> + </figure> + </div> +</div> +{{end}} +</div> +<div class="row"> + <a href="/media?page={{.Data.Next.Page}}" class="button is-pulled-right">next</a> +</div> +{{end}} diff --git a/templates/settings.html b/templates/settings.html new file mode 100644 index 0000000..f8423fc --- /dev/null +++ b/templates/settings.html @@ -0,0 +1,25 @@ +{{template "layout.html" .}} +{{define "title"}} {{.Title}} {{end}} +{{define "content"}} +<form action="/settings/", method="post"> + <div class="field"> + <div class="control"> + <label class="checkbox"> + <input type="checkbox" id="showMode" name="showMode" {{if .Data.ShowMode}}checked{{end}}> + Show File Modes + </label> + </div> + </div> + <div class="field"> + <div class="control"> + <label class="checkbox"> + <input type="checkbox" id="showOwner" name="showOwner" {{if .Data.ShowOwner}}checked{{end}}> + Show File Owner + </label> + </div> + </div> + <div class="field"> + <input class="button" value="save" type="submit"> + </div> +</form> +{{end}} |