add navigation on internify header: navigation to home from humic logo +

crosscheck line code
This commit is contained in:
Kemas M. Aryadary Rasyad
2026-07-22 02:15:11 +07:00
parent 4170a93173
commit e396914609
22 changed files with 220 additions and 235 deletions
+12 -11
View File
@@ -5,38 +5,39 @@ import logoHumic from "../assets/logo.png";
const internshipLinks = [
{ label: "Beranda", path: "/" },
{ label: "Tentang", path: "/about-us" },
{ label: "Life At Humic", path: "/our-developer" },
{ label: "Life At Humic", path: "" },
{ label: "Our Developer", path: "/our-developer" }
];
const externalLinks = [
{ label: "Humic Website", href: "https://humic.telkomuniversity.ac.id/" },
{ label: "Our Activity", href: "https://humic.telkomuniversity.ac.id/humicinmedia/" },
{ label: "Life At Humic", href: "#" },
{ label: "Our Developer", href: "#" },
{ label: "Life At Humic", href: "" },
// { label: "Our Developer", href: "#" },
];
const socials = [
{ label: "Instagram", icon: FaInstagram, href: "https://www.instagram.com/humicengineering/" },
{ label: "LinkedIn", icon: FaLinkedin, href: "https://www.linkedin.com/company/humic-engineering/" },
{ label: "Email", icon: FaRegEnvelope, href: "#" },
{ label: "Email", icon: FaRegEnvelope, href: "" },
];
export function FooterIntern() {
return (
<footer className="bg-white border-t border-gray-300 px-14 py-8 flex gap-12 flex-wrap">
{/* Brand info */}
<div className="flex flex-col gap-2 flex-shrink-0 w-70 items-start">
<div className="flex flex-col gap-1 flex-shrink-0 w-70 items-start">
<img
src={logoHumic}
alt="logo humic"
className="w-[160px]"
className="w-[130px]"
/>
<address className="text-xs text-gray-800 leading-relaxed not-italic">
<address className="text-[13px] text-gray-800 not-italic mt-[10px]">
Gedung Kultubai Selatan, Blok F
Jl. Telekomunikasi, Terusan Buah Batu Bandung
Jawa Barat, Indonesia. 40257
</address>
<div className="flex gap-2 mt-1">
<div className="flex gap-2 mt-[13px]">
{socials.map(({ label, icon: Icon, href }) => (
<a
key={label}
@@ -56,7 +57,7 @@ export function FooterIntern() {
<div className="flex gap-12 flex-1 justify-end flex-wrap">
<div className="flex flex-col gap-2 min-w-[140px]">
<p className="text-[13px] font-bold text-gray-900">Internship</p>
<ul className="flex flex-col gap-0.5">
<ul className="flex flex-col gap-0.5 font-semibold">
{internshipLinks.map(({ label, path }) => (
<li key={label}>
<Link
@@ -71,8 +72,8 @@ export function FooterIntern() {
</div>
<div className="flex flex-col gap-2 min-w-[140px]">
<p className="text-[13px] font-bold text-gray-900">Eksternal</p>
<ul className="flex flex-col gap-0.5">
<p className="text-[13px] font-bold text-gray-900">Lainnya</p>
<ul className="flex flex-col gap-0.5 font-semibold">
{externalLinks.map(({ label, href }) => (
<li key={label}>
<a
+3 -1
View File
@@ -32,7 +32,9 @@ export default function Header({ toggleSidebar }: { toggleSidebar: () => void })
<Menu className="w-6 h-6" />
</button>
<button>
<button
onClick={() => nav("")}
>
<img src={humiclogo} alt="Humic Logo" className="w-[120px] cursor-pointer" />
</button>
</div>
+7 -7
View File
@@ -22,7 +22,7 @@ const Navbar = () => {
};
return (
<nav className="bg-[#D7E1E8] px-4 py-5 mx-5 rounded-2xl shadow-md">
<nav className="bg-[#D7E1E8] px-10 py-5 mx-5 rounded-2xl shadow-md">
<div className="max-w-8xl mx-auto flex items-center justify-between">
<img
src={humiclogo}
@@ -56,22 +56,22 @@ const Navbar = () => {
</div>
{/* Desktop menu */}
<div className="hidden md:flex items-center gap-6 text-[18px] font-semibold">
<div className="hidden md:flex items-center gap-8 text-[18px] font-semibold">
<button
onClick={() => navigate("/about-us")}
className="hover:text-blue-600 transition cursor-pointer"
className="hover:text-gray-600 transition cursor-pointer"
>
About Us
</button>
<button
onClick={handleContactClick}
className="hover:text-blue-600 transition cursor-pointer"
className="hover:text-gray-600 transition cursor-pointer"
>
Contact Us
</button>
<button
onClick={() => navigate("/internships")}
className="hover:text-blue-600 transition cursor-pointer"
className="hover:text-gray-600 transition cursor-pointer"
>
Internship
</button>
@@ -80,7 +80,7 @@ const Navbar = () => {
onClick={() => {
navigate("/login-internify");
}}
className="block w-full text-left hover:text-red-600 transition"
className="hover:text-red-600 transition cursor-pointer"
>
Portal LMS
</button>
@@ -125,7 +125,7 @@ const Navbar = () => {
}}
className="block w-full text-left hover:text-red-600 transition"
>
Login
Portal LMS
</button>
</div>
)}
-2
View File
@@ -1,5 +1,3 @@
// src/components/common/Avatar.tsx
export default function Avatar({ initials }: { initials: string }) {
return (
<div className="w-10 h-10 rounded-full flex items-center justify-center text-xs text-white flex-shrink-0 bg-primary">
-2
View File
@@ -29,7 +29,6 @@ const TaskBreadcrumb = ({ match }: BreadcrumbMatch) => {
return <>{task?.title ?? unslugify(taskSlug)}</>;
};
// Breadcrumb untuk halaman detail sertifikat (menggunakan nama project dari slug)
const CertBreadcrumb = ({ match }: BreadcrumbMatch) => {
const { projects } = useProjects();
const slug = match.params.slug;
@@ -37,7 +36,6 @@ const CertBreadcrumb = ({ match }: BreadcrumbMatch) => {
return <>{project?.project_name ?? unslugify(slug)}</>;
};
// Breadcrumb untuk halaman submission intern (unslugify nameIntern)
const NameInternBreadcrumb = ({ match }: BreadcrumbMatch) => {
return <>{unslugify(match.params.nameIntern)}</>;
};
-1
View File
@@ -8,7 +8,6 @@ interface FAQ {
created_at: string;
}
// Skeleton item that mirrors the real FAQ card shape
function FAQSkeleton() {
return (
<div className="relative shadow-md py-5 px-10 rounded-md bg-white border-l-6 border-gray-200 animate-pulse">
+6 -6
View File
@@ -58,9 +58,9 @@ export default function InternifyLogin() {
};
return (
<div className="min-h-screen bg-background flex flex-col justify-between items-center py-12 px-4 font-sans selection:bg-red-foreground">
<div className="w-full flex flex-col items-center">
<div className="text-center mb-12">
<div className="min-h-screen bg-background flex flex-col justify-between items-center py-6 px-4 selection:bg-red-foreground">
<div className="w-full flex flex-col items-center mb-8">
<div className="text-center mb-8">
<div className="flex items-center justify-center gap-2 font-bold text-2xl tracking-tight text-black">
<img src={logo} alt="Logo" />
</div>
@@ -129,9 +129,9 @@ export default function InternifyLogin() {
</form>
{/* Forgot Password */}
<div className="text-center mt-6">
<a href="#" className="text-xs font-semibold text-red-600 hover:underline">
<span className="text-xs font-semibold text-red-600">
Forgot Password?
</a>
</span>
</div>
{/* Divider & Support */}
@@ -144,7 +144,7 @@ export default function InternifyLogin() {
<div className="flex-grow border-t border-card-outline"></div>
</div>
<button className="w-full mt-2 flex items-center justify-center gap-2 border border-card-outline rounded-full py-1.5 text-xs text-font-shade hover:bg-gray-50 transition-colors font-medium">
<button className="w-full mt-2 flex items-center justify-center gap-2 border border-card-outline rounded-full py-1.5 text-xs text-font-shade font-medium">
<CircleQuestionMark className="w-5 h-5" />
Frequently Asked Questions
</button>
+1 -1
View File
@@ -41,7 +41,7 @@ export default function ProjectsPage() {
<h1 className="page-title-desc">View assigned projects and track their progress.</h1>
</div>
<div className="flex flex-wrap gap-4 items-stretch">
<div className="flex flex-wrap gap-3 items-stretch">
{renderContent()}
</div>
</div>
@@ -87,7 +87,7 @@ export default function MentorProjectsPage() {
</button>
</div>
<div className="flex flex-wrap gap-4 items-stretch">{renderContent()}</div>
<div className="flex flex-wrap gap-3 items-stretch">{renderContent()}</div>
{isModalOpen && (
<CreateProjectModal
@@ -216,7 +216,7 @@ export default function CertificateDetail() {
</button>
)}
{/* ── Project Scope ── */}
{/* Project Scope */}
<div className="border border-card-outline rounded-xl p-5">
<p className="text-[13px] font-bold text-gray-400 uppercase tracking-widest mb-3">
Project Scope
@@ -45,7 +45,7 @@ export default function CertificateList() {
</p>
</div>
{/* Loading Skeleton — struktur sama persis dengan body */}
{/* Loading Skeleton - struktur sama persis dengan body */}
{loading && (
<div>
<div className="h-4 w-32 bg-gray-200 rounded mb-4 animate-pulse" />
@@ -73,7 +73,7 @@ export default function CertificateList() {
</div>
)}
{/* Section: List Projects — hanya tampil kalau ada project */}
{/* Section: List Projects - hanya tampil kalau ada project */}
{hasProjects && (
<div>
<h2 className="text-base font-bold text-font-shade mb-4">List Projects</h2>
@@ -8,7 +8,6 @@ import { FileText } from 'lucide-react';
export default function MentorForumTab({ project }: { project: Project }) {
const { tasks, loading, error } = useProjectTasks(project.id);
// Skeleton meniru layout final: kolom timeline 1/5 + list task card 4/5
const renderSkeleton = () => (
<div className="flex flex-col gap-7 md:flex-row md:items-start mt-5 animate-pulse">
<div className="w-full md:w-1/5 bg-white rounded-xl p-5 border border-box-border shrink-0">
@@ -29,14 +28,12 @@ export default function MentorForumTab({ project }: { project: Project }) {
</div>
);
// Empty hanya valid setelah loading selesai & tidak error
const isEmpty = !loading && !error && tasks.length === 0;
return (
<div>
<HeroProject title={project.project_name} description={project.description} />
{/* Kondisi eksklusif: hanya satu state tampil dalam satu waktu */}
{loading ? (
renderSkeleton()
) : error ? (
-1
View File
@@ -1,4 +1,3 @@
// utils/toast.tsx
import toast, { type Toast } from 'react-hot-toast';
import { FiX } from 'react-icons/fi';
import { FaCheck } from "react-icons/fa";
-1
View File
@@ -1,4 +1,3 @@
// hooks/useCertificates.ts
import { useState, useEffect, useCallback } from "react";
import type { Certificate, CertificateVerifyResult } from "../types/certificate.types";
import {
-1
View File
@@ -1,4 +1,3 @@
// hooks/useNotifications.ts
import { useState, useEffect, useCallback } from "react";
import {
getNotifications,
-1
View File
@@ -1,4 +1,3 @@
// hooks/useProject.ts
import { useState, useEffect, useCallback } from "react";
import type {
Project,
+2 -3
View File
@@ -1,4 +1,3 @@
// hooks/useTasks.ts
import { useState, useEffect, useCallback, useMemo } from "react";
import type {
ProjectTask,
@@ -46,7 +45,7 @@ export const useProjectTasks = (projectId: number) => {
refetch();
}, [refetch]);
return { tasks, loading, error, refetch }; // tambah refetch
return { tasks, loading, error, refetch };
};
// GET /task-api/tasks/{id}
@@ -276,7 +275,7 @@ export const useAllMentorTasks = (enabled: boolean) => {
const [error, setError] = useState<string | null>(null);
useEffect(() => {
if (!enabled) return; // tidak fetch kalau intern
if (!enabled) return;
setLoading(true);
getAllMentorTasks()
.then(setTasks)
+1 -2
View File
@@ -1,5 +1,4 @@
// hooks/useUser.ts
import { useState, useEffect, useCallback, useRef, useSyncExternalStore } from "react";
import { useState, useEffect, useCallback, useSyncExternalStore } from "react";
import { loginUser, getProfile, updateProfile } from "../services/UserService";
import type { Mahasiswa } from "../types/project.types";
import { getMahasiswa } from "../services/MahasiswaService";
-1
View File
@@ -1,4 +1,3 @@
// services/mahasiswa.service.ts
import api from '../lib/api';
import type { Mahasiswa, MahasiswaResponse } from "../types/project.types"
-1
View File
@@ -1,4 +1,3 @@
// services/ProjectService.ts
import api from "../lib/api";
import type {
Project,
-1
View File
@@ -1,4 +1,3 @@
// services/TaskService.ts
import api from "../lib/api";
import type {
ProjectTask,
-1
View File
@@ -1,4 +1,3 @@
// services/UserService.ts
import api from "../lib/api";
import type { CurrentUser, UpdateProfilePayload } from "../types/user.types";
import type { Mahasiswa, MahasiswaResponse } from "../types/project.types";