Skip to content

Commit cc1aeae

Browse files
committed
fix various bugs
1 parent f22025b commit cc1aeae

File tree

6 files changed

+54
-13
lines changed

6 files changed

+54
-13
lines changed

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches:
6-
- main
6+
- master
77

88
jobs:
99
build:

src/App.css

+19
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,22 @@ code {
8585
.fadeIn {
8686
animation: fadeIn 1s ease-out forwards;
8787
}
88+
89+
.modal-enter-active {
90+
transform: translateY(0);
91+
opacity: 1;
92+
}
93+
94+
.modal-exit-active {
95+
transform: translateY(4);
96+
opacity: 0;
97+
}
98+
99+
/* @keyframes buttonHover {
100+
0% {
101+
color:lab(from color l a b);
102+
}
103+
100%{
104+
color: lab(from color l+200 a b);
105+
}
106+
} */

src/components/ApplyButton.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const ApplyButton = () => {
1212
return (
1313
<div className="text-center mt-8">
1414
<button onClick={openModal} className="bg-green-500 text-white py-2 px-4 rounded hover:bg-green-700">
15-
Apply Now
15+
Apply Now!
1616
</button>
1717
<Modal isOpen={isOpen} onClose={closeModal} onConfirm={handleConfirmClick}>
1818
<p className="mb-4">You are about to leave LuminAI. Do you want to proceed?</p>

src/pages/staff.jsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import React from 'react';
22

33
const Staff = () => (
4-
<div className="p-4 justify-center text-center">
5-
<h2 className="text-2xl font-bold mb-4">Meet Our Staff</h2>
4+
<div className="p-4 justify-center text-center"
5+
style={{animation: 'textPopIn 0.7s ease-in-out'}}
6+
>
7+
<h2 className="text-2xl font-bold mb-4">
8+
Meet Our Staff
9+
</h2>
610
<p>Information about our experienced instructors and staff members.</p>
11+
712
</div>
813
);
914

src/styles/tailwind.css

+3-9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
@tailwind utilities;
44

55
/* Add this to your tailwind.css or another CSS file */
6-
.modal-enter-active {
7-
transform: translateY(0);
8-
opacity: 1;
6+
.darken-slide {
7+
background-image: linear-gradient(to bottom, var(--tw-bg-opacity, 1) var(--tw-bg-opacity, 1) 50%, #3730a3 100%);
8+
animation: darkenSlide 1s forwards;
99
}
10-
11-
.modal-exit-active {
12-
transform: translateY(4);
13-
opacity: 0;
14-
}
15-

src/utils/colorUtils.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Utility function to convert hex to RGB
2+
export const hexToRgb = (hex) => {
3+
const bigint = parseInt(hex.slice(1), 16);
4+
const r = (bigint >> 16) & 255;
5+
const g = (bigint >> 8) & 255;
6+
const b = bigint & 255;
7+
return [r, g, b];
8+
};
9+
10+
// Utility function to convert RGB to hex
11+
export const rgbToHex = (r, g, b) => {
12+
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;
13+
};
14+
15+
// Function to darken a color by a percentage
16+
export const darkenColor = (hex, percent) => {
17+
const [r, g, b] = hexToRgb(hex);
18+
const newR = Math.max(0, Math.min(255, Math.floor(r * (1 - percent))));
19+
const newG = Math.max(0, Math.min(255, Math.floor(g * (1 - percent))));
20+
const newB = Math.max(0, Math.min(255, Math.floor(b * (1 - percent))));
21+
return rgbToHex(newR, newG, newB);
22+
};
23+

0 commit comments

Comments
 (0)