-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
219 lines (188 loc) · 6.17 KB
/
index.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html>
<head>
<title>Beatrice Vaienti - PhD Student @ DHLAB, EPFL</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap');
*, *:before, *:after {
box-sizing: border-box;
}
body, html {
margin: 0;
padding: 0; /* Removed the 80px padding */
font-family: 'Roboto', sans-serif;
background: #ED4264; /* fallback for old browsers */
background: -webkit-linear-gradient(45deg, #FFEDBC, #ED4264); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(45deg, #FFEDBC, #ED4264); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
color: #333;
line-height: 1.6;
}
.header {
position: fixed; /* Fixed header */
top: 0;
left: 0;
width: 100%;
z-index: 0; /* Lower z-index so content scrolls over it */
padding: 20px 0;
}
.header h1, .header p {
font-family: 'DM Serif Display', serif;
color: white;
text-align: center;
}
.header h1 {
font-size: 96px;
}
.header p {
font-size: 48px;
transform: translateY(-20px);
}
.navigation {
background-color: transparent;
color: white;
overflow: hidden;
padding: 10px 0;
margin-right: 50px;
text-align: right;
position: fixed;
width: 100%;
top: 30px; /* Adjusted based on header height */
right: 20px;
z-index: 10; /* Higher z-index for navigation */
}
.navigation a {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
text-transform: uppercase;
font-weight: 700;
}
.navigation a:hover {
color: #EF629F;
}
.main-content {
position: relative;
z-index: 100; /* Higher z-index for main content */
padding-top: 500px; /* Adjusted padding-top to push content below header and navigation */
}
.section {
padding: 20px;
text-align: center;
}
.section-light {
background-color: rgba(255, 255, 255, 0.9);
margin: 20px;
padding: 40px;
border-radius: 10px;
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2); /* Adding shadow */
}
.gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.gallery-item {
margin: 10px;
background: #fff;
border-radius: 10px;
overflow: hidden;
transition: transform 0.3s ease;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.gallery-item:hover {
transform: translateY(-5px);
}
.gallery-image {
width: 100%;
height: auto;
display: block;
}
.footer {
background-color: #ED4264;
color: white;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="header">
<h1 id="header-title"></h1>
<p id="header-subtitle"></p>
</div>
<div class="navigation">
<a href="#work" id="navigation-work">Work</a>
<a href="#about" id="navigation-about">About</a>
<!-- Add other navigation links as needed -->
</div>
<div class="main-content">
<div class="section" id="bio">
<div class="section-light">
<h2 id="about-title"></h2>
<p id="about-description"></p>
</div>
</div>
<div class="section" id="cv">
<div class="section-light">
<h2 id="cv-title"></h2>
<p id="cv-summary"></p>
</div>
</div>
<div class="section" id="projects">
<div class="section-light">
<h2>My Projects</h2>
<div class="gallery" id="projects-gallery">
<!-- Projects will be inserted here -->
</div>
</div>
</div>
<div class="section" id="contact">
<div class="section-light">
<h2>Contact Me</h2>
<p id="contact-prompt"></p>
<!-- Contact form elements -->
</div>
</div>
</div>
<div class="footer">
<p id="footer-copyright"></p>
</div>
<script>
fetch('content.json')
.then(response => response.json())
.then(data => {
// Header
document.getElementById('header-title').textContent = data.header.title;
document.getElementById('header-subtitle').textContent = data.header.subtitle;
// About section
document.getElementById('about-title').textContent = data.about.title;
document.getElementById('about-description').textContent = data.about.description;
// CV section
document.getElementById('cv-title').textContent = data.cv.title;
document.getElementById('cv-summary').textContent = data.cv.summary;
// Projects section
const projectsGallery = document.getElementById('projects-gallery');
data.projects.forEach(project => {
const projectItem = document.createElement('div');
projectItem.className = 'gallery-item';
projectItem.innerHTML = `
<img class="gallery-image" src="${project.image}" alt="${project.title}">
<p>${project.title}</p>
<p>${project.description}</p>
`;
projectsGallery.appendChild(projectItem);
});
// Contact section
document.getElementById('contact-prompt').textContent = data.contact.prompt;
// Footer
document.getElementById('footer-copyright').textContent = data.footer.copyright;
})
.catch(error => {
console.error('Error fetching content:', error);
});
</script>
</body>
</html>