Skip to content

Commit 5b123ef

Browse files
committed
Added Contact Page to my website
1 parent 3ee796c commit 5b123ef

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ <h1 class="display-1 text-center text-light">Doctor Mod's Code Dump</h1>
3535
<li class="nav-item">
3636
<a class="nav-link" href="#Code">Code</a>
3737
</li>
38+
<li class="nav-item">
39+
<a class="nav-link" href="#Contact">Contact</a>
40+
</li>
3841
</ul>
3942
</nav>
4043
<div id="About" class="section bg-secondary">
@@ -229,6 +232,18 @@ <h5>It is a small game about throw a hammer at a watermelon, trying not to hit a
229232
<br/>
230233
</div>
231234
</div>
235+
<div id="Contact" class="section bg-secondary">
236+
<div class="container">
237+
238+
<div style="text-align:center">
239+
<h2>Contact Me</h2>
240+
<p>Swing by for a chat, or just leave me a message:</p>
241+
<h2><a href="mailto:doctormod10@gmail.com">doctormod10@gmail.com</a></h2>
242+
<br/>
243+
<h2 id="lastseen"></h2>
244+
</div>
245+
</div>
246+
</div>
232247
<script defer src="main.js"></script>
233248
</body>
234249

main.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ nav {
8585
height: 100vh;
8686
}
8787

88-
#Code {}
88+
#Contact {
89+
height: 100vh;
90+
}
8991

9092
#timer {
9193
color: white;

main.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,25 @@ let timer = setInterval(function() {
9090
var years = Math.round((diff / (1000 * 60 * 60 * 24 * 365.25)) * 1000000000) / 1000000000;
9191

9292
document.getElementById("timer").innerHTML = zeros(years, 12);
93-
}, 10);
93+
}, 10);
94+
95+
const seenEl = document.querySelector('#lastseen');
96+
97+
function updateSeen() {
98+
fetch('seen.json?nocache=' + Math.random().toString().substring(2)).then(r => r.text()).then(r => {
99+
let json = JSON.parse(r);
100+
if (json.project) {
101+
if (json.project_href)
102+
// Please no XSS
103+
seenEl.innerHTML = `I just finished working on <a href="${json.project_href}" class="d" target="_blank"
104+
style="color:#949494;">${json.project}<span class="underline" style="background-color:#949494;"></span></a>.`;
105+
else
106+
seenEl.innerText = 'I just finished working on ' + json.project + '.';
107+
} else {
108+
seenEl.innerText = "I'm not working on anything right now."
109+
}
110+
}).catch(console.log);
111+
}
112+
113+
setInterval(updateSeen, 60 * 1000);
114+
updateSeen();

seen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)