Add of icons and images

This commit is contained in:
N0Xx committed 2026-10-10 15:36:06 +02:00
1 parent 904f75c8de
commit 502e94720f
29 files changed
+236 -21

No files matched your search

+8 -8
View File
@@ -1,10 +1,10 @@
/* ===== Contact form settings =====
The form posts to contact.php on your own server, which sends the message
to your Proton inbox over SMTP (see LISEZMOI.txt).
If the server can't be reached (e.g. site opened as a local file), the form
opens the visitor's mail app with the message already written. */
If the server can't be reached, the visitor is invited to try again later
or to use LinkedIn. No email address is shown on the site. */
var CONTACT_ENDPOINT = "contact.php";
var CONTACT_EMAIL = "nelson.thomas.contact@pm.me";
var LINKEDIN_URL = "https://www.linkedin.com/in/nelson-thomas-pr/";
(function(){
var root=document.documentElement;
@@ -47,10 +47,10 @@ var CONTACT_EMAIL = "nelson.thomas.contact@pm.me";
// Contact form
var form=document.getElementById('contact-form'), btn=document.getElementById('f-send'), st=document.getElementById('f-status');
function say(msg,cls){st.textContent=msg;st.className='status '+(cls||'')}
function mailtoFallback(d){
var body=d.message+'\n\n'+d.name+(d.company?' ('+d.company+')':'')+'\n'+d.email;
window.location.href='mailto:'+CONTACT_EMAIL+'?subject='+encodeURIComponent(d.subject)+'&body='+encodeURIComponent(body);
say('Your mail app should open with the message ready. If nothing happens, write to '+CONTACT_EMAIL+'.','ok');
function sendFailed(){
st.className='status err'; st.textContent='The message could not be sent. Try again in a few minutes, or reach me on ';
var a=document.createElement('a'); a.href=LINKEDIN_URL; a.target='_blank'; a.rel='noopener'; a.textContent='LinkedIn';
st.appendChild(a); st.appendChild(document.createTextNode('.'));
}
form.addEventListener('submit',function(e){
e.preventDefault();
@@ -69,7 +69,7 @@ var CONTACT_EMAIL = "nelson.thomas.contact@pm.me";
if(r.status===422||r.status===429||r.status===400){say(r.body.message,'err');return}
throw new Error('server');
})
.catch(function(){mailtoFallback(d)})
.catch(sendFailed)
.finally(function(){btn.disabled=false;btn.textContent='Send message'});
});
})();