-
Notifications
You must be signed in to change notification settings - Fork 0
/
04-pagination.html
139 lines (127 loc) · 3.11 KB
/
04-pagination.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<title>Pagination Component</title>
<style>
/*
SPACING SYSTEM (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
*/
/*
MAIN COLOR: #087f5b
GREY COLOR: #343a40
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Inter", sans-serif;
color: #343a40;
line-height: 1;
display: flex;
justify-content: center;
}
.pagination {
display: flex;
align-items: center;
gap: 12px;
margin-top: 200px;
}
.btn {
border: 1px solid #087f5b;
height: 48px;
width: 48px;
border-radius: 50%;
background: none;
cursor: pointer;
}
.btn:hover {
background-color: #087f5b;
}
.btn:hover .btn-icon {
stroke: #fff;
}
.btn-icon {
height: 24px;
width: 24px;
stroke: #087f5b;
}
.page-link:link,
.page-link:visited {
font-size: 18px;
color: #343a40;
text-decoration: none;
height: 36px;
width: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.page-link:hover,
.page-link:active,
.page-link.page-link--current {
background-color: #087f5b;
color: #fff;
}
.dots {
color: #868e96;
}
</style>
</head>
<body>
<div class="pagination">
<button class="btn">
<svg
xmlns="http://www.w3.org/2000/svg"
class="btn-icon"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 19l-7-7 7-7"
/>
</svg>
</button>
<a href="#" class="page-link">1</a>
<a href="#" class="page-link">2</a>
<a href="#" class="page-link page-link--current">3</a>
<a href="#" class="page-link">4</a>
<a href="#" class="page-link">5</a>
<a href="#" class="page-link">6</a>
<span class="dots">...</span>
<a href="#" class="page-link">23</a>
<button class="btn">
<svg
xmlns="http://www.w3.org/2000/svg"
class="btn-icon"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</button>
</div>
</body>
</html>