Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GCM-KY
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
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
2024 Competition
GCM-KY
Commits
20cb6cbd
Commit
20cb6cbd
authored
3 months ago
by
Vishwaa Kannan
Browse files
Options
Downloads
Plain Diff
Merge branch 'gold' into 'main'
Gold See merge request
!63
parents
040dec73
b21668f3
Branches
lllhumanity-main-patch-32824
No related tags found
1 merge request
!63
Gold
Pipeline
#535480
passed
3 months ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
static/app.js
+81
-0
81 additions, 0 deletions
static/app.js
static/style.css
+80
-0
80 additions, 0 deletions
static/style.css
wiki/pages/home.html
+14
-0
14 additions, 0 deletions
wiki/pages/home.html
with
175 additions
and
0 deletions
static/app.js
+
81
−
0
View file @
20cb6cbd
...
@@ -82,3 +82,84 @@ setTimeout(() => {
...
@@ -82,3 +82,84 @@ setTimeout(() => {
const
textOverlay
=
document
.
querySelector
(
'
.carousel-text
'
);
const
textOverlay
=
document
.
querySelector
(
'
.carousel-text
'
);
textOverlay
.
style
.
display
=
'
none
'
;
textOverlay
.
style
.
display
=
'
none
'
;
},
3000
);
},
3000
);
// Following code was repurposed from this site:
//https://codingartistweb.com/2023/11/confetti-on-button-click/
const
canvas
=
document
.
getElementById
(
"
canvas
"
);
const
context
=
canvas
.
getContext
(
"
2d
"
);
const
closeButton
=
document
.
getElementById
(
"
close-popup
"
);
const
popupOverlay
=
document
.
getElementById
(
"
popup-overlay
"
);
const
goldPopup
=
document
.
getElementById
(
"
gold-popup
"
);
let
particles
=
[];
const
colors
=
[
"
#FFD700
"
,
"
#FFEC8B
"
,
"
#FFFACD
"
,
"
#E6B800
"
,
"
#FFC107
"
];
// Show popup after 3 seconds
window
.
onload
=
function
()
{
setTimeout
(()
=>
{
popupOverlay
.
style
.
display
=
"
block
"
;
goldPopup
.
style
.
display
=
"
block
"
;
},
3000
);
};
// Close popup and start confetti
closeButton
.
onclick
=
function
()
{
popupOverlay
.
style
.
display
=
"
none
"
;
goldPopup
.
style
.
display
=
"
none
"
;
startConfetti
();
};
// Adjust canvas size
window
.
addEventListener
(
"
resize
"
,
resizeCanvas
);
function
resizeCanvas
()
{
canvas
.
width
=
window
.
innerWidth
;
canvas
.
height
=
window
.
innerHeight
;
}
resizeCanvas
();
// Generate confetti particles
function
createConfetti
()
{
const
numberOfParticles
=
100
;
for
(
let
i
=
0
;
i
<
numberOfParticles
;
i
++
)
{
particles
.
push
(
new
Particle
());
}
}
function
Particle
()
{
this
.
x
=
Math
.
random
()
*
canvas
.
width
;
this
.
y
=
Math
.
random
()
*
canvas
.
height
;
this
.
size
=
Math
.
random
()
*
5
+
2
;
this
.
speedX
=
Math
.
random
()
*
2
-
1
;
this
.
speedY
=
Math
.
random
()
*
3
+
1
;
this
.
color
=
colors
[
Math
.
floor
(
Math
.
random
()
*
colors
.
length
)];
}
Particle
.
prototype
.
draw
=
function
()
{
context
.
beginPath
();
context
.
arc
(
this
.
x
,
this
.
y
,
this
.
size
,
0
,
Math
.
PI
*
2
);
context
.
fillStyle
=
this
.
color
;
context
.
fill
();
};
Particle
.
prototype
.
update
=
function
()
{
this
.
x
+=
this
.
speedX
;
this
.
y
+=
this
.
speedY
;
if
(
this
.
y
>
canvas
.
height
)
{
this
.
y
=
0
;
this
.
x
=
Math
.
random
()
*
canvas
.
width
;
}
};
function
startConfetti
()
{
createConfetti
();
requestAnimationFrame
(
animateConfetti
);
}
function
animateConfetti
()
{
context
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
particles
.
forEach
((
particle
)
=>
{
particle
.
update
();
particle
.
draw
();
});
requestAnimationFrame
(
animateConfetti
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
static/style.css
+
80
−
0
View file @
20cb6cbd
...
@@ -757,4 +757,84 @@ tr:nth-child(even) {
...
@@ -757,4 +757,84 @@ tr:nth-child(even) {
.center-txt
{
.center-txt
{
text-align
:
center
;
text-align
:
center
;
}
/* Popup container */
#gold-popup
{
position
:
fixed
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
300px
;
background-color
:
#fff
;
border-radius
:
15px
;
box-shadow
:
0
4px
10px
rgba
(
0
,
0
,
0
,
0.3
);
text-align
:
center
;
padding
:
20px
;
z-index
:
1000
;
display
:
none
;
/* Hidden by default */
}
#gold-popup
h2
{
color
:
#FFD700
;
font-size
:
24px
;
animation
:
glow
1.5s
infinite
;
}
#gold-popup
p
{
font-size
:
16px
;
color
:
#444
;
margin
:
10px
0
;
}
/* Background overlay */
#popup-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
z-index
:
999
;
display
:
none
;
/* Hidden by default */
}
/* Button to close popup */
#close-popup
{
background-color
:
#FFD700
;
color
:
#fff
;
border
:
none
;
border-radius
:
5px
;
padding
:
10px
15px
;
cursor
:
pointer
;
font-size
:
16px
;
margin-top
:
10px
;
}
#close-popup
:hover
{
background-color
:
#E6B800
;
}
/* Glow animation */
@keyframes
glow
{
0
%
{
text-shadow
:
0
0
10px
#FFD700
,
0
0
20px
#FFD700
,
0
0
30px
#FFD700
;
}
50
%
{
text-shadow
:
0
0
20px
#FFD700
,
0
0
30px
#FFD700
,
0
0
40px
#FFD700
;
}
100
%
{
text-shadow
:
0
0
10px
#FFD700
,
0
0
20px
#FFD700
,
0
0
30px
#FFD700
;
}
}
/* Canvas for confetti */
canvas
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
pointer-events
:
none
;
z-index
:
998
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wiki/pages/home.html
+
14
−
0
View file @
20cb6cbd
...
@@ -64,6 +64,20 @@
...
@@ -64,6 +64,20 @@
<body
style=
"color:white;"
>
<body
style=
"color:white;"
>
<!-- Overlay -->
<div
id=
"popup-overlay"
></div>
<!-- Popup -->
<div
id=
"gold-popup"
>
<h2>
We Won Gold!
</h2>
<p>
A huge thank you for those who supported our team! We are pleased to share this amazing achievement with you!
</p>
<button
id=
"close-popup"
>
Awesome!
</button>
</div>
<!-- Confetti Canvas -->
<canvas
id=
"canvas"
>
Canvas is not supported in your browser
</canvas>
<section
id=
"about-pfas"
class=
"content-section"
>
<section
id=
"about-pfas"
class=
"content-section"
>
<div>
<div>
<h2
style=
"margin-top: 0% !important;"
>
PFAS, a brief description
</h2>
<h2
style=
"margin-top: 0% !important;"
>
PFAS, a brief description
</h2>
...
...
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