Custom Text

12am
dreamwidth codes, layouts, and other resources by @hollowhearts
hollowhearts: (Default)
[personal profile] hollowhearts posting in [community profile] midnightchills
ALT TEXT
ALT TEXT ALT TEXT
ALT TEXT ALT TEXT ALT TEXT
some optional text for photo attribution or whatever else



I hope nobody else has made this yet? I searched around quite a bit for something like this, but never found exactly what I wanted. So I made it myself! It's not an overly complicated code but it is something I've wanted for a while and I hope some others can get some use out of it too!

Anyway, this html code replicates Tumblr's photoset format, and uses the exact same dimensions that Tumblr's photosets do. So that is its primary intent, but with some tweaks this can be used for a photo gallery display of any size.

These photosets are also responsive, they'll shrink down proportionally on phones and smaller screens. This can make rows with three images a little hard to see but at least it won't break your layout :')


Instructions
1. Your most likely use for this will be in the body of a post, so before you begin make sure you're in the HTML tab of the text editor and have ticked the box on the top right that says "Disable Auto-Formatting". This will prevent the text editor from inserting a bunch of page breaks and other stuff you don't want.

2. Decide how you want to lay out your gifs. When you're making your rows, make sure to copy the entire section from where it says <!--[ONE/TWO/THREE] IMAGES--> to <!--[ONE/TWO/THREE] IMAGES END-->. Each one of those sections defines a row, so it's important not to miss any chunks!

3. Go through and paste the links to your pictures where it says "PIC LINK". If you want the image to be clickable to its source (or to direct somewhere else), paste your desired link where it says "LINK". If you don't want your image to link anywhere, delete <a href="LINK"> and its corresponding </a>

4. If you want alt text replace the ALT TEXT with whatever you want to say, if you don't want any delete this section of code alt="ALT TEXT".

5. If you don't want the "credit" line, delete <!--CREDIT--> to <!--CREDIT END-->

Notes
- Ideal image widths are the same as Tumblr (as of 2022): 540px (one image), 268px (two images), and 177px (3 images)

- The max photoset width is set to 540px by default, so it won't exceed 540px even in a post that's the same width as your screen. If you want a wider gallery just change the container size to 100% (which will fill your entire post width) or specify a specific pixel width. Changing the max post width will change your ideal image widths so adjust accordingly!

- If you have multiple images side by side with varying heights it'll take the height of the tallest image in the row and scale the others to match

- If one image is a different aspect ratio than the other(s) in a row beside it, it might be cropped. You can manage how your image is being cropped by changing the "object position" values (refer here for property values)

- the gutter is 4px, adjust the "grid gap" and "padding" values if you want to change how far your images are spaced apart.

Policy
Use this as a base, edit as you want, credit not necessary! I just hope to inspire people to post their lovely photosets here on Dreamwidth as well.
Date: 2022-05-17 05:42 am (UTC)

flockofcrows: (crows)
From: [personal profile] flockofcrows
This looks great, I'll be using it in the future!
Date: 2022-05-17 02:23 pm (UTC)

bluedreaming: digital art of a mouse looking at the moon which is an orange (**two evening moons lorca mouse)
From: [personal profile] bluedreaming
I love this!
Date: 2022-11-06 07:36 pm (UTC)

runpunkrun: portion of koch snowflake fractal, text: snow fractal (Default)
From: [personal profile] runpunkrun

This is useful, thanks for sharing!

Date: 2022-11-08 12:44 pm (UTC)

anneapocalypse: Ariane Clairière, an Elezen Warrior of Light with light skin, green eyes, and dark blonde hair. (Default)
From: [personal profile] anneapocalypse

This looks incredibly useful, thanks for sharing!

Date: 2022-11-13 08:16 pm (UTC)

goodbyebird: 70s Show: Kitty is laughing. (70s Show Kitty)
From: [personal profile] goodbyebird
This is such a great resource! <3
Date: 2022-11-13 11:02 pm (UTC)

actiaslunaris: Galileo - Yukawa Manabu browsing on a computer (examining the pixels)
From: [personal profile] actiaslunaris
Thank you! It's so good of you to put the work into this and then share it; I'm going to save it and use it on Dreamwidth and Wordpress when I have the need for it.
Date: 2022-11-14 11:37 am (UTC)

tei: Rabbit from the Garden of Earthly Delights (Default)
From: [personal profile] tei
This is beautiful, thanks for sharing!
Date: 2022-11-27 10:05 pm (UTC)

screechfox: A pixel scene of sunrise over the ocean. (orange cat)
From: [personal profile] screechfox
This is so cool! I definitely want to get some use out of this, if only to cross-post gifsets/photosets from Tumblr at some point.
Date: 2024-02-20 12:30 am (UTC)

nestingdevil: ➥ <lj user="headshot"> (Default)
From: [personal profile] nestingdevil
This is so awesome! Definitely going to use this. Thank you so much!
Date: 2024-10-29 01:21 am (UTC)

ty ty!!

ngtskynebula: (Default)
From: [personal profile] ngtskynebula
This is exactly what I was looking for! I know nothing about HTML, so I'm in need of the basic bits still. Thanks for sharing!
Date: 2025-04-22 08:33 pm (UTC)

axolotls: Drawing of a champagne-coloured ferret on a light blue background. (ferretsona)
From: [personal profile] axolotls

Ohhh, that's so cool!

For those who want to replicate older photosets, the old dimensions were 500px/245px/160px and gutters were 10px! (source with some other old dimensions)

Should be easy enough to do by changing the max post width to 500px, the grid gap to 10px and the vertical padding to 5px!

Edited Date: 2025-04-22 08:41 pm (UTC)
Date: 2025-09-26 07:09 am (UTC)

wasisweetonce: (Default)
From: [personal profile] wasisweetonce
Thanks so much for making this! Used it here!