Skip to content

Commit 69d8c58

Browse files
Add word-break to external links so that layout doesnt get janky with long external links
1 parent 1be688c commit 69d8c58

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ My personal blog, made with the following technologies:
1212
- [ ] add internal links between posts
1313
- [ ] fix tags associated with unpublished posts to not be displayed
1414
- [ ] prevent top-of-post list bullets from being rendered where post image gets rendered prior to image being rendered
15+
- [ ] what's going on with the flicker on the background of the most recent post when dark/light modes are toggled?
1516
- [ ] store theme preference in local storage
1617
- [ ] add logic that checks if manual published date is set before sorting
1718
- [ ] change how aside is serialized from asterisk

web/components/PostImg.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@ import styled from 'styled-components'
33

44
const PostImgContainer = styled.div`
55
position: relative;
6-
margin: 2.5em 0;
6+
margin: 2.5em auto;
77
`
88
const PostImg = styled.img`
99
position: relative;
10-
/* top: 0;
11-
left: 0; */
12-
display: block;
13-
width: 100%;
10+
max-width: 100%;
11+
height: auto;
1412
transition: opacity 400ms ease 0ms;
13+
/* width: 100%; */
14+
/* TODO: what exactly were these supposed to be doing? */
15+
/* top: 0;
16+
left: 0;
17+
display: block; */
1518
`
1619
const PostLqipImg = styled(PostImg)`
1720
position: absolute;
1821
/* width: 100%; */
19-
/* TODO: what exactly are these supposed to be doing? */
22+
/* TODO: what exactly were these supposed to be doing? */
2023
/* transform: scale(1);
2124
transition: visibility 0ms ease 400ms; */
2225
`
@@ -25,7 +28,7 @@ const PhotoCredit = styled.p`
2528
`
2629

2730
function PostImage(props) {
28-
// console.log('PI props: ', props)
31+
console.log('Image props: ', props)
2932
const [isLoaded, setIsLoaded] = useState(false);
3033
// const [fullImgUrl, setFullImgUrl] = useState(null)
3134
// const [lqipImgUrl, setLqipImgUrl] = useState(null)

web/pages/posts/[slug].js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ const CodeNote = styled.p`
8585
const ExternalLink = styled.a`
8686
text-decoration: underline;
8787
color: ${({ theme }) => theme.articleLinks};
88+
/* display:inline-block; */
89+
word-break: break-word;
8890
`
8991
const Button = styled.button`
9092
font-size: .8em;

0 commit comments

Comments
 (0)