Skip to content

Commit 6fd3099

Browse files
Issue #466: Podcast page and blog announcement (#471)
* Added podcast pages, content and blog. * Fixed branding issue in topic list for blogs * Moved `escape-room` content * Move form components into separate directory * Photo updates for staff members --------- Co-authored-by: Brian Montgomery <brian@accessiblecommunity.org>
1 parent ee006dc commit 6fd3099

47 files changed

Lines changed: 336 additions & 57 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ifdef OS
99
FixPath = $(subst /,\,$1)
1010
# The set command will return an error, even though it succeeds.
1111
else
12-
WriteCmd = printf
12+
WriteCmd = printf
1313
RemoveCmd = rm -rf
1414
RemoveDirCmd = rm -rf
1515
FixPath = $1
@@ -24,7 +24,7 @@ up:
2424
down:
2525
@docker compose down
2626

27-
shell:
27+
shell: up
2828
@docker compose exec $(CONTAINER) bash
2929

3030
dist: clean-js-dist $(SOURCE_DIR)/dist

astro/astro.config.mjs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import path from "path";
2-
import { fileURLToPath } from "url";
3-
4-
// https://flaviocopes.com/fix-dirname-not-defined-es-module-scope/
5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = path.dirname(__filename);
7-
81
import { defineConfig } from "astro/config";
92
import styleGuide from "./style-guide/register.js";
103

@@ -67,14 +60,16 @@ export default defineConfig({
6760
// Contact Info
6861
'envelope-at-fill', 'telephone-fill', 'geo-alt-fill',
6962
// Social Media
70-
'facebook', 'instagram', 'linkedin', 'rss-fill', 'tiktok', 'youtube','globe', 'mastodon', 'twitter',
63+
'facebook', 'instagram', 'linkedin', 'rss-fill', 'tiktok', 'globe', 'mastodon', 'twitter',
7164
// Descriptive
7265
'gift-fill', 'pencil-fill', 'people-fill', 'person-fill', 'puzzle-fill', 'stopwatch-fill', 'tools',
7366
],
7467
// CoreUI Brands
7568
cib: [
7669
// Social Media
7770
'facebook', 'instagram', 'linkedin', 'mastodon', 'twitter',
71+
// Streaming
72+
'apple-podcasts', 'youtube',
7873
// Payment
7974
"cc-paypal", "cc-stripe", "paypal", "stripe",
8075
],

astro/src/components/Branding.astro

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ interface Props {
66
}
77
88
let {
9-
text = "",
9+
"text": inputText = "",
1010
class: extraClasses = "",
1111
"no-aria": noAria = false,
1212
} = Astro.props;
1313
14-
if (Astro.slots.has("default")) text = await Astro.slots.render("default");
14+
if (Astro.slots.has("default")) inputText = await Astro.slots.render("default");
1515
16-
text = text
16+
const text = inputText
1717
.replace(/Accessib(le)/, '<span class="fw-lighter">Accessib$1</span>')
1818
.replace(
19-
/(glob|mutu|loc|t)a11y/i,
20-
noAria ?
21-
'<span class="text-lowercase">$1<span class="fw-lighter">a11y</span></span>'
19+
// Sometimes the YAML parsing inserts a space between => "a 11 y"
20+
// TODO: Fix capitalization of second word for programs.
21+
/(glob|mutu|loc|t)a\s?11\s?y/i,
22+
noAria
23+
? '<span class="text-lowercase">$1<span class="fw-lighter">a11y</span></span>'
2224
: '<span class="text-lowercase" aria-hidden="true">$1<span class="fw-lighter">a11y</span></span><span class="visually-hidden">$1ally</span>',
2325
)
2426
.replace(
@@ -33,6 +35,8 @@ text = text
3335
'<span class="text-lowercase">$1<span class="fw-lighter">able</span></span>'
3436
: '<span class="text-lowercase" aria-hidden="true">$1<span class="fw-lighter">able</span></span><span class="visually-hidden">$1able</span>',
3537
);
38+
39+
const cssClasses = inputText === text ? [extraClasses] : ["text-brand fw-bold", extraClasses];
3640
---
3741

3842
{/* Style is up top to remove additional whitespace after the tag */}
@@ -43,4 +47,4 @@ text = text
4347
line-height: normal;
4448
}
4549
</style>
46-
<span class:list={["text-brand fw-bold", extraClasses]} set:html={text} />
50+
<span class:list={cssClasses} set:html={text} />

astro/src/components/Footer.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ const Socials = [
147147
<li>
148148
<a class="link-light footer-link" href="/blog">Our Blog</a>
149149
</li>
150+
<li>
151+
<a class="link-light footer-link" href="/podcasts">Our Podcasts</a>
152+
</li>
150153
<li><hr class="border-light" /></li>
151154
<li>
152155
<a

astro/src/components/NavSiteList.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ const { main = false, class: classes = "" } = Astro.props;
6464
<li>
6565
<a class="dropdown-item" href="/blog">Our Blog</a>
6666
</li>
67+
<li>
68+
<a class="dropdown-item" href="/podcasts">Our Podcasts</a>
69+
</li>
6770
<li><hr class="dropdown-divider" /></li>
6871
<li>
6972
<a class="dropdown-item" href="/globa11y/"

astro/src/components/SocialLinks.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
import { capitalize, isEmpty, toPairs } from "lodash-es";
2+
import { isEmpty, kebabCase, startCase, toPairs } from "lodash-es";
33
import { Icon } from "astro-icon/components";
44
55
// TODO: Not specific enough as a type
6-
interface SocialLinkDictionary {
7-
[index: string]: URL;
6+
export interface SocialLinkDictionary {
7+
[index: string]: URL | undefined;
88
}
99
1010
interface LinkConfig {
@@ -31,11 +31,11 @@ const socialLinks: Array<LinkConfig> = toPairs(links).map(([type, url]) => {
3131
if (type == "email") return "envelope-at";
3232
else if (type == "threads") return "threads-logo-black";
3333
else if (type == "website") return "bi:globe";
34-
else return `cib:${type}`;
34+
else return `cib:${kebabCase(type)}`;
3535
})();
3636
3737
const href = type == "email" ? `mailto:${url}` : url;
38-
const service = type == "linkedin" ? "LinkedIn" : capitalize(type);
38+
const service = type == "linkedin" ? "LinkedIn" : startCase(type);
3939
const description = type == "email" ? "address" : "profile";
4040
const theme = brandingThemes[type] ?? type;
4141
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
import { getCollection, type CollectionEntry } from 'astro:content';
3+
import { sortBy } from "lodash-es";
4+
5+
interface Props {
6+
team: string; // TODO: declare enum;
7+
}
8+
9+
const { team } = Astro.props;
10+
const staff: CollectionEntry<"staff">[] = sortBy(
11+
await getCollection(
12+
"staff", ({data}) => data.current && Object.keys(data.roles ?? {}).includes(team)
13+
),
14+
// Alphabetize by first name
15+
({data}) => data.cited?.first || data.name.first,
16+
);
17+
18+
import TeamVignette from "@components/TeamVignette.astro";
19+
---
20+
21+
<ul class="list-inline-block text-center px-2 px-md-4">
22+
{staff.map((member) => {
23+
return (
24+
<li class="list-inline-item staff-list-item my-2 m-md-2 w-100">
25+
<div class="text-start bg-body shadow-sm rounded-1 p-2 pt-3 fs-4">
26+
<TeamVignette
27+
{member}
28+
role={team}
29+
firstNameOnly
30+
highlightName
31+
branded
32+
showLinks
33+
valign="start"
34+
size="lg"
35+
/>
36+
</div>
37+
</li>
38+
);
39+
})}
40+
</ul>
41+
<style>
42+
.staff-list-item {
43+
max-width: 18rem;
44+
}
45+
.staff-list-item :global(.vignette-name) {
46+
color: var(--bs-primary-text-emphasis);
47+
margin-bottom: -0.1em;
48+
}
49+
.staff-list-item :global(.vignette-title) {
50+
line-height: 1.1em;
51+
}
52+
</style>

astro/src/components/TeamVignette.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function getLinkIcon(linkType: string) {
7070
phone: "bi:telephone-fill",
7171
facebook: "bi:facebook",
7272
instagram: "bi:instagram",
73-
youtube: "bi:youtube",
73+
youtube: "cib:youtube",
7474
};
7575
return iconMap[linkType] || "bi:link-45deg";
7676
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)