-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
154 lines (127 loc) · 2.49 KB
/
index.css
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
--default-spacing: 10px;
--default-margin: 1rem;
--medium-margin: 3rem;
--larger-margin: 5rem;
--primary-color: #7676d7;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
color: var(--primary-color);
}
/* common css starts */
.container {
margin-left: auto;
margin-right: auto;
display: flex;
justify-content: center;
flex-direction: column;
min-height: 100vh;
}
.title {
text-align: center;
margin-top: var(--default-margin);
color: #7676d7;
}
.buttons {
display: flex;
justify-content: center;
align-items: center;
background-color: var(--primary-color);
}
.buttons .btn,
.buttons .btn:active,
.buttons .btn:focus {
background-color: var(--primary-color);
box-shadow: none;
outline: none;
border: none;
}
.error-msg {
color: #ff0000;
text-align: center;
}
.loading {
color: #6565d4;
text-align: center;
margin-top: 20px;
font-size: 20px;
}
/* common css ends */
/* search section starts */
.search-section {
display: flex;
justify-content: center;
align-items: center;
margin-top: var(--default-margin);
}
.search-section .search-input {
min-width: 500px;
padding: var(--default-spacing);
}
.search-section .search-btn {
margin-left: var(--default-spacing);
}
/* search section ends */
/* filters section starts */
.filters {
display: flex;
justify-content: center;
flex-wrap: wrap;
align-items: center;
gap: 1rem;
margin-top: var(--default-margin);
}
.filters > * {
padding: 5px 10px;
background: #7676d7;
color: #fff;
border-radius: 5px;
cursor: pointer;
}
/* filters section ends */
/* images section starts */
.images {
margin-top: var(--medium-margin);
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-gap: var(--default-spacing);
justify-content: center;
align-items: center;
}
.images .image {
width: 200px;
height: 200px;
justify-self: center;
align-self: center;
margin-left: 2rem;
border-radius: 10px;
transition: transform 0.5s;
}
.images .image:hover {
transform: translateY(-3px);
}
/* images section ends */
/* Responsive adjustments */
@media (max-width: 768px) {
.images {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.search-section .search-input {
width: 100%;
min-width: unset;
margin: 0 var(--default-margin);
}
.images {
grid-template-columns: 1fr;
}
}