@prosophia/lab-techy 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ // src/components/ClientLayout.tsx
2
+ import { useEffect } from "react";
3
+ import { ThemeProvider, useTheme as useTheme2 } from "next-themes";
4
+
5
+ // src/components/Header.tsx
6
+ import Link from "next/link";
7
+ import { usePathname } from "next/navigation";
8
+ import { motion as motion2 } from "framer-motion";
9
+ import styles2 from "./Header.module.css";
10
+
11
+ // src/components/ThemeToggle.tsx
12
+ import { motion } from "framer-motion";
13
+ import { useTheme } from "next-themes";
14
+ import styles from "./ThemeToggle.module.css";
15
+ import { jsx } from "react/jsx-runtime";
16
+ function ThemeToggle() {
17
+ const { resolvedTheme, setTheme } = useTheme();
18
+ const toggleTheme = () => {
19
+ setTheme(resolvedTheme === "light" ? "dark" : "light");
20
+ };
21
+ return /* @__PURE__ */ jsx(
22
+ motion.button,
23
+ {
24
+ className: styles.toggle,
25
+ onClick: toggleTheme,
26
+ whileHover: { scale: 1.05 },
27
+ whileTap: { scale: 0.95 },
28
+ "aria-label": `Switch to ${resolvedTheme === "light" ? "dark" : "light"} mode`,
29
+ children: /* @__PURE__ */ jsx("span", { className: "material-symbols-outlined", children: resolvedTheme === "light" ? "dark_mode" : "light_mode" })
30
+ }
31
+ );
32
+ }
33
+
34
+ // src/components/Header.tsx
35
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
36
+ var defaultNavItems = [
37
+ { href: "/", label: "Home" },
38
+ { href: "/gallery", label: "Gallery" },
39
+ { href: "/team", label: "Team" },
40
+ { href: "/publications", label: "Publications" },
41
+ { href: "/news", label: "News" },
42
+ { href: "/contact", label: "Contact" }
43
+ ];
44
+ function Header({ navigationData }) {
45
+ const pathname = usePathname();
46
+ const labName = navigationData?.labName || "Prosophia Research Lab";
47
+ const navItems = navigationData?.mainNavigation?.length ? navigationData.mainNavigation : defaultNavItems;
48
+ return /* @__PURE__ */ jsx2(
49
+ motion2.header,
50
+ {
51
+ className: styles2.header,
52
+ initial: { y: -100, opacity: 0 },
53
+ animate: { y: 0, opacity: 1 },
54
+ transition: { duration: 0.5, ease: [0.16, 1, 0.3, 1] },
55
+ children: /* @__PURE__ */ jsxs("div", { className: styles2.container, children: [
56
+ /* @__PURE__ */ jsxs(Link, { href: "/", className: styles2.logo, children: [
57
+ /* @__PURE__ */ jsx2("div", { className: styles2.logoIcon, children: /* @__PURE__ */ jsx2("span", { className: "material-symbols-outlined", children: "science" }) }),
58
+ /* @__PURE__ */ jsx2("h1", { className: styles2.logoText, children: labName })
59
+ ] }),
60
+ /* @__PURE__ */ jsxs("nav", { className: styles2.nav, children: [
61
+ /* @__PURE__ */ jsx2("div", { className: styles2.navLinks, children: navItems.map((item) => /* @__PURE__ */ jsx2(
62
+ Link,
63
+ {
64
+ href: item.href,
65
+ className: `${styles2.navLink} ${pathname === item.href ? styles2.navLinkActive : ""}`,
66
+ children: item.label
67
+ },
68
+ item.href
69
+ )) }),
70
+ /* @__PURE__ */ jsx2(ThemeToggle, {}),
71
+ /* @__PURE__ */ jsx2(Link, { href: "/contact", children: /* @__PURE__ */ jsx2(
72
+ motion2.button,
73
+ {
74
+ className: styles2.ctaButton,
75
+ whileHover: { scale: 1.02 },
76
+ whileTap: { scale: 0.98 },
77
+ children: "Join the Lab"
78
+ }
79
+ ) })
80
+ ] }),
81
+ /* @__PURE__ */ jsxs("div", { className: styles2.mobileActions, children: [
82
+ /* @__PURE__ */ jsx2(ThemeToggle, {}),
83
+ /* @__PURE__ */ jsx2("button", { className: styles2.mobileMenuBtn, children: /* @__PURE__ */ jsx2("span", { className: "material-symbols-outlined", children: "menu" }) })
84
+ ] })
85
+ ] })
86
+ }
87
+ );
88
+ }
89
+
90
+ // src/components/Footer.tsx
91
+ import Link2 from "next/link";
92
+ import { motion as motion3 } from "framer-motion";
93
+ import styles3 from "./Footer.module.css";
94
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
95
+ var footerVariants = {
96
+ hidden: { opacity: 0, y: 20 },
97
+ visible: {
98
+ opacity: 1,
99
+ y: 0,
100
+ transition: {
101
+ duration: 0.6,
102
+ ease: [0.16, 1, 0.3, 1]
103
+ }
104
+ }
105
+ };
106
+ function getSocialIcon(platform) {
107
+ switch (platform) {
108
+ case "twitter":
109
+ return /* @__PURE__ */ jsx3("svg", { "aria-hidden": "true", fill: "currentColor", viewBox: "0 0 24 24", className: styles3.socialIcon, children: /* @__PURE__ */ jsx3("path", { d: "M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" }) });
110
+ case "github":
111
+ return /* @__PURE__ */ jsx3("svg", { "aria-hidden": "true", fill: "currentColor", viewBox: "0 0 24 24", className: styles3.socialIcon, children: /* @__PURE__ */ jsx3("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" }) });
112
+ case "linkedin":
113
+ return /* @__PURE__ */ jsx3("svg", { "aria-hidden": "true", fill: "currentColor", viewBox: "0 0 24 24", className: styles3.socialIcon, children: /* @__PURE__ */ jsx3("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" }) });
114
+ case "youtube":
115
+ return /* @__PURE__ */ jsx3("svg", { "aria-hidden": "true", fill: "currentColor", viewBox: "0 0 24 24", className: styles3.socialIcon, children: /* @__PURE__ */ jsx3("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }) });
116
+ case "scholar":
117
+ return /* @__PURE__ */ jsx3("svg", { "aria-hidden": "true", fill: "currentColor", viewBox: "0 0 24 24", className: styles3.socialIcon, children: /* @__PURE__ */ jsx3("path", { d: "M5.242 13.769L0 9.5 12 0l12 9.5-5.242 4.269C17.548 11.249 14.978 9.5 12 9.5c-2.977 0-5.548 1.748-6.758 4.269zM12 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14z" }) });
118
+ default:
119
+ return /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", strokeWidth: "2", className: styles3.socialIcon, children: [
120
+ /* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "10" }),
121
+ /* @__PURE__ */ jsx3("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
122
+ /* @__PURE__ */ jsx3("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
123
+ ] });
124
+ }
125
+ }
126
+ var defaultSocialLinks = [
127
+ { platform: "twitter", url: "#" },
128
+ { platform: "github", url: "#" },
129
+ { platform: "linkedin", url: "#" }
130
+ ];
131
+ function Footer({ footerData }) {
132
+ const labName = footerData?.labName || "Prosophia Research Lab";
133
+ const footerText = footerData?.footerText || "Advancing the frontiers of human-computer interaction through interdisciplinary research and innovation.";
134
+ const socialLinks = footerData?.socialLinks?.length ? footerData.socialLinks : defaultSocialLinks;
135
+ return /* @__PURE__ */ jsx3(
136
+ motion3.footer,
137
+ {
138
+ className: styles3.footer,
139
+ initial: "hidden",
140
+ whileInView: "visible",
141
+ viewport: { once: true },
142
+ variants: footerVariants,
143
+ children: /* @__PURE__ */ jsxs2("div", { className: styles3.container, children: [
144
+ /* @__PURE__ */ jsxs2("div", { className: styles3.grid, children: [
145
+ /* @__PURE__ */ jsxs2("div", { className: styles3.brandSection, children: [
146
+ /* @__PURE__ */ jsxs2("div", { className: styles3.logo, children: [
147
+ /* @__PURE__ */ jsx3("div", { className: styles3.logoIcon, children: /* @__PURE__ */ jsx3("span", { className: "material-symbols-outlined", children: "science" }) }),
148
+ /* @__PURE__ */ jsx3("h2", { className: styles3.logoText, children: labName })
149
+ ] }),
150
+ /* @__PURE__ */ jsx3("p", { className: styles3.description, children: footerText }),
151
+ /* @__PURE__ */ jsx3("div", { className: styles3.socialLinks, children: socialLinks.map((social, index) => /* @__PURE__ */ jsx3(
152
+ "a",
153
+ {
154
+ href: social.url,
155
+ className: styles3.socialLink,
156
+ "aria-label": social.platform,
157
+ target: "_blank",
158
+ rel: "noopener noreferrer",
159
+ children: getSocialIcon(social.platform)
160
+ },
161
+ index
162
+ )) })
163
+ ] }),
164
+ /* @__PURE__ */ jsxs2("div", { className: styles3.linksSection, children: [
165
+ /* @__PURE__ */ jsx3("h3", { className: styles3.linksSectionTitle, children: "Research" }),
166
+ /* @__PURE__ */ jsxs2("ul", { className: styles3.linksList, children: [
167
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/research", className: styles3.link, children: "Projects" }) }),
168
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/publications", className: styles3.link, children: "Publications" }) }),
169
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/publications", className: styles3.link, children: "Datasets" }) }),
170
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/publications", className: styles3.link, children: "Code" }) })
171
+ ] })
172
+ ] }),
173
+ /* @__PURE__ */ jsxs2("div", { className: styles3.linksSection, children: [
174
+ /* @__PURE__ */ jsx3("h3", { className: styles3.linksSectionTitle, children: "People" }),
175
+ /* @__PURE__ */ jsxs2("ul", { className: styles3.linksList, children: [
176
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/team", className: styles3.link, children: "Faculty" }) }),
177
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/team", className: styles3.link, children: "Students" }) }),
178
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/team", className: styles3.link, children: "Alumni" }) }),
179
+ /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link2, { href: "/contact", className: styles3.link, children: "Join Us" }) })
180
+ ] })
181
+ ] })
182
+ ] }),
183
+ /* @__PURE__ */ jsx3("div", { className: styles3.bottom, children: /* @__PURE__ */ jsxs2("p", { className: styles3.copyright, children: [
184
+ "\xA9 ",
185
+ (/* @__PURE__ */ new Date()).getFullYear(),
186
+ " ",
187
+ labName,
188
+ ". All rights reserved."
189
+ ] }) })
190
+ ] })
191
+ }
192
+ );
193
+ }
194
+
195
+ // src/components/ClientLayout.tsx
196
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
197
+ function ThemeBodySync() {
198
+ const { resolvedTheme } = useTheme2();
199
+ useEffect(() => {
200
+ if (resolvedTheme === "dark") {
201
+ document.body.classList.add("dark-mode");
202
+ document.body.classList.remove("light-mode");
203
+ } else {
204
+ document.body.classList.add("light-mode");
205
+ document.body.classList.remove("dark-mode");
206
+ }
207
+ }, [resolvedTheme]);
208
+ return null;
209
+ }
210
+ function ClientLayout({ children, settings }) {
211
+ const navigationData = {
212
+ labName: settings.labName || "Prosophia Research Lab"
213
+ };
214
+ const footerData = {
215
+ labName: settings.labName || "Prosophia Research Lab",
216
+ footerText: settings.footerText
217
+ };
218
+ return /* @__PURE__ */ jsxs3(ThemeProvider, { attribute: "class", defaultTheme: "light", enableSystem: false, children: [
219
+ /* @__PURE__ */ jsx4(ThemeBodySync, {}),
220
+ /* @__PURE__ */ jsxs3("div", { className: "pageWrapper", children: [
221
+ /* @__PURE__ */ jsx4(Header, { navigationData }),
222
+ /* @__PURE__ */ jsx4("main", { children }),
223
+ /* @__PURE__ */ jsx4(Footer, { footerData })
224
+ ] })
225
+ ] });
226
+ }
227
+
228
+ // src/layouts/RootLayout.tsx
229
+ import { jsx as jsx5 } from "react/jsx-runtime";
230
+ function RootLayout({
231
+ children,
232
+ settings = null
233
+ }) {
234
+ return /* @__PURE__ */ jsx5(ClientLayout, { settings: settings || {}, children });
235
+ }
236
+ export {
237
+ RootLayout
238
+ };