+
+ {{.NumDirs}} director{{if eq 1 .NumDirs}}y{{else}}ies{{end}}
+ {{.NumFiles}} file{{if ne 1 .NumFiles}}s{{end}}
+ {{- if ne 0 .Limit}}
+ (of which only {{.Limit}} are displayed)
+ {{- end}}
+
+
+
+
+
+
+
+
+ {{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}}
+
+ {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}}
+
+ {{- else}}
+
+ {{- end}}
+
+ {{- if and (eq .Sort "name") (ne .Order "desc")}}
+ Name
+ {{- else if and (eq .Sort "name") (ne .Order "asc")}}
+ Name
+ {{- else}}
+ Name
+ {{- end}}
+
+
+ {{- if and (eq .Sort "size") (ne .Order "desc")}}
+ Size
+ {{- else if and (eq .Sort "size") (ne .Order "asc")}}
+ Size
+ {{- else}}
+ Size
+ {{- end}}
+
+
+ {{- if and (eq .Sort "time") (ne .Order "desc")}}
+ Modified
+ {{- else if and (eq .Sort "time") (ne .Order "asc")}}
+ Modified
+ {{- else}}
+ Modified
+ {{- end}}
+
+
+
+
+
diff --git a/host/layer/public-webserver/dotfiles-setup.d.fish b/host/layer/public-webserver/dotfiles-setup.d.fish
index 0be7c2a..1b79105 100644
--- a/host/layer/public-webserver/dotfiles-setup.d.fish
+++ b/host/layer/public-webserver/dotfiles-setup.d.fish
@@ -6,12 +6,13 @@ set homedir $argv[2]
set xdgconfdir $argv[3]
set layerdir (pwd)
-function _ln
+function _p
set source $argv[1]
set dest $argv[2]
- sudo rm -f "$dest"
+ sudo rm -rf "$dest"
echo "Copying $source to $dest"
- sudo ln -s "$source" "$dest"
+ sudo cp -r "$source" "$dest"
end
-_ln $layerdir/Caddyfile /etc/caddy/Caddyfile
+_p $layerdir/caddy /etc/caddy
+_p $layerdir/webserver-root /srv/http
diff --git a/host/layer/public-webserver/webserver-root/index.html b/host/layer/public-webserver/webserver-root/index.html
new file mode 100644
index 0000000..e7efd73
--- /dev/null
+++ b/host/layer/public-webserver/webserver-root/index.html
@@ -0,0 +1,6 @@
+
+ Public Web lyte.dev Machine
+
+
+ Public Files
+
\ No newline at end of file
diff --git a/host/layer/public-webserver/webserver-root/public-files/.gitignore b/host/layer/public-webserver/webserver-root/public-files/.gitignore
new file mode 100644
index 0000000..3aac695
--- /dev/null
+++ b/host/layer/public-webserver/webserver-root/public-files/.gitignore
@@ -0,0 +1,3 @@
+*
+.*
+!.gitignore
From 8b5b43c5e9b6487883ad6f8a62882bff55601e3e Mon Sep 17 00:00:00 2001
From: Daniel Flanagan
Date: Thu, 29 Sep 2022 19:35:10 -0500
Subject: [PATCH 3/3] Simplify
---
.../caddy/browse_template.html | 147 ++++--------------
1 file changed, 26 insertions(+), 121 deletions(-)
diff --git a/host/layer/public-webserver/caddy/browse_template.html b/host/layer/public-webserver/caddy/browse_template.html
index c07ea60..440269d 100644
--- a/host/layer/public-webserver/caddy/browse_template.html
+++ b/host/layer/public-webserver/caddy/browse_template.html
@@ -7,121 +7,58 @@
-
-
-
+
{{range $i, $crumb := .Breadcrumbs}}{{html $crumb.Text}}{{if ne $i 0}}/{{end}}{{end}}
+
+ {{.NumDirs}} director{{if eq 1 .NumDirs}}y{{else}}ies{{end}}
+ {{.NumFiles}} file{{if ne 1 .NumFiles}}s{{end}}
+ {{- if ne 0 .Limit}}
+ (of which only {{.Limit}} are displayed)
+ {{- end}}
+
-
-
-
- {{.NumDirs}} director{{if eq 1 .NumDirs}}y{{else}}ies{{end}}
- {{.NumFiles}} file{{if ne 1 .NumFiles}}s{{end}}
- {{- if ne 0 .Limit}}
- (of which only {{.Limit}} are displayed)
- {{- end}}
-
-
-
- {{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}}
-
- {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}}
-
- {{- else}}
-
- {{- end}}
-
- {{- if and (eq .Sort "name") (ne .Order "desc")}}
- Name
- {{- else if and (eq .Sort "name") (ne .Order "asc")}}
- Name
- {{- else}}
- Name
- {{- end}}
+ Name
- {{- if and (eq .Sort "size") (ne .Order "desc")}}
- Size
- {{- else if and (eq .Sort "size") (ne .Order "asc")}}
- Size
- {{- else}}
- Size
- {{- end}}
+ Size
- {{- if and (eq .Sort "time") (ne .Order "desc")}}
- Modified
- {{- else if and (eq .Sort "time") (ne .Order "asc")}}
- Modified
- {{- else}}
- Modified
- {{- end}}
+ Modified