~liliace/plantforever

be7aa5f00e9f3ff7713d0bd18ec1aec507bf6d7c — Coco Liliace 3 months ago 71d37ca
fix: eager-load dynamically-loaded images
A src/ambient.d.ts => src/ambient.d.ts +12 -0
@@ 0,0 1,12 @@
type Image = {
	sources: {
		avif: string;
		webp: string;
		png: string;
	};
	img: {
		src: string;
		w: number;
		h: number;
	};
};

M src/routes/(banner)/in-the-news/+page.ts => src/routes/(banner)/in-the-news/+page.ts +47 -34
@@ 1,37 1,50 @@
export async function load() {
	const newses = [
		{
			title: "CBC News Article 2023",
			src: "https://www.cbc.ca/radio/whatonearth/how-to-plant-a-tree-in-2023-1.6967362",
			content: "CBC Radio wrote a news article on PlantForever's plans and challenges of planting trees",
			image: (await import("$lib/assets/news/cbc-article-2023.png?enhanced")).default,
		},
		{
			title: "CBC Documentary 2023",
			src: "https://www.cbc.ca/listen/live-radio/1-429-what-on-earth/clip/16009920-the-last-barrel-alberta-premier-backs-oil-world",
			content: "CBC Radio aired an documentary focusing on <a href='https://www.alberta.ca/emissions-reduction-and-energy-development-plan'>Alberta's net zero plans</a>, capturing PlantForever's perspectives on planting trees",
			image: (await import("$lib/assets/news/cbc-documentary-2023.png?enhanced")).default,
		},
		{
			title: "Global News Interview 2022",
			src: "https://globalnews.ca/news/9166036/edmonton-youth-climate-change-trees/",
			content: "Global News Edmonton interviewed our team members Nate and Ahad, volunteer Khushee, and a homeowner during a planting event",
			image: (await import("$lib/assets/news/global-news-2022.jpg?enhanced")).default,
		},
		{
			title: "The Gateway News Article 2021",
			src: "https://thegatewayonline.ca/2021/09/plantforever-develops-urban-forests-one-tree-at-a-time-the-gateway/",
			content: "The University of Alberta's newspaper spotlighted PlantForever after interviewing team members Marmik and Nathaniel",
			image: (await import("$lib/assets/news/gateway-2021.png?enhanced")).default,
		},
		{
			title: "CBC Interview 2020",
			src: "https://www.cbc.ca/listen/live-radio/1-52-radio-active",
			content: "Our president Marmik was interviewed on behalf of PlantForever on Edmonton CBC radio in 2020",
			image: (await import("$lib/assets/news/cbc-interview-2020.png?enhanced")).default,
			audio: "cbc-interview-2020.mp3",
		},
	];
const newses = [
	{
		title: "CBC News Article 2023",
		src: "https://www.cbc.ca/radio/whatonearth/how-to-plant-a-tree-in-2023-1.6967362",
		content: "CBC Radio wrote a news article on PlantForever's plans and challenges of planting trees",
		image: "cbc-article-2023.png",
	},
	{
		title: "CBC Documentary 2023",
		src: "https://www.cbc.ca/listen/live-radio/1-429-what-on-earth/clip/16009920-the-last-barrel-alberta-premier-backs-oil-world",
		content: "CBC Radio aired an documentary focusing on <a href='https://www.alberta.ca/emissions-reduction-and-energy-development-plan'>Alberta's net zero plans</a>, capturing PlantForever's perspectives on planting trees",
		image: "cbc-documentary-2023.png",
	},
	{
		title: "Global News Interview 2022",
		src: "https://globalnews.ca/news/9166036/edmonton-youth-climate-change-trees/",
		content: "Global News Edmonton interviewed our team members Nate and Ahad, volunteer Khushee, and a homeowner during a planting event",
		image: "global-news-2022.jpg",
	},
	{
		title: "The Gateway News Article 2021",
		src: "https://thegatewayonline.ca/2021/09/plantforever-develops-urban-forests-one-tree-at-a-time-the-gateway/",
		content: "The University of Alberta's newspaper spotlighted PlantForever after interviewing team members Marmik and Nathaniel",
		image: "gateway-2021.png",
	},
	{
		title: "CBC Interview 2020",
		src: "https://www.cbc.ca/listen/live-radio/1-52-radio-active",
		content: "Our president Marmik was interviewed on behalf of PlantForever on Edmonton CBC radio in 2020",
		image: "cbc-interview-2020.png",
		audio: "cbc-interview-2020.mp3",
	},
];

const getImage = (() => {
	const images = import.meta.glob<Image>("../../../lib/assets/news/*", {
		eager: true,
		import: "default",
		query: { enhanced: true },
	});

	return (filename: string) => images[`../../../lib/assets/news/${filename}`];
})();

newses.forEach(news => news.image = getImage(news.image));

export function load() {
	return {
		title: "In the News",
		description: "In the past few years, PlantForever has had the pleasant opportunity to speak to some wonderful news organizations about their tree planting initiatives.",

M src/routes/(banner)/meet-our-team/+page.ts => src/routes/(banner)/meet-our-team/+page.ts +96 -84
@@ 1,87 1,99 @@
export function load() { // eslint-disable-line max-lines-per-function
	const members = [
		{
			name: "Marmik Patel",
			title: "President",
			photo: "marmik",
			blurb: "Marmik founded PlantForever in 2017 to develop urban forests through tree planting—an effort to mitigate the climate crisis. " +
				"He manages the organization, overseeing the executive team and providing a vision for PlantForever.",
		},
		{
			name: "Nathaniel Perumal",
			title: "VP Operations (Edmonton)",
			photo: "nate",
			blurb: "Nathaniel started off as a volunteer for PlantForever back in 2018 helping to plant trees across Edmonton. " +
				"Now at 21 years of age, this young environmentalist  continues  to make strides in his pursuit to help preserve the environment. " +
				"By managing the events he once helped with, Nathaniel is an integral part of the team. " +
				"He conducts all of the tree operations for PlantForever, coordinating with both homeowners and volunteers to achieve the goal of mitigating the climate crisis.",
		},
		{
			name: "Emeka Ozoh",
			title: "VP Operations (Saskatoon)",
			photo: "emeka",
			blurb: "Emeka started volunteering for PlantForever in July 2022. " +
				"He has several years of management experience spanning different sectors. " +
				"Also, he is currently an MBA student at the Edwards School of Business, University of Saskatchewan. " +
				"Emeka is passionate about saving the planet and is excited to contribute to that effort through PlantForever.",
		},
		{
			name: "Sheryn Baldas",
			title: "Marketing Manager",
			photo: "sheryn",
			blurb: "Sheryn Baldas began volunteering during the summer of 2023 as an Operations Manager, " +
				"but has since transitioned into our Marketing Management role. " +
				"She is currently studying at the University of Alberta, majoring in Design for Business/Marketing. " +
				"With a passion for environmental stewardship and conservation, " +
				"Sheryn aims to develop innovative solutions and strategies in order to expand PlantForever's reach to homeowners in the Edmonton community.",
		},
		{
			name: "Kevin Ang",
			title: "VP Finance",
			photo: "kevin",
			blurb: "Kevin is an international student from Indonesia. " +
				"He is 18 years old and he's going to UofA Business school, majoring in finance. " +
				"He has had a passion in finance since he was in middle school. " +
				"He has chosen to join PlantForever because he wants to make an impact in the world, " +
				"especially with the climate crisis as lots of recent disasters have been caused by it.",
		},
		{
			name: "Parshva Shah",
			title: "VP Internal",
			photo: "parshva",
			blurb: "Parshva Shah started volunteering for PlantForever during the summer of 2021 where he helped with tree transplantation. " +
				"He is now Vice President Internal and is responsible for developing organizational culture, " +
				"brand, hiring and internal communication. You can catch Parshva travelling, dancing or coding outside of PlantForever.",
		},
		{
			name: "Harry Mahant",
			title: "Operation Manager (Edmonton)",
			photo: "harry",
			blurb: "Harry is a dedicated advocate for environmental sustainability and positive social change. " +
				"With two years of experience working with a nonprofit that assisted people with disabilities in finding employment, " +
				"he has always been passionate about making a difference. " +
				"Joining PlantForever allows him to contribute to combating climate change and promoting a greener future. " +
				"He is excited to be part of this mission and help make a lasting impact through planting trees and protecting our planet.",
		},
		{
			name: "Harman Kaur",
			title: "Operation Manager (Saskatoon)",
			photo: "harman",
			blurb: "Harman joined PlantForever in 2024 as an operation manager. " +
				"With several years of management experience, she now works in a financial sector. " +
				"She is passionate about protecting the planet, " +
				"and utilizes PlantForever as a platform to contribute towards environmental sustainability. " +
				"She really enjoys reading and exploring the nature.",
		},
		{
			name: "Coco Liliace",
			title: "Web Developer",
			photo: "coco",
			blurb: "Coco joined PlantForever in 2019 to help develop urban forests. " +
				"With a passion for web development, Coco works on modernizing the ways people can interact with, learn from, and contribute to PlantForever.",
		},
	];
	members.forEach(async member => member.photo = (await import(`../../../lib/assets/team/${member.photo}.jpg?enhanced`)).default); // eslint-disable-line require-atomic-updates
const members = [
	{
		name: "Marmik Patel",
		title: "President",
		photo: "marmik",
		blurb: "Marmik founded PlantForever in 2017 to develop urban forests through tree planting—an effort to mitigate the climate crisis. " +
			"He manages the organization, overseeing the executive team and providing a vision for PlantForever.",
	},
	{
		name: "Nathaniel Perumal",
		title: "VP Operations (Edmonton)",
		photo: "nate",
		blurb: "Nathaniel started off as a volunteer for PlantForever back in 2018 helping to plant trees across Edmonton. " +
			"Now at 21 years of age, this young environmentalist  continues  to make strides in his pursuit to help preserve the environment. " +
			"By managing the events he once helped with, Nathaniel is an integral part of the team. " +
			"He conducts all of the tree operations for PlantForever, coordinating with both homeowners and volunteers to achieve the goal of mitigating the climate crisis.",
	},
	{
		name: "Emeka Ozoh",
		title: "VP Operations (Saskatoon)",
		photo: "emeka",
		blurb: "Emeka started volunteering for PlantForever in July 2022. " +
			"He has several years of management experience spanning different sectors. " +
			"Also, he is currently an MBA student at the Edwards School of Business, University of Saskatchewan. " +
			"Emeka is passionate about saving the planet and is excited to contribute to that effort through PlantForever.",
	},
	{
		name: "Sheryn Baldas",
		title: "Marketing Manager",
		photo: "sheryn",
		blurb: "Sheryn Baldas began volunteering during the summer of 2023 as an Operations Manager, " +
			"but has since transitioned into our Marketing Management role. " +
			"She is currently studying at the University of Alberta, majoring in Design for Business/Marketing. " +
			"With a passion for environmental stewardship and conservation, " +
			"Sheryn aims to develop innovative solutions and strategies in order to expand PlantForever's reach to homeowners in the Edmonton community.",
	},
	{
		name: "Kevin Ang",
		title: "VP Finance",
		photo: "kevin",
		blurb: "Kevin is an international student from Indonesia. " +
			"He is 18 years old and he's going to UofA Business school, majoring in finance. " +
			"He has had a passion in finance since he was in middle school. " +
			"He has chosen to join PlantForever because he wants to make an impact in the world, " +
			"especially with the climate crisis as lots of recent disasters have been caused by it.",
	},
	{
		name: "Parshva Shah",
		title: "VP Internal",
		photo: "parshva",
		blurb: "Parshva Shah started volunteering for PlantForever during the summer of 2021 where he helped with tree transplantation. " +
			"He is now Vice President Internal and is responsible for developing organizational culture, " +
			"brand, hiring and internal communication. You can catch Parshva travelling, dancing or coding outside of PlantForever.",
	},
	{
		name: "Harry Mahant",
		title: "Operation Manager (Edmonton)",
		photo: "harry",
		blurb: "Harry is a dedicated advocate for environmental sustainability and positive social change. " +
			"With two years of experience working with a nonprofit that assisted people with disabilities in finding employment, " +
			"he has always been passionate about making a difference. " +
			"Joining PlantForever allows him to contribute to combating climate change and promoting a greener future. " +
			"He is excited to be part of this mission and help make a lasting impact through planting trees and protecting our planet.",
	},
	{
		name: "Harman Kaur",
		title: "Operation Manager (Saskatoon)",
		photo: "harman",
		blurb: "Harman joined PlantForever in 2024 as an operation manager. " +
			"With several years of management experience, she now works in a financial sector. " +
			"She is passionate about protecting the planet, " +
			"and utilizes PlantForever as a platform to contribute towards environmental sustainability. " +
			"She really enjoys reading and exploring the nature.",
	},
	{
		name: "Coco Liliace",
		title: "Web Developer",
		photo: "coco",
		blurb: "Coco joined PlantForever in 2019 to help develop urban forests. " +
			"With a passion for web development, Coco works on modernizing the ways people can interact with, learn from, and contribute to PlantForever.",
	},
];

const getImage = (() => {
	const images = import.meta.glob<Image>("../../../lib/assets/team/*", {
		eager: true,
		import: "default",
		query: { enhanced: true },
	});

	return (filename: string) => images[`../../../lib/assets/team/${filename}.jpg`];
})();

members.forEach(member => member.photo = getImage(member.photo));

export function load() {
	return {
		title: "Meet Our Team",
		description: "Meet the team behind PlantForever. We are a group of environmentalist who intend to inspire a movement empowering individuals to take actions globally.",