-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html~
More file actions
100 lines (86 loc) · 3.01 KB
/
index.html~
File metadata and controls
100 lines (86 loc) · 3.01 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tiago Mendes Ferreira - Research Group</title>
<link rel="stylesheet" href="styles.css">
<style>
.centered-content {
position: relative;
text-align: center;
margin: 0 auto;
max-width: 1200px;
margin-top: -30px;
}
.centered-image {
display: block;
margin: 20px auto;
max-width: 400px;
height: auto;
transition: opacity 1.5s ease-out;
}
.text-overlay {
position: absolute;
top: 90%; /* Adjust this to move text higher or lower */
left: 50%;
transform: translate(-50%, -50%);
color: black; /* Change if needed for contrast */
padding: 10px;
border-radius: 10px;
}
.hidden {
display: none;
}
.typing-text {
font-size: 18px;
font-family: monospace;
white-space: pre-wrap;
border-right: 2px solid black; /* Simulated cursor */
overflow: hidden;
display: inline-block;
}
@keyframes blink {
50% { border-color: transparent; }
}
.typing-text.typed {
border-right: none; /* Remove cursor after typing */
}
</style>
</head>
<script src="header.js"></script>
<body>
<div class="centered-content">
<!-- Show image first -->
<img id="gifImage" src="movie.gif" alt="Animated GIF" class="centered-image">
<!-- Hidden text container for typewriter effect -->
<div id="textContent" class="text-overlay hidden">
<h2>Welcome!</h2>
<p id="typing-text" class="typing-text"></p>
<p>© 2024 Tiago Mendes Ferreira</p>
</div>
</div>
<script>
const text = "This website is currently under construction. Feel free nevertheless to explore the other pages and to learn more about us.";
let index = 0;
const speed = 50; // Typing speed (ms per character)
function typeWriter() {
if (index < text.length) {
document.getElementById("typing-text").innerHTML += text.charAt(index);
index++;
setTimeout(typeWriter, speed);
} else {
document.getElementById("typing-text").classList.add("typed"); // Remove cursor effect
setTimeout(() => {
document.getElementById("gifImage").style.opacity = "0"; // Fade out image after typing
}, 2000);
}
}
setTimeout(() => {
document.getElementById("gifImage").style.opacity = "1"; // Ensure GIF is visible
document.getElementById("textContent").style.display = "block";
typeWriter();
}, 2000); // Start after Y miliseconds
</script>
</body>
</html>