-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove graduated coords (winter '24); add BartCard component an…
…d update about
- Loading branch information
Showing
9 changed files
with
143 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"_variables": { | ||
"lastUpdateCheck": 1730150118275 | ||
"lastUpdateCheck": 1736791334401 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { faLinkedin, faGithub } from "@fortawesome/free-brands-svg-icons"; | ||
import { faLink } from "@fortawesome/free-solid-svg-icons"; | ||
import type { CollectionEntry } from "astro:content"; | ||
import { getImage } from "astro:assets"; | ||
let { advisor } = Astro.props; | ||
let advisorInfo = (advisor as CollectionEntry<"advisors">).data; | ||
// Create advisor links array with icons | ||
const advisorLinks = [ | ||
{ | ||
givenLink: advisorInfo.personalLink, | ||
link: advisorInfo.personalLink, | ||
icon: faLink, | ||
} | ||
].filter((e) => e.givenLink); | ||
// Import and process images | ||
const images = import.meta.glob("../assets/**"); | ||
let formattedHoverImageURL: string | null = null; | ||
if (advisor.data.hover_image) { | ||
const hoverImageImport = | ||
await images[`../assets/profiles/${advisor.data.hover_image}`](); | ||
const hoverFormattedImage = await getImage({ | ||
src: hoverImageImport.default | ||
}); | ||
formattedHoverImageURL = hoverFormattedImage.src; | ||
} | ||
let formattedOriginalImageURL: string | null = null; | ||
if (advisor.data.image) { | ||
const originalImageImport = | ||
await images[`../assets/profiles/${advisor.data.image}`](); | ||
const originalFormattedImage = await getImage({ | ||
src: originalImageImport.default | ||
}); | ||
formattedOriginalImageURL = originalFormattedImage.src; | ||
} | ||
--- | ||
|
||
<div class="hover:-translate-y-1 hover:scale-105 duration-300 hover:shadow-2xl | ||
hover:shadow-red-800/50 shadow-xl font-lato bg-base-100 | ||
rounded-lg overflow-hidden flex flex-row w-full max-w-4xl mx-auto"> | ||
<figure class="w-1/4 flex-shrink-0"> | ||
{advisorInfo.image && formattedHoverImageURL == null && ( | ||
<img | ||
src={formattedOriginalImageURL} | ||
alt={advisorInfo.name} | ||
class="w-full h-full object-cover" | ||
/> | ||
)} | ||
{advisorInfo.image && formattedHoverImageURL != null && ( | ||
<img | ||
id="advisorImage" | ||
src={formattedOriginalImageURL} | ||
onmouseover="this.src=this.getAttribute('data-hover-src')" | ||
onmouseout="this.src=this.getAttribute('data-original-src')" | ||
alt={advisorInfo.name} | ||
class="w-full h-full object-cover" | ||
data-hover-src={formattedHoverImageURL} | ||
data-original-src={formattedOriginalImageURL} | ||
/> | ||
)} | ||
</figure> | ||
|
||
<div class="flex flex-col flex-grow p-8"> | ||
<div class="flex justify-between items-start mb-4"> | ||
<h1 class="text-3xl font-bold text-gray-800">{advisorInfo.name}</h1> | ||
<p class="text-lg text-gray-600">Faculty Advisor</p> | ||
</div> | ||
|
||
<p class="text-base text-gray-700 mb-6">{advisorInfo.bio}</p> | ||
|
||
<div class="space-y-2"> | ||
{advisorInfo.department && ( | ||
<p class="text-gray-700"> | ||
Department: {advisorInfo.department} | ||
</p> | ||
)} | ||
|
||
{advisorInfo.office && ( | ||
<p class="text-gray-700"> | ||
Office: {advisorInfo.office} | ||
</p> | ||
)} | ||
</div> | ||
|
||
<div class="flex mt-4"> | ||
{advisorLinks.map((e) => ( | ||
<a | ||
href={e.link} | ||
rel="noopener nofollow" | ||
target="_blank" | ||
class="text-gray-600 hover:text-red-600 transition-colors" | ||
> | ||
<FontAwesomeIcon icon={e.icon} size="lg" /> | ||
</a> | ||
))} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters