unixporn-dots / unixporn-dots.github.io

A collection of dotfiles and icons from the r/unixporn community
https://unixporn-dots.github.io
111 stars 19 forks source link

Multiple images for a setup #26

Closed ArmoredVortex closed 2 years ago

ArmoredVortex commented 2 years ago

Title says it. Potentially have multiple images for a setup.

Low priority at the moment untill #25 is closed.

Rahuletto commented 2 years ago

Why not a grid system ? (Collage like) or with arrows system ?

[Ok the image should be in a ratio so collage doesn't really work out]

ArmoredVortex commented 2 years ago

Why not a grid system ? (Collage like) or with arrows system ?

[Ok the image should be in a ratio so collage doesn't really work out]

Yep having arrows on either sides also came to my mind but wouldn't it make the card cluttered with buttons and tags ? I was thinking maybe we have some sort of way to expand the card on click

Rahuletto commented 2 years ago

I have an idea of literally making the card bigger when hovering and darkening things in the background, meaning we can work on a bigger real estate (like adding an image button) and work with the arrows

But the problem is that a hover event occurs when u are literally moving the mouse without an intention to hover at a card

Pesc0 commented 2 years ago

TODO: Update generateJS.py: image: field should become a list to support multiple images. Also the script can just list the theme directory and add all the filenames by itself, no need to type manually "themes/foldername/imagename" for each picture. At most you should have a single thumbnail: imagename field which indicates which of the many images to use as a thumbnail. Note that the rest of the path ("themes/foldername/") can be omitted since the yaml file is contextual to the theme folder. Remains to figure out how to integrate images which are URLs.

On that note i had another thought: what if we enforce that images are provided through URLs? People have their dotfiles in github repositories, we can just reference the images they already have in their gallery, kinda like this: https://github.com/unixporn-dots/unixporn-dots.github.io/blob/main/themes/AFreidzs_Dotfiles/afreidzs-dotfiles.png Pros:

Cons:

Don't know, just a thought. Some kind of compromise would be ideal i guess

ArmoredVortex commented 2 years ago

I suppose we should go with the raw image files because the repo size is only ~ 90 MBs at the moment, plus each image can be verified for NSFW or weird aspect ratio before submission. And also shields against image deletion/rename.

mahancoder commented 2 years ago

I agree with @Pesc0 except for the link section. I think we can just embed a gallery-like view with buttons and stuff into the image preview popup, and have one image as the thumbnail As for using links, that would completely remove any sort of moderation we can have on the images. Maybe we can use Reddit post images tho, those are controlled by the subreddit mods.But that would make reddit post a necessity, which I intentionally made optional myself, because I didn't have a reddit post for my dots and didn't want to make one

I also was thinking of adding something to the python script to automatically resize any image to a fixed resolution. If the aspect ratio is 16:9, it can just stretch it. If not, then we can add a blur-like effect to fill the gaps, and make it match the aspect ratio. Kinda like when they wanna transform a vertical video into a horizontal video

Pesc0 commented 2 years ago

Just opened a pr for multi image (just on the python side for now). Image cropping/stretching/blurring could be a thing, but I'd put that in another script, since it just needs to be run once when a new submission is added.