on master help sign in
pagination: truncate while preserving arrows
6493bd5Matilde Park
components/Pagination.js+7−6
@@ -7,12 +7,13 @@ export default function Pagination(props) {
7 href={`/${props.section}/${props.post.slug}`}
7 href={`/${props.section}/${props.post.slug}`}
8 key={`post-${props.post.slug}`}
8 key={`post-${props.post.slug}`}
9 >
9 >
10+ <div
10− <div className="bg-wall cursor-pointer font-semibold p-2 px-4 rounded-xl">
11+ className="bg-wall cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
11− <p className="text-black">
12+ style={{ maxWidth: "45%" }}
13+ >
12− {props.previous ? "<- " : ""}
14+ <p className="flex-shrink-0">{props.previous ? "<- " : ""}</p>
13− {props.post.title}
15+ <p className="text-black truncate">{props.post.title}</p>
14− {props.next ? " ->" : ""}
16+ <p className="flex-shrink-0">{props.next ? " ->" : ""}</p>
15− </p>
16 </div>
17 </div>
17 </Link>
18 </Link>
18 );
19 );