Skip to content

Commit

Permalink
Merge branch 'post-launch-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaorio committed Dec 23, 2022
2 parents 93a08a9 + 6fbadfa commit 1e9e786
Show file tree
Hide file tree
Showing 16 changed files with 2,864 additions and 470 deletions.
47 changes: 26 additions & 21 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
Obsidian Image Gallery is currently [pending review](https://github.com/obsidianmd/obsidian-releases/pull/961).
Until then, feel free to install it manually by cloning/downloading this repository, moving its folder into your `MyVault/.obsidian/plugins` folder, and building it with `npm`.

If you're unsure how to build it, you can grab the `main.js` file [from here](https://github.com/lucaorio/obsidian-image-gallery/releases/tag/1.0.0) and copy/paste it inside the folder you previously moved into your plugin folder.

**Please, keep in mind that proceeding this way is not best practice, and I'm not sure the plugin will receive updates later on!**

---

![Obsidian Image Gallery](assets/obsidian-image-gallery-header.jpg)

# Obsidian Image Gallery
Expand Down Expand Up @@ -59,23 +50,30 @@ In *[Live Preview](https://help.obsidian.md/Live+preview+update)* mode, the gall

## Settings

Settings can be customized in any order, in `yaml` syntax. Optional properties default to the values outlined in the list of bullet points below:
Settings can be customized in any order, in `yaml` syntax. Optional properties default to the values outlined in the tables below:

| Option | Default | Alternatives | Required | Description |
| -------- | ------------ | --------------- | -------- | -------------------------------------- |
| `path` | - | - | Yes | Path relative to the root of the vault |
| `type` | `horizontal` | `vertical` | No | Type of masonry |
| `gutter` | `8` | (any number) | No | Spacing in px between the images |
| `radius` | `0` | (any number) | No | Border radius in px of the images |
| `sortby` | `ctime` | `mtime`, `name` | No | Sort images by |
| `sort` | `desc` | `asc` | No | Order of sorting |

- `path: Attachments/Folder` (**required**, path relative to the root of your vault)
- `type: horizontal` (**optional**, type of masonry `horizontal` or `vertical`)
- `gutter: 8` (**optional**, spacing between the images)
- `radius: 0` (**optional**, border radius of the images)
- `sortby: ctime` (**optional**, sort by `ctime`, `mtime`, or `name`)
- `sort: desc` (**optional**, order of sorting: `desc` or `asc`)
Options applicable only for `type=horizontal`:

Applicable to `type: horizontal` only:
| Option | Default | Alternatives | Required | Description |
| -------- | ------- | ------------ | -------- | ------------------------ |
| `height` | `260` | (any number) | No | Height in px of all rows |

- `height: 260` (**optional**, height in px of all rows)
Options applicable only for `type=vertical`:

Applicable to `type=vertical` only:
| Option | Default | Alternatives | Required | Description |
| --------- | ------- | ------------ | -------- | ----------------------------- |
| `columns` | `3` | (any number) | No | Number of columns for desktop |
| `mobile` | `1` | (any number) | No | Number of columns for mobile |

- `columns: 3` (**optional**, number of columns for desktop)
- `mobile: 1` (**optional**, number of columns for mobile)

## Notes:
- For `path` there is no need to specify the name of the vault
Expand All @@ -87,6 +85,13 @@ An additional note about the orientation of the masonry vs. the distribution of
## Examples:
![Obsidian Image Gallery - Examples](assets/obsidian-image-gallery-examples.jpg)

## Changelog
`1.1.0`
- fixed alphabetical sorting
- introduced lightbox for both desktop and mobile
- added a "open image in new tab" button available in the lightbox
- fixed the casing of README.md to let Obsidian retrieve the correct file

## Acknowledgments
All photos in the header are by various photographers and available on [Unsplash](https://unsplash.com/s/photos/architecture).

Expand Down
Binary file modified assets/obsidian-image-gallery-examples.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "obsidian-image-gallery",
"name": "Image Gallery",
"version": "1.0.0",
"minAppVersion": "0.14.6",
"version": "1.1.0",
"minAppVersion": "1.1.8",
"description": "A zero setup masonry image gallery for Obsidian",
"author": "Luca Orio",
"authorUrl": "https://github.com/lucaorio",
Expand Down
Loading

0 comments on commit 1e9e786

Please sign in to comment.