principle:
- always show the first and the lastest page
- show two preview pages and two next pages of current page
<= 8
1 2 3 4 5 6 7 8
> 8
[1] 2 3 4 5 ... 9
1 2 3 [4] 5 6 ... 9
1 ... 3 4 [5] 6 7 ... 9
1 ... 4 5 [6] 7 8 9
principle:
<= 8
1 2 3 4 5 6 7 8
> 8
[1] 2 3 4 5 ... 9
1 2 3 [4] 5 6 ... 9
1 ... 3 4 [5] 6 7 ... 9
1 ... 4 5 [6] 7 8 9