diff --git a/templates/_file_detail.pages.tmpl b/templates/_file_detail.pages.tmpl index 85953cb..7333e98 100644 --- a/templates/_file_detail.pages.tmpl +++ b/templates/_file_detail.pages.tmpl @@ -1,13 +1,14 @@ -
-

{{ .Entry.Name }}

-

Type : {{ ext .Entry.Name }}

-

Taille : {{ printf "%.1f KB" (toKB .Entry.Size) }}

-

Modifié : {{ .Entry.ModTime.Format "02 Jan 2006 15:04" }}

- {{ if and (not .Entry.IsDir) (or (hasSuffix .Entry.Name ".jpg") (hasSuffix .Entry.Name ".png")) }} -
- -
+ {{ with .Entry }} +

{{ .Name }}

+

Type : {{ ext .Name }}

+

Taille : {{ printf "%.1f KB" (toKB .Size) }}

+

Modifié le : {{ .ModTime.Format "02 Jan 2006 15:04" }}

+ {{ if and (not .IsDir) (or (hasSuffix .Name ".jpg") (hasSuffix .Name ".png")) }} +
+ +
+ {{ end }} {{ end }}
diff --git a/templates/_file_list.pages.tmpl b/templates/_file_list.pages.tmpl index 22d2005..d52f0b7 100644 --- a/templates/_file_list.pages.tmpl +++ b/templates/_file_list.pages.tmpl @@ -1,16 +1,30 @@ -
{{- range .Entries }}
- +
+
+ {{ if .IsDir }} + + {{ else if or (hasSuffix .Name ".jpg") (hasSuffix .Name ".png") }} + {{ .Name }} + {{ else }} + + {{ end }} +
+
+
+

{{ .Name }}

+
{{- end }}
- diff --git a/templates/folders.pages.tmpl b/templates/folders.pages.tmpl index 04fd41f..cf5e6de 100644 --- a/templates/folders.pages.tmpl +++ b/templates/folders.pages.tmpl @@ -1,71 +1,80 @@ -
-
-
- -
- -
- -
- - -
- {{ template "_file_list" . }} + +
-
- -
-
- Sélectionnez un fichier ou un dossier… + +
+ + +
+ {{ template "_file_list.pages.tmpl" . }} +
+ + +
+
+ Sélectionnez un fichier ou dossier… +
+
+
-
-
+