fgixes to CSS and home page.
This commit is contained in:
parent
0ac9709ec8
commit
8cc8917aa8
43 changed files with 1126 additions and 340 deletions
22
docs/src/js/hover-text.js
Normal file
22
docs/src/js/hover-text.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// ---------------------
|
||||
// This script changes the text when hovering over faces on the home page.
|
||||
// ---------------------
|
||||
|
||||
function setHoverText(elementId, text) {
|
||||
const hoverTextElement = document.getElementById('hover-text');
|
||||
|
||||
document.getElementById(elementId).onmouseover = function () {
|
||||
hoverTextElement.innerHTML = text;
|
||||
hoverTextElement.classList.remove('leave');
|
||||
hoverTextElement.classList.add('fade-in');
|
||||
};
|
||||
|
||||
document.getElementById(elementId).onmouseout = function () {
|
||||
hoverTextElement.classList.remove('fade-in');
|
||||
hoverTextElement.classList.add('leave');
|
||||
};
|
||||
}
|
||||
|
||||
setHoverText('visual-hover', 'a thousand words at a time');
|
||||
setHoverText('technical-hover', 'in zeroes, ones, and other numbers');
|
||||
setHoverText('writing-hover', 'letter by letter, word by word');
|
||||
Loading…
Add table
Add a link
Reference in a new issue