diff --git a/CHANGELOG.md b/CHANGELOG.md index ea59cc5..8106461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [1.3.0](https://github.com/frontChapter/website-frontend/compare/v1.2.1...v1.3.0) (2024-03-07) + + +### Features + +* add required assets for sponsor section ([905c883](https://github.com/frontChapter/website-frontend/commit/905c883c4a4edc0767d4cf0fa33adb78e50850b3)) +* add Sponsor component ([e8dde30](https://github.com/frontChapter/website-frontend/commit/e8dde30de596bb9f1746d1b2c27d26186d650f21)) +* add static sponsors data ([a40f44a](https://github.com/frontChapter/website-frontend/commit/a40f44a22ed11317ad7d7162db5ddbaa9dc735bd)) +* change `` text ([c5ef6e6](https://github.com/frontChapter/website-frontend/commit/c5ef6e6d209b71083cedc2eedc97328f992cbca9)) +* customize scrollbar ([8e3a084](https://github.com/frontChapter/website-frontend/commit/8e3a084a2a5468e9cf17c68b5ea172f2872f2887)) +* improve webkit scrollbar style ([2bdca9f](https://github.com/frontChapter/website-frontend/commit/2bdca9fb205a72944eab2353630c6c5aed90b249)) +* update conference time ([59de0b7](https://github.com/frontChapter/website-frontend/commit/59de0b7df32d414ef33bb3e893d7355668c9e2e9)) +* use Sponsor component in home page ([e41143e](https://github.com/frontChapter/website-frontend/commit/e41143e6534fda41591dc21fb5db07518f5cf443)) + + +### Bug Fixes + +* `` update ([2af8795](https://github.com/frontChapter/website-frontend/commit/2af879563aaac90ff2063a2e815cbe904e15a706)) +* countdown issue ([6b2ea54](https://github.com/frontChapter/website-frontend/commit/6b2ea54d146a9eea9d4fc1ea8760bdf130b63072)) +* fix countdown without using moment ([a482116](https://github.com/frontChapter/website-frontend/commit/a48211643a2efea1bc7b11bb7f799536b86c54cf)) +* fix overflow x in section speakers ([c0bbbb6](https://github.com/frontChapter/website-frontend/commit/c0bbbb63aebcbe25b002dec5874259d0ccbec4ce)) +* remove `sass` and change file type from `.scss` to `.css` ([4cfb689](https://github.com/frontChapter/website-frontend/commit/4cfb68994ef0904e24bd78452d4e25535eaa7a5f)) + ## [1.2.1](https://github.com/frontChapter/website-frontend/compare/v1.2.0...v1.2.1) (2024-02-01) diff --git a/package.json b/package.json index 7b9710b..b557685 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "website-frontend", - "version": "1.2.1", + "version": "1.3.0", "private": true, "packageManager": "pnpm@8.14.1", "scripts": { @@ -19,13 +19,11 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "lucide-react": "^0.309.0", - "moment": "^2.30.1", "next": "14.0.4", "react": "^18", "react-dom": "^18", "react-icons": "^5.0.1", "recoil": "^0.7.7", - "sass": "^1.70.0", "server-only": "^0.0.1", "sharp": "^0.33.2", "swiper": "^11.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7392ff..a8939a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,12 +29,9 @@ dependencies: lucide-react: specifier: ^0.309.0 version: 0.309.0(react@18.2.0) - moment: - specifier: ^2.30.1 - version: 2.30.1 next: specifier: 14.0.4 - version: 14.0.4(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0) + version: 14.0.4(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18 version: 18.2.0 @@ -47,9 +44,6 @@ dependencies: recoil: specifier: ^0.7.7 version: 0.7.7(react-dom@18.2.0)(react@18.2.0) - sass: - specifier: ^1.70.0 - version: 1.70.0 server-only: specifier: ^0.0.1 version: 0.0.1 @@ -557,7 +551,7 @@ packages: next: ^13.0.0 || ^14.0.0 react: ^18.2.0 dependencies: - next: 14.0.4(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0) + next: 14.0.4(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 third-party-capital: 1.0.20 dev: false @@ -2547,10 +2541,6 @@ packages: engines: {node: '>= 4'} dev: true - /immutable@4.3.5: - resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} - dev: false - /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3115,10 +3105,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /moment@2.30.1: - resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} - dev: false - /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -3147,7 +3133,7 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /next@14.0.4(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0): + /next@14.0.4(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-qbwypnM7327SadwFtxXnQdGiKpkuhaRLE2uq62/nRul9cj9KhQ5LhHmlziTNqUidZotw/Q1I9OjirBROdUJNgA==} engines: {node: '>=18.17.0'} hasBin: true @@ -3170,7 +3156,6 @@ packages: postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - sass: 1.70.0 styled-jsx: 5.1.1(react@18.2.0) watchpack: 2.4.0 optionalDependencies: @@ -3884,16 +3869,6 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /sass@1.70.0: - resolution: {integrity: sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==} - engines: {node: '>=14.0.0'} - hasBin: true - dependencies: - chokidar: 3.5.3 - immutable: 4.3.5 - source-map-js: 1.0.2 - dev: false - /saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} diff --git a/src/app/components/CountDown.tsx b/src/app/components/CountDown.tsx index 976761b..e313239 100644 --- a/src/app/components/CountDown.tsx +++ b/src/app/components/CountDown.tsx @@ -1,10 +1,10 @@ "use client"; -import WaveMobile from "@/assets/images/home/count-down-wave-mobile.svg"; -import Wave from "@/assets/images/home/count-down-wave.svg"; import { conferenceDateTime } from "@/data/timing"; +import Wave from "@/assets/images/home/count-down-wave.svg"; +import WaveMobile from "@/assets/images/home/count-down-wave-mobile.svg"; import Image from "next/image"; -import React, { Fragment, useState } from "react"; +import { Fragment, useEffect, useState } from "react"; import { HiOutlineClock } from "react-icons/hi"; export default function CountDown() { @@ -23,72 +23,76 @@ export default function CountDown() {
- ساعت‌ها رو دوباره کوک کردیم - اینجا ثانیه‌ها ارزشمندند + دلتنگتون هستیم + + به خاطر خاطره‌های زیبایی که ساختیم +

- تا شروع دومین همایش فرانت چپتر + از همایش سال ۱۴۰۲ گذشته

); } const CountDownTimer = () => { - const calculateTimeRemaining = () => { - const now = new Date().getTime(); - const target = conferenceDateTime.getTime(); - const timeRemaining = target - now; + const calculateDuration = (start: number, end: number) => { + const totalSeconds = Math.floor((end - start) / 1000); + const days = Math.floor(totalSeconds / (3600 * 24)); + const hours = Math.floor((totalSeconds % (3600 * 24)) / 3600); + const minutes = Math.floor((totalSeconds % 3600) / 60); + const seconds = Math.floor(totalSeconds % 60); - const days = Math.floor(timeRemaining / (1000 * 60 * 60 * 24)); - const hours = Math.floor( - (timeRemaining % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60), - ); - const minutes = Math.floor( - (timeRemaining % (1000 * 60 * 60)) / (1000 * 60), - ); - const seconds = Math.floor((timeRemaining % (1000 * 60)) / 1000); - - return { days, hours, minutes, seconds }; + return { + days, + hours, + minutes, + seconds, + }; }; - const [timeRemaining, setTimeRemaining] = useState(calculateTimeRemaining()); + const [now, setNow] = useState(Date.now()); + const conferenceDate = conferenceDateTime.getTime(); + const duration = calculateDuration(now, conferenceDate); - React.useEffect(() => { + // Update the current time every second + useEffect(() => { const interval = setInterval(() => { - setTimeRemaining(calculateTimeRemaining()); + setNow(Date.now()); }, 1000); - return () => clearInterval(interval); }, []); + const times = [ + { + label: "ثانیه", + value: duration.seconds, + }, + { + label: "دقیقه", + value: duration.minutes, + }, + { + label: "ساعت", + value: duration.hours, + }, + { + label: "روز", + value: duration.days, + }, + ]; + return (
- {[ - { - label: "ثانیه", - value: timeRemaining.seconds, - }, - { - label: "دقیقه", - value: timeRemaining.minutes, - }, - { - label: "ساعت", - value: timeRemaining.hours, - }, - { - label: "روز", - value: Math.trunc(timeRemaining.days), - }, - ].map(({ label, value }) => ( + {[...times].map(({ label, value }) => ( -
+
- {value.toLocaleString("fa-IR")} + {Math.abs(value).toLocaleString("fa-IR")} {label}
diff --git a/src/app/components/Speakers/SpeakerCard.tsx b/src/app/components/Speakers/SpeakerCard.tsx index 23ac146..60a06b6 100644 --- a/src/app/components/Speakers/SpeakerCard.tsx +++ b/src/app/components/Speakers/SpeakerCard.tsx @@ -1,7 +1,7 @@ import { TSpeakerCard } from "@/types/home/speakerCard.type"; import Image from "next/image"; import SpeakerSocials from "./SpeakerSocials"; -import styles from "./styles.module.scss"; +import styles from "./styles.module.css"; const SpeakerCard = ({ avatar, diff --git a/src/app/components/Speakers/Speakers.styles.module.css b/src/app/components/Speakers/Speakers.styles.module.css new file mode 100644 index 0000000..78c3cb6 --- /dev/null +++ b/src/app/components/Speakers/Speakers.styles.module.css @@ -0,0 +1,6 @@ +.speakersSection { + @apply relative py-6 lg:pb-44 lg:pt-12; + &::before { + @apply bg-none lg:absolute lg:inset-0 lg:w-full lg:bg-[url("/images/speakers\_lines.svg")] lg:bg-contain lg:bg-bottom lg:bg-no-repeat lg:content-["_"]; + } +} diff --git a/src/app/components/Speakers/Speakers.styles.module.scss b/src/app/components/Speakers/Speakers.styles.module.scss deleted file mode 100644 index 94f0c05..0000000 --- a/src/app/components/Speakers/Speakers.styles.module.scss +++ /dev/null @@ -1,6 +0,0 @@ -.speakersSection { - @apply relative py-6 lg:pb-44 lg:pt-12; - &::before { - @apply bg-none lg:absolute lg:inset-0 lg:w-screen lg:bg-[url("/images/speakers\_lines.svg")] lg:bg-contain lg:bg-bottom lg:bg-no-repeat lg:content-["_"]; - } -} diff --git a/src/app/components/Speakers/Speakers.tsx b/src/app/components/Speakers/Speakers.tsx index c49bf32..f7a358a 100644 --- a/src/app/components/Speakers/Speakers.tsx +++ b/src/app/components/Speakers/Speakers.tsx @@ -2,7 +2,7 @@ import { speakersData } from "@/data/speakersData"; import { Fragment } from "react"; import { RiMicLine } from "react-icons/ri"; import SpeakerCard from "./SpeakerCard"; -import styles from "./Speakers.styles.module.scss"; +import styles from "./Speakers.styles.module.css"; export default function Speakers() { return ( diff --git a/src/app/components/Speakers/styles.module.scss b/src/app/components/Speakers/styles.module.css similarity index 100% rename from src/app/components/Speakers/styles.module.scss rename to src/app/components/Speakers/styles.module.css diff --git a/src/app/components/Timeline/Timeline.styles.module.scss b/src/app/components/Timeline/Timeline.styles.module.css similarity index 100% rename from src/app/components/Timeline/Timeline.styles.module.scss rename to src/app/components/Timeline/Timeline.styles.module.css diff --git a/src/app/components/Timeline/Timeline.tsx b/src/app/components/Timeline/Timeline.tsx index 65b12c7..e2baee5 100644 --- a/src/app/components/Timeline/Timeline.tsx +++ b/src/app/components/Timeline/Timeline.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import Image from "next/image"; import Link from "next/link"; -import styles from "./Timeline.styles.module.scss"; +import styles from "./Timeline.styles.module.css"; import { TimelineItemType } from "./Timeline.types"; import { confDayTimeline, nightTimeline } from "./data"; diff --git a/src/data/timing.ts b/src/data/timing.ts index c6b1595..dd81040 100644 --- a/src/data/timing.ts +++ b/src/data/timing.ts @@ -1 +1 @@ -export const conferenceDateTime = new Date("2024-02-29T09:00:00+03:30"); +export const conferenceDateTime = new Date("2024-02-29T10:00:00+03:30"); diff --git a/src/styles/globals.css b/src/styles/globals.css index c85cde9..e02a6d1 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -5,3 +5,22 @@ html { scroll-behavior: smooth; } + +body { + &::-webkit-scrollbar { + width: 8px; + } + + &::-webkit-scrollbar-track { + background: #333; + } + + &::-webkit-scrollbar-thumb { + background: #555; + border-radius: 8px; + + &:hover { + background: #dadada; + } + } +}