-
-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Testimonials): add testimonials to website (#1104)
Co-authored-by: Genteure <Genteure@users.noreply.github.com> Co-authored-by: Reuben Tier <TheOtterlord@users.noreply.github.com> Co-authored-by: Atharva Pise <atharvapise19@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Kevin Zuniga Cuellar <46791833+kevinzunigacuellar@users.noreply.github.com> Co-authored-by: Vitor Ayres <61759797+vasfvitor@users.noreply.github.com> Co-authored-by: Mark Peck <2244813+doodlemarks@users.noreply.github.com>
- Loading branch information
1 parent
0533ba8
commit 238e361
Showing
15 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
--- | ||
interface Props { | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<div class="testimonial-wrapper not-content"> | ||
<h2 class="testimonial-grid-title">{title}</h2> | ||
<ul class="testimonial-grid"> | ||
<slot /> | ||
</ul> | ||
</div> | ||
|
||
<style> | ||
.testimonial-wrapper { | ||
margin-block: 7rem 2.5rem !important; | ||
font-size: clamp(var(--sl-text-sm), calc(0.5rem + 1vw), var(--sl-text-body)); | ||
} | ||
.testimonial-grid-title { | ||
text-align: center; | ||
font-size: var(--sl-text-h3); | ||
font-weight: 600; | ||
color: var(--sl-color-white); | ||
line-height: var(--sl-line-height-headings); | ||
} | ||
.testimonial-grid { | ||
margin-top: 2.5rem; | ||
display: grid; | ||
gap: 5em; | ||
padding-inline-start: 0; | ||
} | ||
@media (min-width: 50rem) { | ||
.testimonial-grid { | ||
grid-template-columns: 1fr 1fr; | ||
} | ||
} | ||
</style> |
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,90 @@ | ||
--- | ||
import type { ImageMetadata } from 'astro'; | ||
import { Image } from 'astro:assets'; | ||
interface Props { | ||
handle: string; | ||
name: string; | ||
cite: string; | ||
} | ||
const { name, handle, cite } = Astro.props; | ||
const avatars = import.meta.glob<{ default: ImageMetadata }>('../assets/testimonials/*.jpg'); | ||
const avatar = avatars[`../assets/testimonials/${handle}.jpg`]; | ||
if (!avatar) { | ||
throw new Error(`Could not resolve testimonial avatar for @${handle}`); | ||
} | ||
const src = (await avatar()).default; | ||
--- | ||
|
||
<li class="testimonial"> | ||
<blockquote class="quote" cite={cite}> | ||
<slot /> | ||
</blockquote> | ||
<div class="footer"> | ||
<Image class="avatar" height="96" width="96" {src} alt="" /> | ||
<div> | ||
<p class="name">{name}</p> | ||
<a href={cite} class="handle">@{handle}</a> | ||
</div> | ||
</div> | ||
</li> | ||
|
||
<style> | ||
.testimonial { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1.5em; | ||
} | ||
@media (min-width: 50rem) { | ||
.testimonial { | ||
gap: 2em; | ||
} | ||
} | ||
.quote { | ||
position: relative; | ||
padding-inline-start: 1.5em; | ||
} | ||
.quote::before { | ||
position: absolute; | ||
content: ''; | ||
inset-block: 0.5em; | ||
inset-inline-start: 0; | ||
border-inline-start: 1px solid var(--sl-color-text-accent); | ||
} | ||
.quote > :global(* + *) { | ||
margin-top: 0.75em; | ||
} | ||
|
||
.footer { | ||
display: flex; | ||
gap: 1rem; | ||
align-items: center; | ||
} | ||
.avatar { | ||
--outline-color: rgba(255, 255, 255, 0.33); | ||
outline: 1px solid var(--outline-color); | ||
outline-offset: -1px; | ||
border-radius: 99rem; | ||
width: 4em; | ||
height: 4em; | ||
} | ||
:global([data-theme='light']) .avatar { | ||
--outline-color: rgba(23, 25, 30, 0.33); | ||
} | ||
|
||
.name { | ||
font-weight: 600; | ||
font-size: var(--sl-text-h4); | ||
color: var(--sl-color-white); | ||
line-height: var(--sl-line-height-headings); | ||
} | ||
.handle { | ||
text-underline-offset: 4px; | ||
color: var(--sl-color-text-accent); | ||
} | ||
.handle:hover { | ||
color: var(--sl-color-white); | ||
} | ||
</style> |
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
238e361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
starlight-i18n – ./docs/lunaria
starlight-i18n-git-main-astrodotbuild.vercel.app
starlight-i18n-astrodotbuild.vercel.app
starlight-i18n.vercel.app
i18n.starlight.astro.build