Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/autoclose profile #413

Merged
merged 59 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c8b297b
fix(deps): update dependency @aws-amplify/auth to v4 (#352)
renovate[bot] Mar 23, 2022
0504ac9
Feature: Added Dark theme (#365)
nichnarmada Mar 27, 2022
d789596
fix: clear search keywords when onclick related courses
YHhaoareyou Mar 27, 2022
fba8238
Merge branch 'master' into develop
YHhaoareyou Mar 27, 2022
4cc5b89
Merge branch 'master' into develop
YHhaoareyou Mar 29, 2022
bc8ecd7
Merge branch 'master' into develop
YHhaoareyou Mar 29, 2022
67b4a97
Debug: mobile dark mode debug (#373)
YHhaoareyou Apr 1, 2022
ed25abf
chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361)
renovate[bot] Apr 1, 2022
86a91f5
chore(deps): update dependency ts-loader to v9.2.8 (#359)
renovate[bot] Apr 1, 2022
374a41a
feat: remove unused dependencies (#377)
YHhaoareyou Apr 13, 2022
6632a95
Feature/darktheme colors (#378)
YHhaoareyou Apr 13, 2022
2f8dd9b
Merge branch 'master' into develop
YHhaoareyou Apr 17, 2022
8492b1c
Feature: Timetable dark theme (#379)
YHhaoareyou Apr 18, 2022
66db621
feat: add the hovering effect to the member cards (#381)
xinyue296 Apr 26, 2022
ef10256
Migrate from Webpack to Vite (#382)
YHhaoareyou May 2, 2022
84b2c1d
fix: env without using dotenv explicitly (#385)
YHhaoareyou May 5, 2022
c3abb53
fix: packages version
YHhaoareyou May 5, 2022
5993df1
fix: change env var name
YHhaoareyou May 5, 2022
76976ee
fix: remove systemjs package; add peer dependencies
YHhaoareyou May 5, 2022
e52cdef
fix: feeds domain on staging/prod
YHhaoareyou May 5, 2022
59fdef5
Feature: About Us page link from Home page & split Home from Root-con…
YHhaoareyou May 6, 2022
8252657
Feature/fix card padding (#388)
xinyue296 May 10, 2022
f509547
Merge branch 'master' into develop
YHhaoareyou May 17, 2022
25973a1
fix: install missing dependency: @aws-amplify/core
YHhaoareyou May 17, 2022
8f4caf8
fix: remove course function
YHhaoareyou May 18, 2022
e8a35a6
feat: alert translation
YHhaoareyou May 18, 2022
c0585c1
fix: eslint
YHhaoareyou May 18, 2022
5d47e3c
feat: add workbox runtimeCaching config
YHhaoareyou May 19, 2022
7c6cd35
Fix service worker to enable it to replace old one (#389)
YHhaoareyou May 20, 2022
626ceca
feat: add a profile card component; add hover & click effect; add a c…
xinyue296 May 23, 2022
4bc712d
fix: syllabus minor styling issues
YHhaoareyou May 29, 2022
6245a70
Update README.md
YHhaoareyou May 29, 2022
156663d
Migrate from Webpack to Vite (#386)
YHhaoareyou May 29, 2022
6c911c8
add script-src-elem to Content Security Policy (#391)
YHhaoareyou May 29, 2022
081c41c
Hotfix (#392)
YHhaoareyou May 29, 2022
d1e063a
Hotfix (#393)
YHhaoareyou May 29, 2022
bbc1a69
Merge branch 'master' into develop
YHhaoareyou May 29, 2022
4f556ac
fix blob in csp
YHhaoareyou May 29, 2022
6fa7950
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
8b825bf
fix: remove csp
YHhaoareyou May 30, 2022
893d781
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
0af6214
fix: remove all webpack-related packages & setting
YHhaoareyou May 30, 2022
969da50
Allow all in CSP
YHhaoareyou May 30, 2022
a552f36
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
2505b59
Fix: preload style, csp allow all, refactor index html & env var (#404)
YHhaoareyou May 31, 2022
25cdc27
Update README.md (#397)
eltociear Jun 8, 2022
0bc6cd2
chore(deps): update dependency esbuild to v0.14.43 (#384)
renovate[bot] Jun 8, 2022
c40864e
Merge branch 'master' into develop
AustinZhu Jun 8, 2022
02849a9
chore(deps): update dependencies
AustinZhu Jun 8, 2022
fc74d84
chore(deps): update dependencies
AustinZhu Jun 8, 2022
5470785
chore(deps): update dependencies
AustinZhu Jun 8, 2022
768301a
fix: preload & enable styles from other mf app
YHhaoareyou Jul 6, 2022
6c87d18
fix: packages version (fix React to v17)
YHhaoareyou Jul 6, 2022
b3484e5
Merge branch 'master' into develop
YHhaoareyou Aug 16, 2022
4606cab
Language filter for Feeds (#409)
YHhaoareyou Oct 3, 2022
a756c20
feat: auto close profile cards
xinyue296 Oct 20, 2022
3bbd15e
Merge branch 'master' into feature/autoclose-profile
YHhaoareyou Oct 27, 2022
a522762
fix: Enable close button
YHhaoareyou Oct 27, 2022
4a601ed
fix: remove redundant onclick
YHhaoareyou Oct 27, 2022
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 added root/src/assets/img/partners/kredit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion root/src/components/aboutUs/AboutUs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import styled from "styled-components";

import JoinUs from "@app/components/aboutUs/JoinUs";
import OurMission from "@app/components/aboutUs/OurMission";
import Partners from "@app/components/aboutUs/Partners";
import Partners from "@app/components/aboutUs/PartnersPage/Partners";
import { gaAppendActionWithLng, gaChangeLanguage } from "@app/ga/eventActions";
import { gaLanguage } from "@app/ga/eventCategories";
import { ThemeContext } from "@app/utils/theme-context";
Expand Down
9 changes: 7 additions & 2 deletions root/src/components/aboutUs/MeetOurTeam/MeetOurTeam.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import React, { useState } from "react";

import { Wrapper } from "@bit/wasedatime.core.ts.styles.wrapper";
import { useTranslation } from "react-i18next";
import styled from "styled-components";

import {
AlumniList,
CurrentList,
AlumniList,
} from "@app/components/aboutUs/MeetOurTeam/memberList";

import { ProfileCard } from "@app/components/block/ProfileCard";
Expand All @@ -33,6 +33,7 @@ const CardArea = styled("div")`

const MeetOurTeam = () => {
const { t } = useTranslation();
const [activeCardName, setActiveCardName] = useState("");

return (
<Wrapper>
Expand All @@ -50,6 +51,8 @@ const MeetOurTeam = () => {
positions={member.positions}
socials={member.socials}
profileText={member.profileText}
isOpen={member.name === activeCardName}
onClick={() => setActiveCardName(member.name)}
/>
))}
</CardArea>
Expand All @@ -65,6 +68,8 @@ const MeetOurTeam = () => {
positions={member.positions}
socials={member.socials}
profileText={member.profileText}
onClick={() => setActiveCardName(member.name)}
isOpen={member.name === activeCardName}
/>
))}
</CardArea>
Expand Down
2 changes: 2 additions & 0 deletions root/src/components/aboutUs/MeetOurTeam/memberList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface Members {
positions: Array<string>;
socials?: Array<{ platform: string; link: string }>;
profileText?: string;
isOpen?: boolean;
onClick?: () => void;
}

export const CurrentList: Array<Members> = [
Expand Down
102 changes: 102 additions & 0 deletions root/src/components/aboutUs/PartnersPage/PartnerList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// import email from "@app/assets/img/socialmediaicon/email.png";
// import github from "@app/assets/img/socialmediaicon/github.png";
// import homepage from "@app/assets/img/socialmediaicon/homepage.png";
// import linkedin from "@app/assets/img/socialmediaicon/linkedin.png";
// import weibo from "@app/assets/img/socialmediaicon/sina-weibo.png";
// import twitter from "@app/assets/img/socialmediaicon/twitter.png";
import instagram from "@app/assets/img/socialmediaicon/instagram.png";
import facebook from "@app/assets/img/socialmediaicon/facebook.png";
import kredit from "@app/assets/img/partners/kredit.png";

export interface PartnerProfile {
org: string;
img: string;
socials?: Array<{ link: string; platform: string }>;
members?: Array<{ name: string; platform: string }>;
}

export const PartnerList: Array<PartnerProfile> = [
{
org: "SPSE-EDP Student Council",
img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/spse-edp-logo.png",
socials: [
{
link: "https://www.facebook.com/SPSEEDPSC",
platform: facebook,
},
{
link: "https://www.instagram.com/spse_edp_student_council",
platform: instagram,
},
],
// members: [
// {
// name: "Peter Chai",
// img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/spse-edp-member1.png",
// social: [
// {
// link: "https://www.linkedin.com/in/peter-chai-233577158/",
// platform: linkedin,
// },
// {
// link: "https://www.facebook.com/siyuan.chai.77",
// platform: facebook,
// },
// {
// link: "https://twitter.com/PeterChai1013",
// platform: twitter,
// },
// ],
// },
// {
// name: "Ghafi Reyhan",
// img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/spse-edp-member2.png",
// social: [],
// },
// ],
},
{
org: "Kredit Korea",
img: kredit,
socials: [
{
link: "https://www.instagram.com/kredit_waseda/",
platform: instagram,
},
],
},
{
org: "CSSA",
img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/cssa-logo.png",
socials: [
// {
// url: "",
// icon: <FontAwesomeIcon icon={faFacebook} />
// }
],
},
{
org: "WaLife",
img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/walife-logo.png",
socials: [
// {
// url: "",
// icon: <FontAwesomeIcon icon={faFacebook} />
// }
],
},
{
org: "WTSA",
img: "https://wasedatime-partners.s3-ap-northeast-1.amazonaws.com/wtsa-logo.png",
socials: [
{
link: "https://www.facebook.com/WasedaTaiwaneseStudentAssociation",
platform: facebook,
},
{
link: "https://www.instagram.com/wtsa.jp",
platform: instagram,
},
],
},
];
58 changes: 58 additions & 0 deletions root/src/components/aboutUs/PartnersPage/Partners.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { useState } from "react";

import { Wrapper } from "@bit/wasedatime.core.ts.styles.wrapper";
import { useTranslation } from "react-i18next";
import styled from "styled-components";

import { PartnerList } from "@app/components/aboutUs/PartnersPage/PartnerList";

import { ProfileCard } from "@app/components/block/ProfileCard";

const Title = styled("h2")`
font-weight: bold;
text-align: center;
`;

const SubTitle = styled("h2")`
font-weight: bold;
margin: 10px auto;
text-align: center;
`;

const CardArea = styled("div")`
width: 80%;
margin: 0px auto 40px auto;
font-size: 0.9em;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
`;

const Partners = () => {
const { t } = useTranslation();
const [activeCardName, setActiveCardName] = useState("");

return (
<Wrapper>
<Title className="mt-3.5 mb-2.5 sm:my-5 text-3xl sm:text-4xl 2xl:text-5xl text-light-text1 dark:text-dark-text1">
Meet Our Talented Team!
</Title>
<SubTitle className="my-1.5 sm:my-5 text-2xl sm:text-3xl 2xl:text-4xl text-light-text1 dark:text-dark-text1">
Current Members
</SubTitle>
<CardArea>
{PartnerList.map((org) => (
<ProfileCard
image={org.img}
name={org.org}
socials={org.socials}
isOpen={org.org === activeCardName}
onClick={() => setActiveCardName(org.org)}
/>
))}
</CardArea>
</Wrapper>
);
};

export default Partners;
25 changes: 14 additions & 11 deletions root/src/components/block/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ const MediaIcon = styled("img")`
export interface ProfileCardProps {
image: string;
name: string;
positions: Array<string>;
positions?: Array<string>;
socials?: Array<{ platform: string; link: string }>;
profileText?: string;
onClick?: () => void;
isOpen?: boolean;
// mini?: boolean;
}

Expand All @@ -38,23 +40,23 @@ export const ProfileCard = ({
positions,
socials,
profileText,
onClick,
isOpen,
}: // mini,
ProfileCardProps) => {
const [showCard, setShowCard] = useState<boolean>(false);
const handleClick = () => {
setShowCard(!showCard);
};
// const [showCard, setShowCard] = useState<boolean>(false);

// const handleClick = () => {
// setShowCard(!showCard);
// };

return (
<Card
className="block group cursor-pointer transition ease-in-out delay-300ms transition-duration:1500ms md:mx-8 md:my-6 lg:mx-10 lg:my-8"
onClick={handleClick}
onClick={onClick}
>
{showCard ? (
<div
// Card: pic + hidden card-body + Name
className="card w-auto card-side rounded-8xl bg-gradient-to-r from-light-card2 to-light-card1 dark:bg-gradient-to-r dark:from-dark-card2 dark:to-dark-bgMain drop-shadow-lg translate-x-[5px] transition ease-in-out delay-200ms transition-duration:3000ms my-[9px] sm:my-[16px] z-20"
>
{isOpen ? (
<div className="card w-auto card-side rounded-8xl bg-gradient-to-r from-light-card2 to-light-card1 dark:bg-gradient-to-r dark:from-dark-card2 dark:to-dark-bgMain drop-shadow-lg translate-x-[5px] transition ease-in-out delay-200ms transition-duration:3000ms my-[9px] sm:my-[16px] z-20">
{/* Profile pic */}
<figure className="px-3 py-3 sm:px-5 sm:py-5">
{/* responsive for smaller screen: w/h - [100px] */}
Expand Down Expand Up @@ -122,6 +124,7 @@ ProfileCardProps) => {
</div>
</div>
) : (
// Card: pic + hidden card-body + Name
<div>
<div>
<p className="text-center text-lg sm:text-xl text-transparent font-bold group-hover:text-light-text2 dark:group-hover:text-dark-text1 translate-y-[85px] sm:translate-y-[110px] z-10">
Expand Down