Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3b0e8fd
Fixed backend staff but UI is still broken
atapas Jul 12, 2023
8a5db2d
fix: routings
PriteshKiri Jul 12, 2023
705d403
idea like and comment fixes
koustov Jul 12, 2023
82c5bae
chore: change for harckrplay 2.0
PriteshKiri Jul 16, 2023
9536f81
retrieving ideas by hackathon id
koustov Jul 19, 2023
48fa721
retrieving ideas by hackathon id
koustov Jul 19, 2023
cdddd1b
Fixed idea status error
atapas Jul 19, 2023
f98df94
Merge branch 'hack-r-play-2.0' of github.com:reactplay/activities int…
atapas Jul 19, 2023
abe4dfe
chore: added registration to main route
PriteshKiri Jul 20, 2023
0c08c8b
chore: added registration button in ideas page
PriteshKiri Jul 20, 2023
113f149
fix: registration issue
PriteshKiri Jul 20, 2023
2e25020
Made changes in the text
atapas Jul 20, 2023
c28aeae
Corrected the logo for hack-r-play 2.0
atapas Jul 20, 2023
66c3e1c
fix: config info, judes, logo, filters
PriteshKiri Jul 20, 2023
7a6b7e1
Small changes in judges area
atapas Jul 21, 2023
8a32177
Fixed typo
atapas Jul 21, 2023
0c62db4
Updated OG
atapas Jul 21, 2023
d608fc0
Fixed more texts
atapas Jul 21, 2023
fb5f455
Added judges
atapas Jul 21, 2023
f81cb3d
More updates on judges
atapas Jul 21, 2023
ca4d545
Judges typo
atapas Jul 21, 2023
6eb756e
judges typo
atapas Jul 21, 2023
385082c
fix: added a text formator for idea desc
PriteshKiri Jul 21, 2023
363e808
fix: title in idea card clamped to 1 line
PriteshKiri Jul 21, 2023
76f9fd6
feat: user profile in headers
PriteshKiri Jul 21, 2023
8fcef08
fix: login profile
PriteshKiri Jul 23, 2023
abefa99
fix: updated judges
PriteshKiri Jul 23, 2023
a1b4916
fix: double quote & profile image issue
PriteshKiri Jul 25, 2023
9ed5d81
fix: updated judges section
PriteshKiri Jul 25, 2023
a050b1f
Update hackrplay23.js
atapas Jul 27, 2023
3dcedb5
fix: project filter
PriteshKiri Jul 27, 2023
a3384c6
fix: deadline and removed statuses
PriteshKiri Jul 28, 2023
3bafaa4
fix: deadline
PriteshKiri Jul 28, 2023
96d1cf5
feat: registration close
PriteshKiri Jul 28, 2023
b0a64a5
fix: updated deadline
PriteshKiri Jul 28, 2023
0d98120
chore: submit
PriteshKiri Aug 1, 2023
f22fd01
feat: prizes section
PriteshKiri Aug 3, 2023
ce26455
chore: updated judges
PriteshKiri Aug 4, 2023
817b097
edit and siubmit
atapas Aug 9, 2023
ffc3929
fixed completed status
atapas Aug 9, 2023
e2a2f38
Hideen the edit
atapas Aug 9, 2023
9e87187
fix: comment text
PriteshKiri Aug 11, 2023
9c61ccc
fix: complete filter
PriteshKiri Aug 12, 2023
aa293f2
fix: error
PriteshKiri Aug 12, 2023
d7a8227
fix: pagination on complete
PriteshKiri Aug 12, 2023
92e517b
fix: sort in completed tab
PriteshKiri Aug 12, 2023
f669bdd
Hiding completed
atapas Aug 13, 2023
2458674
Added back completed filter
atapas Aug 13, 2023
d94f72c
fix: removed filter
PriteshKiri Aug 14, 2023
f751f47
fix: removed submit
PriteshKiri Aug 14, 2023
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
2 changes: 1 addition & 1 deletion archive/pages/hackrplay/2022/registration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function Registration() {
? `:${process.env.NEXT_PUBLIC_DEV_PORT}`
: '';
const external_path = NHOST.AUTH_URL(
`${protocol}://${host}${port}/hackrplay/2022/registration`
`${protocol}://${host}${port}/event/22/hackrplay/registration`
);
window.location = external_path;
}
Expand Down
27 changes: 22 additions & 5 deletions components/Hack-R-Play/IdeaFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function IdeaFilters({
isAuthenticated,
}) {
const [filter, setFilter] = useState({});
const [completedActive, setCompletedActive] = useState(false);

useEffect(() => {}, [total]);

Expand All @@ -27,21 +28,37 @@ export default function IdeaFilters({

const onPageChanged = (index) => {
const fl = resetFilter();

if (completedActive) {
fl.status_filter = "completed";
}

fl.page = index;

setFilter({ ...fl });
invokeChange(fl);
};

const onOwnerChanged = (owner) => {
const fl = resetFilter();

fl.owner = owner;
setFilter({ ...fl });
invokeChange(fl);
if (owner === "completed") {
setCompletedActive(true);
fl.status_filter = owner;
setFilter({ ...fl });
invokeChange(fl);
} else {
fl.owner = owner;
setFilter({ ...fl });
invokeChange(fl);
}
};

const onSortChanged = (button) => {
const fl = resetFilter();
if (completedActive) {
fl.status_filter = "completed";
}
fl.sort_col = button.field;
fl.sort_asc = button.asc;
setFilter({ ...fl });
Expand Down Expand Up @@ -72,10 +89,10 @@ export default function IdeaFilters({
</div>
) : null}
<div className="flex-1 hidden md:block">
<StatusFilter
{/* <StatusFilter
onChange={(r) => onStatusFilterChanged(r)}
selected={filter.status_filter}
></StatusFilter>
></StatusFilter> */}
</div>
<div className="flex border-b-2 ">
<Pagination
Expand Down
28 changes: 24 additions & 4 deletions components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from "react";
import { AiOutlineMenu, AiOutlineClose } from "react-icons/ai";
import { PrimaryButton } from "./Buttons";
import Image from "next/image";

import { useUserData } from "@nhost/nextjs";
import { useRouter } from "next/router";

const MobileHeader = ({ links, setMobileActive, redirectToRegistration }) => {
Expand Down Expand Up @@ -40,24 +40,44 @@ const Header = ({ links, metainfo, secondary = false }) => {
const [mobileActive, setMobileActive] = useState(false);
const router = useRouter();
const redirectToRegistration = () => {
router.push("/hackrplay/2022/registration");
router.push("events/22/hackrplay/registration");
};

const userData = useUserData();

return (
<>
{secondary ? (
<header className="pt-4 pb-2 md:px-10 px-5 inline-flex justify-between items-center bg-transparent font-primary text-white z-10 w-full">
<header className="pt-8 pb-2 md:px-10 px-5 inline-flex justify-between items-center bg-transparent font-primary text-white z-10 w-full">
<div className="md:w-40 w-36 z-10">
<Link href={`/`}>
<a>
<Image
src={require(`/public/${metainfo.name}/NavbarLogo.png`)}
src={require(`/public/${metainfo.name}/BannerLogo.svg`)}
alt="Navbar Logo"
layout="responsive"
/>
</a>
</Link>
</div>

{userData && (
<div className="md:w-80 w-48 z-10 flex gap-4 items-center justify-end break-all">
<Image
className="rounded-full"
height={40}
width={40}
layout={"fixed"}
src={userData?.avatarUrl}
alt={"user avatar"}
aria-label="user avatar"
/>
<div>
<h4 className="text-[#00f2fe]">{userData?.displayName}</h4>
<p>{userData?.email}</p>
</div>
</div>
)}
</header>
) : (
<header className="pt-6 pb-1 px-4 flex md:justify-center justify-end items-baseline bg-transparent font-primary text-white z-10">
Expand Down
11 changes: 10 additions & 1 deletion components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ const Layout = ({ children, title, description, metainfo }) => {
<main>{children}</main>
<Footer />
</div>
) : null}
) : (
<>
<div className="h-[90vh] flex justify-center items-center p-[40px]">
<div
className="w-24 h-24 rounded-full animate-spin
border-y border-solid border-1 border-blue-500 border-t-transparent shadow-md"
></div>
</div>
</>
)}
</>
);
};
Expand Down
4 changes: 2 additions & 2 deletions components/LayoutWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const links = [
},
];

export default function LayoutWrapper({ title, description, children}) {
export default function LayoutWrapper({ title, description, children, metainfo}) {
return (
<Layout links={links} title={title} description={description}>
<Layout links={links} title={title} description={description} metainfo={metainfo}>
<div className='absolute left-9 -top-10 opacity-50'>
<Image
src={DottedAndFilledTriangle}
Expand Down
7 changes: 7 additions & 0 deletions components/OwnerFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ export default function OwnerFilter({ onChange, selected }) {
>
My Ideas
</ToolBarButton>
{/* <ToolBarButton
handleOnClick={() => onButtonClicked("completed")}
// disabled={selected === "me"}
cclas={selectedButton === "completed" ? `text-brand-hightlight` : ""}
>
Completed
</ToolBarButton> */}
</div>
);
}
20 changes: 20 additions & 0 deletions components/common/FormatDesc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ReactHtmlParser from "react-html-parser";
import { stripHtml } from "string-strip-html";

export function cleanHTMLInput(htmlInput) {
// Remove HTML tags and special characters
const strippedString = stripHtml(htmlInput).result;

// Convert HTML entities to plain text
const plainText = ReactHtmlParser(strippedString).join("");

// Remove newlines and extra spaces
const cleanedString = plainText
.replace(/\n/g, "")
.replace(/\s+/g, " ")
.replace(/"/g, "'")
.trim();
console.log(cleanedString);

return cleanedString;
}
4 changes: 2 additions & 2 deletions components/common/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ const Hero = ({ metainfo }) => {
</div>

<div className="flex flex-col justify-center items-center mx-auto md:pt-16 pt-8 md:max-w-3xl z-10">
<div className="scale-110">
<div className="scale-110 mb-4">
<Image src={ReactPlayLogo} alt="ReactPlay Logo" layout="fixed" />
</div>

<div className="-mt-3 block md:w-1/2 md:h-1/2 w-11/12 h-11/12">
<Image
src={require(`/public/${metainfo.name}/BannerLogo.png`)}
src={require(`/public/${metainfo.name}/BannerLogo.svg`)}
alt="Banner Logo"
layout="responsive"
/>
Expand Down
2 changes: 1 addition & 1 deletion components/common/Judges.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Judges = ({ metainfo }) => {
return (
<section
id="judges"
className={`relative mt-16 bg-brand-primary-highlight bg-opacity-10 flex flex-col justify-center items-center py-24 px-6`}
className={`relative bg-brand-primary-highlight bg-opacity-10 flex flex-col justify-center items-center py-24 px-6`}
>
<div className="absolute md:-left-16 md:top-6 -left-20 top-3">
<Image
Expand Down
2 changes: 1 addition & 1 deletion components/common/Partners.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Partners = ({ metainfo }) => {
<div className="md:w-2/5 md:h-2/5 w-1/2 h-1/2">
<a href={`${p.link}`} target="_blank" rel="noreferrer">
<Image
src={require(`/public/${metainfo.name}/partner0.png`)}
src={require(`/public/${metainfo.name}/bugfender-logo.png`)}
alt={`${p.display} logo`}
layout="responsive"
/>
Expand Down
34 changes: 34 additions & 0 deletions components/common/Prizes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";

const Prizes = ({ metainfo }) => {
let prizeList = metainfo?.prizes;

return (
<section
id="cta"
className="relative bg-brand-highlight mt-16 flex flex-col py-24 md:px-28 px-5 justify-center items-center overflow-clip "
>
<div className="container flex flex-col justify-center items-center gap-4 mx-auto max-w-screen-xl">
<h1 className="text-[#010326] font-primary text-5xl tracking-wider relative before:content[''] before:absolute before:w-1/4 before:h-1 before:-bottom-2 before:border-b-[3px] before:rounded-sm before:left-28 before:border-[#010326]">
Prizes and Rewards
</h1>
<div className="flex md:flex-row flex-col justify-center items-center md:mx-auto md:gap-12 gap-8 mt-16 flex-wrap justify-around md:w-auto w-[100%]">
{prizeList
? prizeList.map((item, i) => (
<div
key={i}
className="text-black bg-[#010326] !text-white p-6 py-10 rounded-xl text-center md:w-[27%] w-[80%]"
>
<p className="text-[50px]">{item?.icon}</p>
<h4 className="py-2 font-bold text-xl"> {item.position}</h4>
<p className="py-2 text-md">{item.prize}</p>
</div>
))
: "No prizes"}
</div>
</div>
</section>
);
};

export default Prizes;
Loading