From ff3e805fd10aab28ad4dde5144ba7b84cf186312 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sat, 9 Oct 2021 01:54:47 +0200 Subject: Added flip on over on CV image --- posts/2015-03-07-curriculum-vitae.md | 4 ++++ template/_includes.html | 2 +- template/script.js | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/posts/2015-03-07-curriculum-vitae.md b/posts/2015-03-07-curriculum-vitae.md index ca19218..9c43a6d 100644 --- a/posts/2015-03-07-curriculum-vitae.md +++ b/posts/2015-03-07-curriculum-vitae.md @@ -16,8 +16,12 @@ Tags: [] } +
+ ![Picture](/assets/cv/avatar.gif) +
+ **Mitja Felicijan** Email me at *[m@mitjafelicijan.com](mailto:m@mitjafelicijan.com?subject=Website+CV+Contact)* diff --git a/template/_includes.html b/template/_includes.html index 1edbce7..3c73ccf 100755 --- a/template/_includes.html +++ b/template/_includes.html @@ -1,3 +1,3 @@ - + diff --git a/template/script.js b/template/script.js index 0332221..e8b7039 100755 --- a/template/script.js +++ b/template/script.js @@ -12,4 +12,13 @@ window.addEventListener('load', () => { evt.target.src = ditheredImage; }); }); + + // flip CV image on mouse over + document.querySelector('.cv-picture img').addEventListener('mouseover', evt => { + evt.target.style.transform = 'scaleX(-1)'; + }); + + document.querySelector('.cv-picture img').addEventListener('mouseout', evt => { + evt.target.style.transform = 'scaleX(1)'; + }); }); -- cgit v1.2.3