diff --git a/assets/css/site.css b/assets/css/site.css index cfc4cd0..0e8e5fb 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -876,6 +876,10 @@ details { background-color: #fff9f9; } +.svedit { + margin-left: 0.5rem; +} + @media (max-width: 767px) { html { box-sizing: border-box; diff --git a/assets/js/sandpoints.js b/assets/js/sandpoints.js index 14d9303..23188a9 100644 --- a/assets/js/sandpoints.js +++ b/assets/js/sandpoints.js @@ -63,7 +63,7 @@ function editPage(repoJsId) { } el.src = `${relPath}js/repo/${repoJsId}.js` document.body.appendChild(el) - document.location.href = `${relPath}svedit/index.html#${repoJsId}` + document.location.href = `${relPath}edit/index.html#${repoJsId}` ev} window.addEventListener("keyup", (e)=> { diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 62c1535..1aacf81 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,6 +6,9 @@ {{ $currentDir = .Dir }} {{ end }} {{ $currentFile := (printf "/%s" .File) }} + {{ $editFile := $.Site.GetPage "/edit" }} + {{ $editFilePath := $editFile.RelPermalink }} +
Dir: {{ .Name }}
- {{ partial "readdir.html" .Name }} - {{ else }} -File: {{ .Name }} - {{ end }} - {{ end }} +{{ define "main" }} {{ end }} diff --git a/layouts/edit/single.html b/layouts/edit/single.html new file mode 100644 index 0000000..27f8f31 --- /dev/null +++ b/layouts/edit/single.html @@ -0,0 +1 @@ +{{- define "main" -}}{{- end -}} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6173b24..a4dc95d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -27,9 +27,9 @@ {{ if eq hugo.Environment "dev" }} - {{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} + {{ $style := resources.Get "css/site.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }} - {{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} + {{ $style := resources.Get "css/player.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }} {{ else }}