-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
205 lines (173 loc) · 3.43 KB
/
style.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
200
201
202
203
204
205
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap");
:root {
--modal-duration: 1s;
--primary-color: #30336b;
--secondary-color: #be2edd;
}
* {
box-sizing: border-box;
}
body {
font-family: "Lato", sans-serif;
margin: 0;
}
body.show-nav {
/* width of the nav */
transform: translateX(200px); /* set to the width in the nav css section */
transition: transform 0.3s ease; /* this is how the nav bar enters the screen when clicked */
}
nav {
background-color: var(--primary-color);
border-right: 2px solid rgba(200, 200, 200, 0.1);
color: #fff;
position: fixed;
top: 0;
left: 0;
width: 200px;
height: 100vh;
z-index: 100;
transform: translateX(-100%);
/* ------> this takes the nav bar completely off of the screen <-------- */
}
/* center the image logo */
nav .logo {
padding: 30px 0;
text-align: center;
}
/* create a circular image */
nav .logo img {
height: 75px;
width: 75px;
border-radius: 75px;
}
nav ul {
padding: 0;
list-style-type: none;
margin: 0;
}
nav ul li {
border-bottom: 2px solid rgba(200, 200, 200, 0.1);
padding: 20px;
}
/* set the border of the top of the first item in the nav bar list using a pseudo selector */
nav ul li:first-of-type {
border-top: 2px solid rgba(200, 200, 200, 0.1);
}
nav ul li a {
color: #fff;
text-decoration: none;
}
nav ul li a:hover {
text-decoration: underline;
}
header {
background-color: var(--primary-color);
color: #fff;
font-size: 130%;
position: relative;
padding: 40px 15px;
text-align: center;
}
header h1 {
margin: 0;
}
header p {
margin: 30px 0;
}
button,
input[type="submit"] {
background-color: var(--secondary-color);
border: 0;
border-radius: 5px;
color: #fff;
cursor: pointer;
padding: 8px 12px;
}
button:focus {
outline: none;
}
.toggle {
background-color: rgba(0, 0, 0, 0.3);
position: absolute;
top: 20px;
left: 20px;
}
.cta-btn {
padding: 12px 30px;
font-size: 20px;
}
.container {
padding: 15px;
margin: 0 auto;
max-width: 100%;
width: 800px;
}
/* covers the whole page like an overlay */
.modal-container {
background-color: rgba(0, 0, 0, 0.6);
display: none;
position: fixed; /* this keeps the sign up part of the screen hidden */
top: 0;
left: 0;
right: 0;
bottom: 0;
}
/* above display: none; keeps modal from showing up but below code allows it to show upon page refresh */
.modal-container.show-modal {
display: block;
}
.modal {
background: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
position: absolute;
overflow: hidden; /* keep scroll bars hidden */
/* following three center the modal */
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 100%;
width: 400px;
/* part of code to create fade in of modal */
animation-name: modalopen;
animation-duration: var(--modal-duration);
}
.modal-header {
background: var(--primary-color);
color: #fff;
padding: 15px;
}
.modal-header h3 {
margin: 0;
border-bottom: 1px solid #333;
}
.modal-content {
padding: 20px;
}
.modal-form div {
margin: 15px 0;
}
.modal-form label {
display: block;
margin-bottom: 5px;
}
.modal-form .form-input {
padding: 8px;
width: 100%;
}
.close-btn {
background: transparent;
font: 25px;
position: absolute;
top: 0;
right: 0;
}
/* to actually transition the opacity for the modal when selected */
@keyframes modalopen {
from {
opacity: 0;
}
to {
opacity: 1;
}
}