1+ import React from 'react'
2+ import styled from 'styled-components'
3+
4+ const Document = styled . img `
5+ display: none;
6+ height: 70px;
7+ width: fit-content;
8+ background-color: #000;
9+ border-radius: 10px;
10+ &:hover{
11+ cursor: pointer;
12+ opacity: 0.8;
13+ }
14+ `
15+
16+ const Description = styled . div `
17+ width: 100%;
18+ font-size: 15px;
19+ font-weight: 400;
20+ color: ${ ( { theme } ) => theme . text_primary + 99 } ;
21+ margin-bottom: 10px;
22+ @media only screen and (max-width: 768px){
23+ font-size: 12px;
24+ }
25+ `
26+
27+ const Span = styled . span `
28+ overflow: hidden;
29+ display: -webkit-box;
30+ max-width: 100%;
31+ -webkit-line-clamp: 4;
32+ -webkit-box-orient: vertical;
33+ text-overflow: ellipsis;
34+ `
35+
36+ const Card = styled . div `
37+ width: 650px;
38+ border-radius: 10px;
39+ box-shadow: rgba(23, 92, 230, 0.15) 0px 4px 24px;
40+ padding: 12px 16px;
41+ justify-content: space-between;
42+ position: relative;
43+ overflow: hidden;
44+ display: flex;
45+ flex-direction: column;
46+ gap: 12px;
47+ transition: all 0.3s ease-in-out;
48+ &:hover{
49+ box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
50+ transform: translateY(-5px);
51+ }
52+ @media only screen and (max-width: 768px){
53+ padding: 10px;
54+ gap: 8px;
55+ width: 300px;
56+ }
57+
58+ &:hover ${ Document } {
59+ display: flex;
60+ }
61+
62+ &:hover ${ Span } {
63+ overflow: visible;
64+ -webkit-line-clamp: unset;
65+
66+ }
67+ border: 0.1px solid #854CE6;
68+ `
69+
70+ const Top = styled . div `
71+ width: 100%;
72+ display: flex;
73+ gap: 12px
74+ `
75+
76+ const Image = styled . img `
77+ height: 50px;
78+ background-color: #000;
79+ border-radius: 10px;
80+ margin-top: 4px;
81+ @media only screen and (max-width: 768px){
82+ height: 40px;
83+ }
84+ `
85+
86+ const Body = styled . div `
87+ width: 100%;
88+ display: flex;
89+ flex-direction: column;
90+ `
91+
92+
93+ const Name = styled . div `
94+ font-size: 18px;
95+ font-weight: 600;
96+ color: ${ ( { theme } ) => theme . text_primary + 99 } ;
97+ @media only screen and (max-width: 768px){
98+ font-size: 14px;
99+ }
100+ `
101+
102+ const Degree = styled . div `
103+ font-size: 14px;
104+ font-weight: 500;
105+ color: ${ ( { theme } ) => theme . text_secondary + 99 } ;
106+ @media only screen and (max-width: 768px){
107+ font-size: 12px;
108+ }
109+ `
110+
111+ const Date = styled . div `
112+ font-size: 12px;
113+ font-weight: 400;
114+ color: ${ ( { theme } ) => theme . text_secondary + 80 } ;
115+ @media only screen and (max-width: 768px){
116+ font-size: 10px;
117+ }
118+ `
119+
120+ const Grade = styled . div `
121+ font-size: 14px;
122+ font-weight: 500;
123+ color: ${ ( { theme } ) => theme . text_secondary + 99 } ;
124+ @media only screen and (max-width: 768px){
125+ font-size: 12px;
126+ }
127+ `
128+
129+
130+
131+ const EducationCard = ( { education } ) => {
132+ return (
133+ < Card >
134+ < Top >
135+ < Image src = { education . img } />
136+ < Body >
137+ < Name > { education . school } </ Name >
138+ < Degree > { education . degree } </ Degree >
139+ < Date > { education . date } </ Date >
140+ </ Body >
141+ </ Top >
142+ < Grade > < b > Grade: </ b > { education . grade } </ Grade >
143+ < Description >
144+ < Span > { education . desc } </ Span >
145+ </ Description >
146+ </ Card >
147+ )
148+ }
149+
150+ export default EducationCard
0 commit comments