1
1
import React , { useEffect , useState , useCallback } from "react" ;
2
2
import galleryData from "../data/gallery.json" ;
3
- import { Card , List , Select } from "antd" ;
3
+ import { Card , List , Select , Typography } from "antd" ;
4
4
import { useLocation , useHistory } from "react-router-dom" ;
5
5
6
6
const { Option } = Select ;
7
+ const { Paragraph, Title } = Typography ;
7
8
8
9
const GalleryPage = ( ) => {
9
10
const location = useLocation ( ) ;
@@ -75,10 +76,10 @@ const GalleryPage = () => {
75
76
gutter : 16 ,
76
77
xs : 1 ,
77
78
sm : 2 ,
78
- md : 3 ,
79
- lg : 3 ,
80
- xl : 4 ,
81
- xxl : 4 ,
79
+ md : 2 ,
80
+ lg : 2 ,
81
+ xl : 3 ,
82
+ xxl : 3 ,
82
83
} }
83
84
dataSource = { filteredData }
84
85
renderItem = { ( item ) => (
@@ -92,6 +93,7 @@ const GalleryPage = () => {
92
93
< Card
93
94
hoverable
94
95
bordered
96
+ style = { { height : 370 , paddingTop : 15 } }
95
97
cover = {
96
98
< img
97
99
alt = { item . title }
@@ -102,29 +104,27 @@ const GalleryPage = () => {
102
104
: `/autogen/img/gallery/${ item . image } `
103
105
: `/autogen/img/gallery/default.png`
104
106
}
107
+ style = { {
108
+ height : 150 ,
109
+ width : "fit-content" ,
110
+ margin : "auto" ,
111
+ padding : 2 ,
112
+ } }
105
113
/>
106
114
}
107
115
>
108
- < div >
109
- < span
110
- style = { {
111
- fontSize : "1.2rem" ,
112
- fontWeight : "bold" ,
113
- color : "black" ,
114
- } }
115
- >
116
- { item . title }
117
- </ span >
118
- </ div >
119
- < div
116
+ < Title level = { 5 } ellipsis = { { rows : 2 } } >
117
+ { item . title }
118
+ </ Title >
119
+ < Paragraph
120
+ ellipsis = { { rows : 3 } }
120
121
style = { {
121
- // fontSize: "0.8rem",
122
122
fontWeight : "normal" ,
123
123
color : "#727272" ,
124
124
} }
125
125
>
126
126
{ item . description ? item . description : item . title }
127
- </ div >
127
+ </ Paragraph >
128
128
< TagsView tags = { item . tags } />
129
129
</ Card >
130
130
</ a >
0 commit comments