I used css to limit the links that I allowed. Really simple..
this can be extended to show any number of pages, at any number of breakpoints
@media screen and ( max-width: 400px ){
li.page-item {
display: none;
}
.page-item:first-child,
.page-item:nth-child( 2 ),
.page-item:nth-last-child( 2 ),
.page-item:last-child,
.page-item.active,
.page-item.disabled {
display: block;
}
}
this specific implementation allows the arrows, the '...', the first page, active page and last page
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…