Added the featured types for summit, meetup, online-summit, congress, privacy-corner, meta-hackathons.

This commit is contained in:
NoobDeveloper412 2024-09-16 19:45:18 +05:00
parent f77317bbb1
commit 9a8d9299f0
3 changed files with 15 additions and 9 deletions

View file

@ -20,7 +20,6 @@ const {
],
} = Astro.props;
console.log(sectionsConfig);
// Function to sort sections by order
const sortedSections = sectionsConfig
.filter((section) => section.visible)

View file

@ -3,7 +3,7 @@ const { item } = Astro.props;
import { marked } from 'marked';
import EventsExt from '../events-ext.json';
import core from "../core.json";
import { dateFormat, dateInfo, dateEnd, nameRenderer, ccRenderer, eventStatus, getSpeaker, findExt, getEventPoster } from '../lib/events.js';
import { dateFormat, dateEnd, nameRenderer, ccRenderer, eventStatus, getSpeaker, findExt, getEventPoster } from '../lib/events.js';
import SpeakerList from './SpeakerList.astro';
import PeopleCarousel from './PeopleCarousel.astro';

View file

@ -20,7 +20,6 @@ const sectionsConfig = [
{ name: "contributors", visible: true, order: 3 },
{ name: "membersGrid", visible: true, order: 4 },
{ name: "socialLinks", visible: true, order: 5 },
// { name: "community", visible: false, order: 6 },
];
for (const ev of events) {
@ -33,21 +32,32 @@ for (const ev of events) {
}
}
const allowedFeaturedTypes = [
"summit",
"meetup",
"online-summit",
"congress",
"privacy-corner",
"meta-hackathons",
];
const featuredEvents = [];
for (const e of upcomingEvents) {
if (featuredEvents.length > 2) {
break;
}
if (
["summit", "meetup", "online-summit"].includes(e.type) &&
allowedFeaturedTypes.includes(e.type) &&
e.links?.rsvp &&
!featuredEvents.find((ex) => ex.type === e.type)
) {
featuredEvents.push(e);
}
}
---
<BaseLayout
title="About web3privacy"
image="og_about"
@ -63,7 +73,7 @@ for (const e of upcomingEvents) {
<div class="grid grid-cols-1 xl:grid-cols-2 gap-16 mb-[82px]">
<div class="flex flex-col gap-[36px] md:order-2">
<div class="md:hidden block mb-[12px] ">
<div class="md:hidden block mb-[12px]">
<h1>activism. care. solidarity.</h1>
<div set:html={config.landing.mission} />
<div class="mt-8 flex gap-6 items-center w-full">
@ -95,7 +105,7 @@ for (const e of upcomingEvents) {
<hr class="mt-10 border-[#e0e0e0]" />
<div class="md:block hidden mt-[26px]">
<h1 class="glitch-text">Our mission</h1>
<div set:html={config.landing.mission} />
<div set:html={config.landing.mission} />
</div>
<hr class="mt-10 border-[#e0e0e0]" />
@ -124,7 +134,6 @@ for (const e of upcomingEvents) {
>
</div>
</div>
</div>
</div>
</div>
@ -147,5 +156,3 @@ for (const e of upcomingEvents) {
<AboutFooter {sectionsConfig} />
</div>
</BaseLayout>