Skip to content

Commit

Permalink
Merge pull request #23 from gdgbari/main
Browse files Browse the repository at this point in the history
.
  • Loading branch information
domysh authored Oct 2, 2024
2 parents 44dd6aa + 5073bac commit 12d35bb
Show file tree
Hide file tree
Showing 44 changed files with 864 additions and 419 deletions.
2 changes: 1 addition & 1 deletion .astro/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1726119011870
"lastUpdateCheck": 1727383549757
}
}
105 changes: 64 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
"author": "",
"license": "ISC",
"dependencies": {
"@astrojs/mdx": "^3.1.5",
"@astrojs/netlify": "^5.5.2",
"@astrojs/node": "^8.3.3",
"@astrojs/mdx": "^3.1.7",
"@astrojs/netlify": "^5.5.3",
"@astrojs/node": "^8.3.4",
"@astrojs/partytown": "^2.1.2",
"@astrojs/react": "^3.6.2",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/tailwind": "^5.1.1",
"@mantine/core": "^7.12.2",
"@mantine/form": "^7.12.2",
"@mantine/hooks": "^7.12.2",
"@mantine/notifications": "^7.12.2",
"@tanstack/react-query": "^5.56.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.15.4",
"astro": "^4.15.9",
"astro-robots-txt": "^1.0.0",
"firebase": "^10.13.1",
"react": "^18.2.0",
Expand All @@ -36,7 +36,8 @@
"react-icons": "^5.3.0",
"react-qrcode-logo": "^3.0.0",
"sass": "^1.77.8",
"tailwindcss": "^3.3.5"
"tailwindcss": "^3.3.5",
"zustand": "^5.0.0-rc.2"
},
"devDependencies": {
"daisyui": "^4.12.10",
Expand Down
2 changes: 1 addition & 1 deletion public/assets/vectors/pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/assets/vectors/time.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/Common/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const translationIcon = await ImportSvg("translation");
const links = [
{ link: translatePath(""), name: t("nav.home") },
//{ link: translatePath("/schedule"), name: t("nav.schedule") },
// { link: translatePath("/sessions"), name: t("nav.sessions") },
// { link: translatePath("/speakers"), name: t("nav.speakers") },
{ link: translatePath("/schedule"), name: t("nav.schedule") },
{ link: translatePath("/sessions"), name: t("nav.sessions") },
{ link: translatePath("/speakers"), name: t("nav.speakers") },
{ link: translatePath("/location"), name: t("nav.location") },
{ link: translatePath("/faq"), name: t("nav.faq") },
{ link: translatePath("/team"), name: t("nav.team") },
Expand Down
1 change: 1 addition & 0 deletions src/components/Home/Jumbo.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const t = useTranslations(lang);
<p class="text-3xl md:text-4xl font-semibold">
{
WebsiteConfig.EVENT_START.toLocaleDateString(lang, {
timeZone: WebsiteConfig.EVENT_TIMEZONE,
day: "numeric",
month: "long",
year: "numeric",
Expand Down
11 changes: 7 additions & 4 deletions src/components/Home/RandomSpeakerList.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { Speaker } from "../../data/types/sessionize";
import { getLangFromUrl, useTranslatedPath, useTranslations } from "../../i18n/utils";

const SpeakerPreviewElement = ({ speaker }: { speaker: Speaker }) => (
<a
const SpeakerPreviewElement = ({ speaker }: { speaker: Speaker }) => {
const lang = getLangFromUrl(new URL(location.href));
const getPath = useTranslatedPath(lang);
return <a
key={speaker.id}
href={`/speakers/${speaker.slug}`}
href={getPath(`/speakers/${speaker.slug}`)}
className="speaker-card"
>
<figure>
Expand All @@ -18,7 +21,7 @@ const SpeakerPreviewElement = ({ speaker }: { speaker: Speaker }) => (
<p className="max-h-12 text-ellipsis overflow-hidden">{speaker.tagLine}</p>
</div>
</a>
)
}

export const RandomSpeakerList = ({ speakers }:{ speakers:Speaker[] }) => {
return <>{speakers.sort(() => Math.random() - 0.5).slice(0, 4).map((s) => (
Expand Down
9 changes: 7 additions & 2 deletions src/components/Home/SpeakerPreview.astro
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
---
import { getSpeakers } from "../../data/api/sessionize_api";
import { getLangFromUrl, useTranslatedPath, useTranslations } from "../../i18n/utils";
import { RandomSpeakerList } from "./RandomSpeakerList";
const speakers = await getSpeakers();
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const getPath = useTranslatedPath(lang);
---

<div class="py-14 main-container px-4" >
<h2 class="text-6xl mb-10 font-bold text-white">Speakers</h2>
<h2 class="text-6xl mb-10 font-bold text-white">{t("info.speakers")}</h2>
<div class="grid md:grid-cols-4 sm:grid-cols-2 grid-flow-row gap-10 mt-5 mb-10">
<RandomSpeakerList client:only="react" speakers={speakers??[]} />
</div>

<a
class="btn-content text-xl px-8"
href="/speakers">See all Speakers</a
href={getPath("/speakers")}>{t("speaker.seeAll")}</a
>
</div>
Loading

0 comments on commit 12d35bb

Please sign in to comment.