diff --git a/functions/index.js b/functions/index.js index 53a93b5..c82e7fb 100644 --- a/functions/index.js +++ b/functions/index.js @@ -211,6 +211,50 @@ exports.getLinksPage = onCall( }, ); +// Application Database ID +const APPLICATION_DATABASE_ID = "270dc74ea0ae803e8904e40ebe203011"; + +// Helper function to create page properties +function createPageProperties(pageData) { + const properties = { + Name: { + title: [{ + text: { content: pageData.name } + }] + }, + Email: { + email: pageData.email + }, + Status: { + select: { name: "Pending" } + }, + "Submission Date": { + date: { start: new Date().toISOString() } + } + }; + + // Add optional fields if provided + if (pageData.role) { + properties.Role = { + select: { name: pageData.role } + }; + } + + if (pageData.motivation && pageData.motivation.trim()) { + properties["Why are you applying?"] = { + rich_text: [{ + text: { content: pageData.motivation } + }] + }; + } + + return properties; +} + + + + + // exports.setRiserData = onCall(async (req) => { // console.log(req.data.name); // const result = { diff --git a/functions/test.js b/functions/test.js new file mode 100644 index 0000000..8f529ab --- /dev/null +++ b/functions/test.js @@ -0,0 +1,10 @@ +// Simple test file for the application API functions +const { createNewPage, getPageByID, deletePage } = require('./index'); + +// Test data +const testApplicationData = { + name: "John Doe", + email: "john.doe@example.com", + role: "Education", + motivation: "I want to help organize amazing hackathons and contribute to the tech community." +}; diff --git a/public/img/applyBanner.jpg b/public/img/applyBanner.jpg new file mode 100644 index 0000000..8770d7b Binary files /dev/null and b/public/img/applyBanner.jpg differ diff --git a/src/index.css b/src/index.css index 0a33149..36e9e1d 100644 --- a/src/index.css +++ b/src/index.css @@ -16,3 +16,11 @@ -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; } + +body { + padding-right: 0 !important; +} + +header { + padding-right: 0 !important; +} \ No newline at end of file diff --git a/src/layouts/Layout.tsx b/src/layouts/Layout.tsx index 1db19a4..9dfd6b6 100644 --- a/src/layouts/Layout.tsx +++ b/src/layouts/Layout.tsx @@ -94,13 +94,34 @@ const Layout = () => { const sponsorPills: NavbarPillProps[] = []; const blogPills: NavbarPillProps[] = []; + + const joinusPills: NavbarPillProps[] = [ + { + title: "Membership", + desc: "Become a member!", + Icon: FaFlag, + image: "/img/temp-bg.jpg", + link: "https://umsu.unimelb.edu.au/buddy-up/clubs/clubs-listing/join/hackmelbourne/", + }, + { + title: "Officer Applications", + desc: "Apply for an officer role!", + Icon: FaUser, + image: "/img/temp-bg.jpg", + link: "/apply", + }, + ]; + // TODO: Parse empty string as "do not route" to support nav options that should ONLY offer pills. const nav = { clubname: "HackMelbourne", logo: "/img/HM_White_Transparent.png", pages: ["About", "Blog", "Calendar", "Sponsors", "Links"], links: ["/about/meettheteam", "/blogs", "/upcoming/calendar", "/sponsors", "upcoming/links"], pills: [aboutPills, linkPills, calendarPills, sponsorPills, blogPills], + // pages: ["About", "Blog", "Calendar", "Sponsors", "Links", "Join Us"], + // links: ["/about/meettheteam", "/blogs", "/upcoming/calendar", "/sponsors", "upcoming/links", "/apply"], + // pills: [aboutPills, linkPills, calendarPills, sponsorPills, blogPills, joinusPills], }; const footer = { diff --git a/src/layouts/Navbar.tsx b/src/layouts/Navbar.tsx index 504a30c..5eedf3e 100644 --- a/src/layouts/Navbar.tsx +++ b/src/layouts/Navbar.tsx @@ -139,7 +139,7 @@ const Navbar = ({ clubname, logo, pages, links, pills }: Nav) => {
- {clubname} + {/* {clubname} */}