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

Add email images #31

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b6c2bff
update list 1.2.1& 2.2 add list 2.2.1
vincentxuu Apr 9, 2023
b643cf7
update figma 1.2 & 2.2
vincentxuu Apr 15, 2023
6d8a8ec
comment out components/Home/ FacebookPosts/Cardlist due to an error …
vincentxuu May 28, 2023
cc2c4cf
fix: resource title
SiongSng Jul 5, 2023
871e62c
Merge pull request #6 from daodaoedu/fix/resouce-title
pepe1113 Jul 5, 2023
3f7b96e
🔧 add alias import config
JohnsonMao Oct 10, 2023
5358d7a
✨ add group page
JohnsonMao Oct 10, 2023
fc5d1d2
♻️ refactor group page
JohnsonMao Nov 10, 2023
e4be18d
♻️ refactor coding style
JohnsonMao Nov 11, 2023
5728acc
🐛 fixed isActive props console error
JohnsonMao Nov 12, 2023
02865b8
🐛 fixed server and client placeholder not match
JohnsonMao Nov 12, 2023
fe9c2a0
⚡️ optimize developer experience
JohnsonMao Nov 12, 2023
8589f22
🐛 fixed next export error
JohnsonMao Nov 12, 2023
4174a9d
🐛 resolve group card text issue
JohnsonMao Nov 12, 2023
986dd63
⏪ Revert "🐛 fixed next export error"
JohnsonMao Nov 14, 2023
f6b757e
🎨 eslint format
JohnsonMao Nov 14, 2023
29c4f16
🔧 disable a11y/control-has-associated-label check
JohnsonMao Nov 14, 2023
bc93ce4
Merge pull request #9 from JohnsonMao/feature/group
JohnsonMao Nov 23, 2023
2eb05ad
feat: Add new ui and remove firebase code
whalekiller03 Oct 29, 2023
316ddbd
chore: Add parameter and nuxt.config
whalekiller03 Oct 29, 2023
cc85fb6
feat(partner): Modify PartnerList and fetch api with redux-saga
whalekiller03 Nov 20, 2023
dc97fb2
fix(partner): show 顯示更多的 Button 及 mobile 樣式
whalekiller03 Nov 20, 2023
fb86820
feat(Partner/Banner): Modify Banner and Include shared image
whalekiller03 Nov 28, 2023
d3381fd
fix(Partner/PartnerList): fix logical and ui style
whalekiller03 Nov 28, 2023
2499210
refactor: remove useless file
whalekiller03 Dec 3, 2023
6d937c0
feat(partner): Add SearchField and SearchParams in Partner
whalekiller03 Dec 3, 2023
094e991
style(partner/banner): modify banner style
whalekiller03 Dec 3, 2023
d120f4b
refactor(partner/partnerCard): Modify CardStyle and setData
whalekiller03 Dec 3, 2023
efe6e3c
chore(sagas/user): Add default baseUrl
whalekiller03 Dec 3, 2023
f69f6f4
fix: yarn build issue
whalekiller03 Dec 3, 2023
3889578
feat(profile): Add Profile components ui and PartnerDetail
whalekiller03 Dec 3, 2023
8ecdc20
style(userTabs): create userTabs.styled
whalekiller03 Dec 4, 2023
c5c428d
fix(searchParamsList): filter unexpected params in SearchParamsList
whalekiller03 Dec 10, 2023
dfba0ec
♻️ Move mockData to the API directory and implement Redux integration…
JohnsonMao Dec 12, 2023
3517660
🐛 Fixed potential type confusion and refactor style
JohnsonMao Dec 13, 2023
ab987bc
Merge pull request #10 from daodaoedu/feature/2.1_partner
JohnsonMao Dec 14, 2023
b5c3c14
feat: add donate promotion
Dec 23, 2023
0a3a720
feat: donate promotion
Dec 23, 2023
0e7240f
Merge pull request #21 from pepe1113/feature/donate_link
pepe1113 Dec 23, 2023
9991c64
feat(partner): Deal with Fetching Search Partners results
whalekiller03 Dec 27, 2023
47c4b64
Merge pull request #22 from daodaoedu/feature/2.1_partner_add_api
hsuifang Jan 2, 2024
7212670
fix(partner): add getStaticProps and getStaticPaths to generate page
whalekiller03 Jan 2, 2024
ca536a8
Merge pull request #11 from daodaoedu/feature/2.2_partner_profile
hsuifang Jan 2, 2024
97379a9
fix(partner): ui - show Tag and api: queryParams
whalekiller03 Jan 2, 2024
95e1858
Merge pull request #23 from daodaoedu/fix/2.1_partner_add_api
hsuifang Jan 2, 2024
57ea764
feat(partner): 串接 user/:id 及 調整頁面路徑
whalekiller03 Jan 7, 2024
82d9d9a
Merge pull request #24 from daodaoedu/feature/2.2_partner_profile
hsuifang Jan 7, 2024
dca8936
feat(user): 新增 user 登入 google流程
whalekiller03 Jan 14, 2024
d807fe9
feat: 串接聯繫夥伴,並寄送 Email
whalekiller03 Jan 14, 2024
e943b69
feat: 新增社群及標籤
whalekiller03 Jan 15, 2024
897e423
chore(partner/profile): 1. 調整 partner 及 profile 呈現 2. build issue
whalekiller03 Jan 15, 2024
1de4287
fix(signin): Delete SignInStyled and move styled in to index
whalekiller03 Jan 15, 2024
e6179ab
Merge pull request #27 from daodaoedu/feature/1.2_profile_login
hsuifang Jan 15, 2024
0dc8292
fix: 登入Login 配置及 remove unnecessary code
whalekiller03 Jan 16, 2024
f9b9fd7
Merge pull request #28 from daodaoedu/fix/1.2_google_login
hsuifang Jan 16, 2024
5fcdc03
fix(sign): define BaseUrl and modify style
whalekiller03 Jan 16, 2024
3e89d37
✨ 新增 Image 404 時,自動更換備用圖
JohnsonMao Jan 16, 2024
ab754c6
✨ 串接揪團查詢 API
JohnsonMao Jan 16, 2024
4f24885
Merge branch 'dev' into feature/group
JohnsonMao Jan 16, 2024
08c38b2
Merge pull request #29 from daodaoedu/fix/1.2_google_login_url
hsuifang Jan 16, 2024
b0df1aa
fix: fix partnerSaga and add .env.sample
whalekiller03 Jan 16, 2024
cbf1e19
Merge pull request #20 from daodaoedu/feature/group
JohnsonMao Jan 17, 2024
2dc9e68
feat: add email images
Jan 21, 2024
4a64467
feat: change images
Jan 23, 2024
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
22 changes: 21 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,25 @@
}
]
],
"plugins": ["@emotion/babel-plugin"]
"plugins": [
[
"babel-plugin-import",
{
"libraryName": "@mui/material",
"libraryDirectory": "",
"camel2DashComponentName": false
},
"core"
],
[
"babel-plugin-import",
{
"libraryName": "@mui/icons-material",
"libraryDirectory": "",
"camel2DashComponentName": false
},
"icons"
],
"@emotion/babel-plugin"
]
}
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_API_URL=
16 changes: 9 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ module.exports = {
node: true,
},
ignorePatterns: ['.eslintrc.js'],
// settings: {
// 'import/resolver': {
// node: {
// extensions: ['.js', '.jsx', '.ts', '.tsx'],
// },
// },
// },
settings: {
'import/resolver': {
alias: {
extensions: ['.js', '.jsx'],
map: [['@', '.']],
},
},
},
rules: {
'react/no-unescaped-entities': 'off',
'@next/next/no-page-custom-font': 'off',
Expand All @@ -41,6 +42,7 @@ module.exports = {
'operator-linebreak': 0,
'function-paren-newline': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/control-has-associated-label': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'react/jsx-one-expression-per-line': 0,
'no-confusing-arrow': 0,
Expand Down
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2
}
48 changes: 48 additions & 0 deletions components/Group/AreaChips.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { useCallback, useMemo } from 'react';
import styled from '@emotion/styled';
import { AREAS } from '@/constants/areas';
import useSearchParamsManager from '@/hooks/useSearchParamsManager';
import Chip from '@/shared/components/Chip';

const StyledAreaChips = styled.ul`
display: flex;
flex-wrap: wrap;
margin-bottom: 16px;
gap: 12px 0;
`;

const AreaChips = () => {
const [getSearchParams, pushState] = useSearchParamsManager();

const currentArea = useMemo(
() =>
getSearchParams('area').filter((area) =>
AREAS.find(({ name }) => name === area),
),
[getSearchParams],
);

const handleClickArea = useCallback(
(event) => {
const targetArea = event.target.parentNode.textContent;
const areas = currentArea.filter((area) => area !== targetArea);

pushState('area', areas.toString());
},
[pushState, currentArea],
);

return (
currentArea.length > 0 && (
<StyledAreaChips>
{currentArea.map((name) => (
<li key={name}>
<Chip value={name} onDelete={handleClickArea} />
</li>
))}
</StyledAreaChips>
)
);
};

export default AreaChips;
74 changes: 74 additions & 0 deletions components/Group/Banner.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { useRouter } from 'next/router';
import styled from '@emotion/styled';
import Button from '@/shared/components/Button';
import groupBannerImg from '@/public/assets/group-banner.png';
import Image from '@/shared/components/Image';

const StyledBanner = styled.div`
position: relative;

picture {
position: absolute;
width: 100%;
top: 0;
height: 398px;
img {
height: inherit;
}
}

h1 {
margin-bottom: 8px;
font-weight: 700;
font-size: 36px;
line-height: 140%;
color: #536166;
}

p {
font-weight: 400;
font-size: 14px;
line-height: 140%;
color: #536166;
}

> div {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-top: 100px;
}
`;

const Banner = () => {
const router = useRouter();

const handleClick = () => {
// TODO: 判斷是否登入決定按鈕導向哪個頁面
router.push('/login');
};

return (
<StyledBanner>
<picture>
<Image
src={groupBannerImg.src}
alt="揪團封面"
height="inherit"
background="linear-gradient(#fcfefe 10%, #e0f1f2 40%)"
borderRadius="0"
/>
</picture>
<div>
<h1>揪團</h1>
<p>想一起組織有趣的活動或學習小組嗎?</p>
<p>註冊並加入我們,然後創建你的活動,讓更多人一起參加!</p>
<Button onClick={handleClick}>我想揪團</Button>
</div>
</StyledBanner>
);
};

export default Banner;
62 changes: 62 additions & 0 deletions components/Group/GroupList/GroupCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined';
import Image from '@/shared/components/Image';
import emptyCoverImg from '@/public/assets/empty-cover.png';
import { timeDuration } from '@/utils/date';
import {
StyledAreas,
StyledContainer,
StyledFooter,
StyledGroupCard,
StyledInfo,
StyledLabel,
StyledText,
StyledTitle,
} from './GroupCard.styled';

function GroupCard({
photoURL,
photoAlt,
title = '未定義主題',
category = [],
partnerEducationStep,
description,
area,
isGrouping,
updatedDate,
}) {
return (
<StyledGroupCard>
<Image alt={photoAlt || '未放封面'} src={photoURL || emptyCoverImg.src} />
<StyledContainer>
<StyledTitle>{title}</StyledTitle>
<StyledInfo>
<StyledText>
<StyledLabel>學習領域</StyledLabel>
<span>{category.join('、')}</span>
</StyledText>
<StyledText>
<StyledLabel>適合階段</StyledLabel>
<span>{partnerEducationStep || '皆可'}</span>
</StyledText>
</StyledInfo>
<StyledText lineClamp="2" fontSize="14px">
{description}
</StyledText>
<StyledAreas>
<LocationOnOutlinedIcon fontSize="16px" sx={{ color: '#536166' }} />
<StyledText color="#92989A">{area}</StyledText>
</StyledAreas>
<StyledFooter>
<time>{timeDuration(updatedDate)}</time>
{isGrouping ? (
<div>揪團中</div>
) : (
<div className="finished">已結束</div>
)}
</StyledFooter>
</StyledContainer>
</StyledGroupCard>
);
}

export default GroupCard;
108 changes: 108 additions & 0 deletions components/Group/GroupList/GroupCard.styled.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import styled from '@emotion/styled';

export const StyledLabel = styled.span`
flex-basis: 50px;
color: #293a3d;
font-size: 12px;
font-weight: bold;
`;

export const StyledText = styled.div`
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: ${(props) => props.lineClamp || '1'};
overflow: hidden;
color: ${(props) => props.color || '#536166'};
font-size: ${(props) => props.fontSize || '12px'};
`;

export const StyledTitle = styled.h2`
font-size: 14px;
font-weight: bold;
line-height: 1.4;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
`;

export const StyledInfo = styled.div`
${StyledLabel} {
margin-right: 5px;
padding-right: 5px;
border-right: 1px solid #536166;
}
`;

export const StyledFooter = styled.footer`
display: flex;
justify-content: space-between;
align-items: center;

time,
div {
font-size: 12px;
}

time {
font-weight: 300;
color: #92989a;
}

div {
--bg-color: #def5f5;
--color: #16b9b3;
display: flex;
align-items: center;
padding: 4px 10px;
background: var(--bg-color);
color: var(--color);
border-radius: 4px;
font-weight: 500;
gap: 4px;

&::before {
content: '';
display: block;
width: 8px;
height: 8px;
background: var(--color);
border-radius: 50%;
}

&.finished {
--bg-color: #f3f3f3;
--color: #92989a;
}
}
`;

export const StyledContainer = styled.div`
padding: 10px;
display: flex;
flex-direction: column;
gap: 10px;
`;

export const StyledAreas = styled.div`
display: flex;
align-items: center;
`;

export const StyledGroupCard = styled.div`
position: relative;
background: #fff;
padding: 0.5rem;
transition: transform 0.15s, box-shadow 0.15s;
border-radius: 4px;

&:hover {
z-index: 1;
transform: scale(1.0125);
box-shadow: 0 0 6px 2px #0001;
}

img {
vertical-align: middle;
}
`;
Loading
Loading