Browse Source

improve size classes

max.mehl 7 months ago
parent
commit
75c0cf2fc3
No account linked to committer's email address
2 changed files with 9 additions and 5 deletions
  1. 1
    1
      README.md
  2. 8
    4
      static/css/snap-gallery.css

+ 1
- 1
README.md View File

@@ -41,7 +41,7 @@ Specifying your image files:
41 41
 Optional parameters:
42 42
 
43 43
 - All the [features/parameters](https://gohugo.io/content-management/shortcodes/#figure) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, rel, title, caption, class, attr (attribution), attrlink, alt. width and height might lead to strange results when used inside `{{< gallery >}}`.
44
-- `class` allows you to set any custom classes you want on the `<figure>` tag. The values `no-border`, `small`, `medium`, `pull-left` and `pull-right` are made available by this project.
44
+- `class` allows you to set any custom classes you want on the `<figure>` tag. The values `no-border`, `sm`, `md`, `lg`, `pull-left` and `pull-right` are made available by this project.
45 45
 - `lightbox` allows you to control the lightbox. The value `none` will disable the lightbox completely.
46 46
 
47 47
 Optional parameters work for standalone `{{< figure >}}` shortcodes and inside of `{{< gallery >}}`. However, they cannot be applied to `{{< snap-dir >}}`.

+ 8
- 4
static/css/snap-gallery.css View File

@@ -27,12 +27,16 @@ figure img {
27 27
   max-height: 100%;
28 28
 }
29 29
 
30
-figure.small img {
31
-  max-height: 150px;
30
+figure.sm {
31
+  max-width: 30%;
32 32
 }
33 33
 
34
-figure.medium img {
35
-  max-height: 225px;
34
+figure.md {
35
+  max-width: 50%;
36
+}
37
+
38
+figure.lg {
39
+  max-width: 70%;
36 40
 }
37 41
 
38 42
 figure.pull-right {

Loading…
Cancel
Save