diff --git a/cmd/fastgallery/assets/fastgallery.css b/cmd/fastgallery/assets/fastgallery.css
index b56ca0e..7d3b85a 100644
--- a/cmd/fastgallery/assets/fastgallery.css
+++ b/cmd/fastgallery/assets/fastgallery.css
@@ -2,6 +2,12 @@
cursor: pointer;
}
+.thumbnail {
+ width: 100%;
+ height: auto;
+ aspect-ratio: 280/210;
+}
+
#modalMedia {
max-width: 100%;
max-height: calc(100% - 74px);
diff --git a/cmd/fastgallery/assets/gallery.gohtml b/cmd/fastgallery/assets/gallery.gohtml
index 6555461..6fd0229 100644
--- a/cmd/fastgallery/assets/gallery.gohtml
+++ b/cmd/fastgallery/assets/gallery.gohtml
@@ -5,8 +5,11 @@
{{ .Title }}
- {{if .ManifestFile }}
+ {{ if .ManifestFile }}
+ {{ if .AppleTouchIcon }}
+
+ {{ end }}
{{ end }}
{{ range .CSS }}
@@ -23,7 +26,7 @@
{{if .BackIcon}}
@@ -32,7 +35,7 @@
{{range .Subdirectories}}
@@ -40,7 +43,7 @@
{{range $i, $e := .Files}}
-
+
{{ .Filename }}
{{end}}
diff --git a/cmd/fastgallery/assets/icon-180x180.png b/cmd/fastgallery/assets/icon-180x180.png
index d5858d5..47261eb 100644
Binary files a/cmd/fastgallery/assets/icon-180x180.png and b/cmd/fastgallery/assets/icon-180x180.png differ
diff --git a/cmd/fastgallery/assets/icon-192x192.png b/cmd/fastgallery/assets/icon-192x192.png
index 0dfa010..3239776 100644
Binary files a/cmd/fastgallery/assets/icon-192x192.png and b/cmd/fastgallery/assets/icon-192x192.png differ
diff --git a/cmd/fastgallery/assets/icon-36x36.png b/cmd/fastgallery/assets/icon-36x36.png
index fd11fcd..5decb5d 100644
Binary files a/cmd/fastgallery/assets/icon-36x36.png and b/cmd/fastgallery/assets/icon-36x36.png differ
diff --git a/cmd/fastgallery/assets/icon-48x48.png b/cmd/fastgallery/assets/icon-48x48.png
index dc99d0f..740fb96 100644
Binary files a/cmd/fastgallery/assets/icon-48x48.png and b/cmd/fastgallery/assets/icon-48x48.png differ
diff --git a/cmd/fastgallery/assets/icon-512x512.png b/cmd/fastgallery/assets/icon-512x512.png
index dcfc4a2..2bc7dbb 100644
Binary files a/cmd/fastgallery/assets/icon-512x512.png and b/cmd/fastgallery/assets/icon-512x512.png differ
diff --git a/cmd/fastgallery/main.go b/cmd/fastgallery/main.go
index 7720541..5e4abaf 100644
--- a/cmd/fastgallery/main.go
+++ b/cmd/fastgallery/main.go
@@ -138,11 +138,14 @@ type htmlData struct {
Fullsize string
Original string
}
- CSS []string
- JS []string
- FolderIcon string
- BackIcon string
- ManifestFile string
+ CSS []string
+ JS []string
+ FolderIcon string
+ BackIcon string
+ AppleTouchIcon string
+ ManifestFile string
+ ImageWidth string
+ ImageHeight string
}
// transformationJob struct is used to communicate needed image/video transformations to
@@ -850,6 +853,13 @@ func createHTML(depth int, source directory, galleryDirectory string, dryRun boo
thisHTML.JS = append(thisHTML.JS, filepath.Join(rootEscape, entry.Name()))
case ".css":
thisHTML.CSS = append(thisHTML.CSS, filepath.Join(rootEscape, entry.Name()))
+ case ".png":
+ if isIcon(entry.Name()) {
+ iconSize, _ := getIconSize(entry.Name())
+ if iconSize == "180x180" {
+ thisHTML.AppleTouchIcon = entry.Name()
+ }
+ }
}
}
}
@@ -867,6 +877,10 @@ func createHTML(depth int, source directory, galleryDirectory string, dryRun boo
thisHTML.ManifestFile = config.assets.manifestFile
}
+ // Add image height and width
+ thisHTML.ImageHeight = fmt.Sprint(config.media.thumbnailHeight)
+ thisHTML.ImageWidth = fmt.Sprint(config.media.thumbnailWidth)
+
// thisHTML struct has been filled in successfully, parse the HTML template,
// fill in the data and write it to the correct file
htmlFilePath := filepath.Join(galleryDirectory, config.assets.htmlFile)