Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
47812df
Add files via upload
kpp-arnut May 7, 2026
2ed354e
Add configuration for Supabase and Google client
kpp-arnut May 7, 2026
b65b46e
Update css
kpp-arnut May 7, 2026
b7b0b73
Add initial CSS styles for the application
kpp-arnut May 7, 2026
5fce0db
clean code
kpp-arnut May 7, 2026
b288f49
Remove duplicate script tags in index.html
kpp-arnut May 7, 2026
2ec4b9f
Add defer attribute to script tags in index.html
kpp-arnut May 7, 2026
90a60c8
Rename confic.js to config.js
kpp-arnut May 7, 2026
72e405e
Update student action buttons in table
kpp-arnut May 7, 2026
30f4ab6
Implement add and edit student modal functionality
kpp-arnut May 7, 2026
9661f58
Update button onclick to use openAddStudentModal
kpp-arnut May 7, 2026
51410da
Implement functions for adding and editing students
kpp-arnut May 7, 2026
d4d92ae
Fix behaviorScore assignment for null/undefined values
kpp-arnut May 7, 2026
b65fefd
Change button onclick from openAddStudentModal to prepareAddStudent
kpp-arnut May 7, 2026
a6d1ad4
Remove editStudent function from script.js
kpp-arnut May 7, 2026
4f45955
Refactor student modal and assignment handling
kpp-arnut May 7, 2026
0801632
Refactor style.css for design enhancements
kpp-arnut May 7, 2026
8223510
Refactor CSS variables and styles for improved design
kpp-arnut May 7, 2026
7359cce
Refactor CSS variables and styles for consistency
kpp-arnut May 7, 2026
eae8525
Refactor CSS variables and styles for UI improvements
kpp-arnut May 7, 2026
00aa5a9
Refactor color variables and update styles
kpp-arnut May 7, 2026
0ee1a38
Update color scheme and styles in style.css
kpp-arnut May 7, 2026
aafeb51
Refactor color variables and styles in CSS
kpp-arnut May 7, 2026
302c4aa
Refine styles for dna-dot and animations
kpp-arnut May 7, 2026
0efe356
Refactor header styles and button interactions
kpp-arnut May 7, 2026
1de804e
Refactor CSS styles for improved layout and design
kpp-arnut May 7, 2026
0208acb
Refactor CSS variables and improve styles
kpp-arnut May 7, 2026
8c4b236
Refactor DNA animation to use canvas element
kpp-arnut May 7, 2026
f16b406
Revamp header and navigation styles
kpp-arnut May 7, 2026
4684006
Update header styles and navigation button design
kpp-arnut May 7, 2026
9e9bb6e
major upgrade style for all screen
kpp-arnut May 7, 2026
d912d16
Add canvas for DNA visualization
kpp-arnut May 7, 2026
508c50a
Add DNA animation rendering to dna.js
kpp-arnut May 7, 2026
124c2be
Clean up style.css and enhance responsiveness
kpp-arnut May 7, 2026
ea0537b
Include dna.js script in index.html
kpp-arnut May 7, 2026
3fc2660
Refactor styles for improved UI consistency
kpp-arnut May 7, 2026
5be87f3
Implement grade row management for students
kpp-arnut May 7, 2026
344b6ee
Remove emoji from status header in index.html
kpp-arnut May 7, 2026
a9b7074
remove redundancy
kpp-arnut May 7, 2026
2d2eb15
Add scripts for ExcelJS and FileSaver.js
kpp-arnut May 7, 2026
59d1990
Refactor Excel export functions for clarity and structure
kpp-arnut May 7, 2026
b0b1332
Enhance detectCategory function with new keywords
kpp-arnut May 7, 2026
9a2b495
Refactor detectCategory function for clarity
kpp-arnut May 7, 2026
60b5378
Refactor style.css by removing comments and updating styles
kpp-arnut May 7, 2026
b43122c
Remove checkmark from toast messages
kpp-arnut May 8, 2026
3826778
Refactor attendance report export function
kpp-arnut May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified KPP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// CONFIGURATION
const SUPABASE_URL = 'https://gfikiopjopxhogrhpcpx.supabase.co';
const SUPABASE_KEY = 'sb_publishable_6pccrfn1Ng_FXHugztRsmw__kW_TtAL';
const GOOGLE_CLIENT_ID = '292294403643-n756epva6fet5p7clkao3r2damoeai0r.apps.googleusercontent.com';

const _sb = supabase.createClient(SUPABASE_URL, SUPABASE_KEY);
210 changes: 210 additions & 0 deletions dna.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
(function () {
const canvas = document.getElementById('dna-canvas');
if (!canvas) return;

const wrap = canvas.parentElement;
const ctx = canvas.getContext('2d');

let animationId = null;
let t = 0;
let isRunning = false;

function resizeCanvas() {
const rect = wrap.getBoundingClientRect();
const dpr = window.devicePixelRatio || 1;

canvas.width = Math.max(1, Math.floor(rect.width * dpr));
canvas.height = Math.max(1, Math.floor(rect.height * dpr));

canvas.style.width = rect.width + 'px';
canvas.style.height = rect.height + 'px';

ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.scale(dpr, dpr);
}

function render() {
const rect = wrap.getBoundingClientRect();
const W = rect.width;
const H = rect.height;
const cx = W / 2;

ctx.clearRect(0, 0, W, H);

const DOTS = Math.max(16, Math.floor(H / 42));
const SPACING = H / Math.max(1, DOTS - 1);
const AMPLITUDE = Math.min(W * 0.34, 38);
const PERIOD = H * 0.65;

const dots = [];

for (let i = 0; i < DOTS; i++) {
const y = i * SPACING;
const angle = (y / PERIOD) * Math.PI * 2 + t;

dots.push({
y,
x1: cx + Math.cos(angle) * AMPLITUDE,
z1: Math.sin(angle),
x2: cx + Math.cos(angle + Math.PI) * AMPLITUDE,
z2: Math.sin(angle + Math.PI)
});
}

for (const { y, x1, x2, z1, z2 } of dots) {
if (Math.abs(z1 - z2) < 0.4) {
const a = 0.08 + (1 - Math.abs(z1 - z2) / 0.4) * 0.12;
ctx.beginPath();
ctx.moveTo(x1, y);
ctx.lineTo(x2, y);
ctx.strokeStyle = `rgba(180,180,210,${a})`;
ctx.lineWidth = 1;
ctx.stroke();
}
}

const all = [];
for (const { y, x1, x2, z1, z2 } of dots) {
all.push({ x: x1, y, z: z1, strand: 1 });
all.push({ x: x2, y, z: z2, strand: 2 });
}

all.sort((a, b) => a.z - b.z);

for (const d of all) {
const dep = (d.z + 1) / 2;
const radius = 4 + dep * 7;

ctx.beginPath();
ctx.arc(d.x, d.y, radius, 0, Math.PI * 2);

ctx.fillStyle = d.strand === 1
? `rgba(224,224,240,${0.2 + dep * 0.75})`
: `rgba(255,255,255,${0.12 + dep * 0.5})`;

ctx.shadowColor = d.strand === 1
? 'rgba(224,224,240,0.55)'
: 'rgba(255,255,255,0.35)';
ctx.shadowBlur = dep * 12;

ctx.fill();
ctx.shadowBlur = 0;
}

t += 0.018;
animationId = requestAnimationFrame(render);
}

function start() {
if (isRunning) return;
isRunning = true;
resizeCanvas();
render();
}

function stop() {
if (!isRunning) return;
cancelAnimationFrame(animationId);
animationId = null;
isRunning = false;
}

const mediaReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');

function handleMotionPreference() {
if (mediaReducedMotion.matches) {
stop();
resizeCanvas();
renderStaticFrame();
} else {
start();
}
}

function renderStaticFrame() {
const rect = wrap.getBoundingClientRect();
const W = rect.width;
const H = rect.height;
const cx = W / 2;

ctx.clearRect(0, 0, W, H);

const DOTS = Math.max(16, Math.floor(H / 42));
const SPACING = H / Math.max(1, DOTS - 1);
const AMPLITUDE = Math.min(W * 0.34, 38);
const PERIOD = H * 0.65;

const dots = [];

for (let i = 0; i < DOTS; i++) {
const y = i * SPACING;
const angle = (y / PERIOD) * Math.PI * 2;

dots.push({
y,
x1: cx + Math.cos(angle) * AMPLITUDE,
z1: Math.sin(angle),
x2: cx + Math.cos(angle + Math.PI) * AMPLITUDE,
z2: Math.sin(angle + Math.PI)
});
}

for (const { y, x1, x2, z1, z2 } of dots) {
if (Math.abs(z1 - z2) < 0.4) {
const a = 0.08 + (1 - Math.abs(z1 - z2) / 0.4) * 0.12;
ctx.beginPath();
ctx.moveTo(x1, y);
ctx.lineTo(x2, y);
ctx.strokeStyle = `rgba(180,180,210,${a})`;
ctx.lineWidth = 1;
ctx.stroke();
}
}

const all = [];
for (const { y, x1, x2, z1, z2 } of dots) {
all.push({ x: x1, y, z: z1, strand: 1 });
all.push({ x: x2, y, z: z2, strand: 2 });
}

all.sort((a, b) => a.z - b.z);

for (const d of all) {
const dep = (d.z + 1) / 2;
const radius = 4 + dep * 7;

ctx.beginPath();
ctx.arc(d.x, d.y, radius, 0, Math.PI * 2);

ctx.fillStyle = d.strand === 1
? `rgba(224,224,240,${0.2 + dep * 0.75})`
: `rgba(255,255,255,${0.12 + dep * 0.5})`;

ctx.fill();
}
}

let resizeTimer;
window.addEventListener('resize', () => {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(() => {
resizeCanvas();
}, 100);
});

document.addEventListener('visibilitychange', () => {
if (document.hidden) {
stop();
} else if (!mediaReducedMotion.matches) {
start();
}
});

if (typeof mediaReducedMotion.addEventListener === 'function') {
mediaReducedMotion.addEventListener('change', handleMotionPreference);
} else if (typeof mediaReducedMotion.addListener === 'function') {
mediaReducedMotion.addListener(handleMotionPreference);
}

handleMotionPreference();
})();
Loading
Loading