-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.css
199 lines (176 loc) · 3.83 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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
body {
width: 100vw;
height: 10vh;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(#282828, #181818) no-repeat center fixed;
background-size: cover;
overflow: auto;
overflow-x: hidden;
}
/* Set text colours and font */
h1, h3, p {
font-family: 'Epilogue', sans-serif;
}
/* Sets boundaries for my cards to fit */
.container {
width: auto;
margin: auto;
}
.row {
display: flex;
flex-direction: row;
justify-content: space-around;
flex-flow: wrap;
}
/* Set zooming and size properties for my card itself */
.card {
display: grid;
grid-template-columns: 300px;
grid-template-rows: 210px 250px 20px;
grid-template-areas: "image""text""stats";
border-radius: 18px;
background: #1d1d1d;
color: white;
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.9);
font-family: 'Epilogue', sans-serif;
text-align: justify;
margin: 30px;
transform-style: preserve-3d;
transform: perspective(1000px);
transition: 0.5s ease;
}
/* RGB animation that goes behind the card */
.rgb::after {
content: "";
background: linear-gradient(45deg,
#ff0000 0%,
#ff9a00 10%,
#d0de21 20%,
#4fdc4a 30%,
#3fdad8 40%,
#2fc9e2 50%,
#1c7fee 60%,
#5f15f2 70%,
#ba0cf8 80%,
#fb07d9 90%,
#ff0000 100%) repeat 0% 0% / 300% 100%;
position: absolute;
inset: -3px;
border-radius: 16px;
filter: blur(8px);
transform: translateZ(-1px);
/*or z-index */
animation: rgb 6s linear infinite;
}
@keyframes rgb {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
/* All content relevant for each card */
.card-image {
grid-area: image;
background: linear-gradient(#fff0 0%, #fff0 70%, #1d1d1d 100%), url("data_science.jpg");
border-top-left-radius: 15px;
border-top-right-radius: 15px;
background-size: cover;
}
.card-text {
grid-area: text;
margin: 25px;
transform: translateZ(30px);
text-decoration: none;
}
.card-text .date {
color: rgb(255, 7, 110);
font-size: 13px;
font-family: 'Epilogue', sans-serif;
}
.card-text p {
color: #B3B3B3;
font-size: 14px;
font-weight: 300;
font-family: 'Epilogue', sans-serif;
}
.card-text h2 {
margin-top: 0px;
font-size: 28px;
text-align: center;
font-family: 'Epilogue', sans-serif;
}
.card-stats {
grid-area: stats;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
background: rgb(255, 7, 110);
}
.card-stats .stat {
padding: 10px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: white;
}
.card-stats .border {
border-left: 1px solid rgb(172, 26, 87);
border-right: 1px solid rgb(172, 26, 87);
}
.card-stats .value {
font-size: 22px;
font-weight: 500;
}
.card-stats .value sup {
font-size: 12px;
}
.card-stats .type {
font-size: 11px;
font-weight: 300;
text-transform: uppercase;
}
.card:hover {
transform: scale(1.1);
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.6);
}
/*card2*/
.card-image.card2 {
background: linear-gradient(#fff0 0%, #fff0 70%, #1d1d1d 100%), url("olympics.jpg");
background-size: cover;
}
.card-text.card2 .date {
color: rgb(255, 77, 7);
}
.card-stats.card2 .border {
border-left: 1px solid rgb(185, 67, 20);
border-right: 1px solid rgb(185, 67, 20);
}
.card-stats.card2 {
background: rgb(255, 77, 7);
}
/*card3*/
.card-image.card3 {
background: linear-gradient(#fff0 0%, #fff0 70%, #1d1d1d 100%), url("code.jpg");
background-size: cover;
}
.card-text.card3 .date {
color: rgb(0, 189, 63);
}
.card-stats.card3 .border {
border-left: 1px solid rgb(14, 122, 50);
border-right: 1px solid rgb(14, 122, 50);
}
.card-stats.card3 {
background: rgb(0, 189, 63);
}