-
Notifications
You must be signed in to change notification settings - Fork 0
/
themeforest-product-card.html
181 lines (149 loc) · 7.25 KB
/
themeforest-product-card.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!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">
<title>Product Card Like Themeforest</title>
<!-- MDI Icons -->
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/6.5.95/css/materialdesignicons.min.css">
<!-- Tailwind -->
<script src="https://cdn-tailwindcss.vercel.app/"></script>
<style>
.text-xxs {
font-size: 0.70rem;
line-height: 0.90rem;
}
.rounded-xss {
border-radius: 2px !important;
}
</style>
</head>
<body>
<!-- Product Card Container -->
<div class="flex flex-col items-center justify-center mt-32">
<!-- Product Card -->
<div class="flex flex-col shadow-md cursor-pointer w-96 hover:-translate-y-1 duration-300">
<!-- Preview -->
<div class="inline relative group h-48">
<!-- Thumbnail -->
<img class="absolute rounded-t object-cover h-full w-full"
src="https://images.unsplash.com/photo-1627384113858-ce93ff568d1f?auto=format&fit=crop&w=1170&q=80"
alt="Product Preview" />
<!-- Hover Bar -->
<div class="flex flex-row absolute justify-end
h-16 w-full bottom-0 px-3 space-x-2
bg-none opacity-0 group-hover:opacity-100
group-hover:bg-gradient-to-t from-black/20 via-gray-800/20 to-transparent
transition-all ease-in-out duration-200 delay-100">
<!-- Add to Bookmarks Button -->
<button class="bg-gray-50/10 rounded-full
px-1 h-9 w-9 my-auto hover:bg-gray-50/20
transition-colors duration-200">
<i class="mdi mdi-playlist-plus text-xl text-gray-200
hover:text-white transition-all duration-200"
title="Add to Bookmarks"></i>
</button>
<!-- Add to Favorites Button -->
<button class="bg-gray-50/10 rounded-full
px-1 h-9 w-9 my-auto hover:bg-gray-50/20
transition-colors duration-200">
<i class="mdi mdi-heart text-xl text-gray-200 p-1
hover:text-white transition-all duration-200"
title="Add to Favorites"></i>
</button>
</div>
</div>
<!-- Body -->
<div class="flex flex-col bg-white rounded-b p-3">
<!-- Title -->
<div class="text-sm font-semibold text-gray-900 hover:underline truncate">
Awesome Fantastic Super Uber Harika Merveilleux Pro Ultra Max Plus Plus Makeup Stuff
</div>
<!-- Author - Category -->
<div class="text-xxs text-gray-400 truncate mt-1">
by
<!-- Author -->
<a class="font-semibold hover:underline"> EgoistDeveloper </a>
in
<!-- Category -->
<a class="font-semibold hover:underline"> e-commerce </a>
</div>
<!-- Price -->
<div class="text-sm text-gray-600 font-bold mt-4 mb-1">
$23
</div>
<!-- Body -->
<div class="flex flex-row mt-2">
<!-- Detail Column -->
<div class="flex flex-col flex-auto">
<!-- Rating -->
<div class="flex flex-row group">
<i class="mdi mdi-star text-xs text-amber-400
hover:text-amber-500 transition-all duration-200"
title="Worst"></i>
<i class="mdi mdi-star text-xs text-amber-400
hover:text-amber-500 transition-all duration-200"
title="Bad"></i>
<i class="mdi mdi-star text-xs text-amber-400
hover:text-amber-500 transition-all duration-200"
title="Not Bad"></i>
<i class="mdi mdi-star text-xs text-amber-400
hover:text-amber-500 transition-all duration-200"
title="Good"></i>
<i class="mdi mdi-star text-xs text-amber-400
hover:text-amber-500 transition-all duration-200"
title="Awesome"></i>
<div class="text-xxs text-gray-400 ml-1 hover:underline">
(45)
</div>
</div>
<!-- Statistic -->
<div class="text-xxs text-gray-400 mt-1" title="34k Downlaods in this year">
34k Downloads
</div>
</div>
<!-- Button Column -->
<div class="flex flex-row flex-auto justify-end">
<!-- Cart Button -->
<a class="flex text-xs border px-3 my-auto py-2 mr-2
border-amber-500 group hover:bg-amber-500
rounded-xss
transition-all duration-200">
<!-- Icon -->
<i class="mdi mdi-cart-outline text-amber-700
group-hover:text-white delay-100"></i>
</a>
<!-- Preview Link Button -->
<a class="flex text-xs border px-3 my-auto py-2
border-amber-500 group hover:bg-amber-500
rounded-xss
transition-all duration-200">
<!-- Icon -->
<i class="mdi mdi-eye-outline text-amber-700
group-hover:text-white delay-100"></i>
<!-- Text -->
<div class="text-xxs text-amber-700 font-semibold ml-2
group-hover:text-white delay-100">
Live Preview
</div>
</a>
</div>
</div>
</div>
</div>
<!-- Notes -->
<span class="text-center font-bold my-20">
MDI (npm i @mdi/font) reuqired for icons
<hr class="my-4">
<a href="https://egoistdeveloper.github.io/twcss-to-sass-playground/" target="_blank" class="text-blue-600">
Convetert to SASS
</a>
<hr class="my-4">
<a href="https://unsplash.com/photos/l6HaQMpCSW0" target="_blank" class="text-blue-600">
Image Source
</a>
</span>
</div>
</body>
</html>