Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MIT_MAHE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2022 Competition
MIT_MAHE
Commits
1e501058
Commit
1e501058
authored
2 years ago
by
Ashrith Sagar Yedlapalli
Browse files
Options
Downloads
Patches
Plain Diff
c0.1.122 Proximity Hover effect
parent
f418b69a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
static/script.js
+30
-0
30 additions, 0 deletions
static/script.js
wiki/pages/description.html
+7
-2
7 additions, 2 deletions
wiki/pages/description.html
with
37 additions
and
2 deletions
static/script.js
+
30
−
0
View file @
1e501058
...
...
@@ -67,3 +67,33 @@ const hiddenElements = document.querySelectorAll('.reveal-on-scroll');
hiddenElements
.
forEach
((
element
)
=>
observer
.
observe
(
element
));
// ------------------------------------------------------------------------
// Proximity Hover effect
// On Fish eyes in Description page
const
eyes
=
document
.
getElementById
(
'
fishEye
'
)
const
anchor
=
document
.
getElementById
(
'
fishBody
'
)
const
rekt
=
anchor
.
getBoundingClientRect
();
const
anchorX
=
rekt
.
left
+
rekt
.
width
/
2
;
const
anchorY
=
rekt
.
top
+
rekt
.
height
/
2
;
document
.
addEventListener
(
'
mousemove
'
,
(
e
)
=>
{
const
mouseX
=
e
.
clientX
;
const
mouseY
=
e
.
clientY
;
const
angleDeg
=
angle
(
mouseX
,
mouseY
,
anchorX
,
anchorY
);
const
eye
=
document
.
getElementById
(
'
fishEye
'
)
eye
.
style
.
transform
=
`rotate(
${
90
+
angleDeg
}
deg)`
});
function
angle
(
cx
,
cy
,
ex
,
ey
)
{
const
dy
=
ey
-
cy
;
const
dx
=
ex
-
cx
;
const
rad
=
Math
.
atan2
(
dy
,
dx
);
// range (-PI, PI]
const
deg
=
rad
*
180
/
Math
.
PI
;
// rads to degs, range(-180, 180]
return
deg
;
}
// ------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
wiki/pages/description.html
+
7
−
2
View file @
1e501058
...
...
@@ -48,8 +48,13 @@
opacity of the muscles, and eventual death. Vibriosis affects all stages of growth causing upto 50% mortality [1].
</p>
<img
src=
"https://static.igem.wiki/teams/4200/wiki/description/fishwithvibriosis.png"
alt=
"Image of fish having vibriosis"
class=
"reveal-on-scroll"
style=
"width: 40%"
>
<div>
<img
src=
"https://static.igem.wiki/teams/4200/wiki/description/fishwithvibriosis.png"
alt=
"Image of fish having vibriosis"
style=
"width: 40%; position: relative;"
id=
"fishBody"
>
<img
src=
"https://static.igem.wiki/teams/4200/wiki/description/fishwithvibriosis-eye-no-bg.png"
alt=
"Image of fish having vibriosis"
style=
"position: relative;top: -203px;left: -143px;width: 5%;"
id=
"fishEye"
>
</div>
<p
class=
"reveal-on-scroll"
>
Our bacteria of interest to tackle this infection in fish is
<em>
V.parahaemolyticus
</em>
. It
is a gram-negative halophile that is found in estuarine and marine environments [2].
<i>
V. parahaemolyticus
</i>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment