diff --git a/layouts/_default/event.html b/layouts/_default/event.html
index 8330a93..488bf3e 100644
--- a/layouts/_default/event.html
+++ b/layouts/_default/event.html
@@ -31,7 +31,7 @@
{{ if .File.Dir }}
{{ $basename := (print "/events/poster/" .Params.eventNumber "/") }}
- {{ if (fileExists (print "./static" $basename)) }}
- {{ range (readDir (print "./static" $basename )) }}
+ {{ if (fileExists (print "./assets" $basename)) }}
+ {{ range (readDir (print "./assets" $basename )) }}
-
+ {{ $image := (resources.Get (print ($basename | relURL) .Name)).Resize "300x" }}
+
+ {{ with $image}}
+
+ {{ end }}
+
{{ index (split .Name ".") 0 }}
diff --git a/layouts/_default/gallery.html b/layouts/_default/gallery.html
index 2523cbf..2b901d2 100644
--- a/layouts/_default/gallery.html
+++ b/layouts/_default/gallery.html
@@ -13,11 +13,16 @@
{{ .Title }}
{{ if .File.Dir }}
{{ $basename := (print "/events/images/" .Params.eventNumber "/") }}
- {{ if (fileExists (print "./static" $basename)) }}
- {{ range (readDir (print "./static" $basename )) }}
+ {{ if (fileExists (print "./assets" $basename)) }}
+ {{ range (readDir (print "./assets" $basename )) }}
diff --git a/layouts/_default/images.html b/layouts/_default/images.html
index 1a65c2d..d81a01f 100644
--- a/layouts/_default/images.html
+++ b/layouts/_default/images.html
@@ -8,8 +8,8 @@
{{ if .File.Dir }}
- {{ if (fileExists (print "./static/events/images/")) }}
- {{ range (readDir (print "./static/events/images")) }}
+ {{ if (fileExists (print "./assets/events/images/")) }}
+ {{ range (readDir (print "./assets/events/images")) }}
-
جلسه {{partial "persianNumber.html" .Name}}
diff --git a/static/css/main.css b/static/css/main.css
index a7cd6dd..23b90bf 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -483,34 +483,45 @@ table th, table td {
}
.poster {
- margin: 0 auto;
- width: 200px;
+ margin: 0 auto;
+ width: 300px;
+}
+
+.gallery,
+.gallery * {
+ box-sizing: border-box;
}
.gallery {
- display: flex;
- flex-wrap: wrap;
- padding: 0 4px;
- text-align: center;
+ display: flex;
+ flex-wrap: wrap;
+ text-align: center;
+ margin-top: -8px;
+ margin-inline: -4px;
+ width: 100%;
}
.gallery-column {
- flex: 25%;
+ flex: 0 0 auto;
+ width: 25%;
+ margin-top: 8px;
+ padding-inline: 4px;
}
.gallery-column img {
- margin-top: 8px;
- width: 100%;
+ margin-block: 8px;
+ width: 100%;
+ object-fit: cover;
}
@media screen and (max-width: 800px) {
- .gallery-column {
- flex: 50%;
- }
+ .gallery-column {
+ width: 50%;
+ }
}
@media screen and (max-width: 600px) {
- .gallery-column {
- flex: 100%;
- }
-}
\ No newline at end of file
+ .gallery-column {
+ width: 100%;
+ }
+}