Closed techieshark closed 8 years ago
This is an edge case, but we might run across a story with less than two photos, and in that situation the text is misaligned:
To fix this, we'll need some CSS but first how to reproduce.
First find the story id for the first story that comes up:
Then in Postgres, you'll see it has a bunch of photos for it:
psql hnm hnm=# select * from story_photo where story_id = 16; id | story_id | photo_id ----+----------+---------- 55 | 16 | 51 56 | 16 | 56 60 | 16 | 60 65 | 16 | 65 67 | 16 | 67 72 | 16 | 72 (6 rows)
Let's delete all but one of them:
hnm=# select * from story_photo where story_id = 16 and photo_id <> 51; id | story_id | photo_id ----+----------+---------- 56 | 16 | 56 60 | 16 | 60 65 | 16 | 65 67 | 16 | 67 72 | 16 | 72 (5 rows) hnm=# delete from story_photo where story_id = 16 and photo_id <> 51; DELETE 5 hnm=# select * from story_photo where story_id = 16; id | story_id | photo_id ----+----------+---------- 51 | 16 | 51 (1 row)
Now reload the website and you'll see the results in the screenshot above.
When fixed, it should look like this:
This is an edge case, but we might run across a story with less than two photos, and in that situation the text is misaligned:
To fix this, we'll need some CSS but first how to reproduce.
First find the story id for the first story that comes up:
Then in Postgres, you'll see it has a bunch of photos for it:
Let's delete all but one of them:
Now reload the website and you'll see the results in the screenshot above.