Skip to content

Commit e477ea3

Browse files
committed
Update alex lint rules, fix X.com icon in footer
1 parent 5c1bc7b commit e477ea3

8 files changed

Lines changed: 52 additions & 31 deletions

File tree

.alexrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"allow": [
3+
"color",
4+
"colors",
5+
"failure",
36
"hostesses-hosts"
47
]
58
}

src/components/Footer/client/__tests__/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ describe('FooterElement web component', () => {
4545
const hireMeAnchor = element.querySelector<HTMLAnchorElement>('#page-footer__hire-me-anchor')
4646

4747
expect(hireMeAnchor).toBeInstanceOf(HTMLAnchorElement)
48-
expect(hireMeAnchor?.innerHTML).toBe('Available September, 2024. Hire Me Now')
48+
expect(hireMeAnchor?.innerHTML).toBe('Available October, 2024. Hire Me Now')
4949
expect(hireMeAnchor?.getAttribute('aria-label')).toBe(
50-
'Available September, 2024. Hire Me Now'
50+
'Available October, 2024. Hire Me Now'
5151
)
5252
expect(hireMeAnchor?.style.display).toBe('inline-block')
5353
})

src/components/Footer/client/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export class FooterElement extends LitElement {
5454
}
5555

5656
private static getMonthName(date: Date): string {
57-
const monthDate = new Date(date)
58-
monthDate.setMonth(monthDate.getMonth() - 1)
59-
return monthDate.toLocaleString('en-US', { month: 'long' })
57+
return date.toLocaleString('en-US', { month: 'long' })
6058
}
6159
}
6260

src/components/Footer/footer.module.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,33 @@
3131
stroke: var(--color-secondary);
3232
}
3333

34+
.footerSocialBlurbText {
35+
color: var(--color-content);
36+
text-decoration: none;
37+
}
38+
39+
.footerSocialLink:hover .footerSocialBlurbText,
40+
.footerSocialLink:focus-visible .footerSocialBlurbText {
41+
color: var(--color-content);
42+
}
43+
44+
.footerSocialLink :global([data-icon='x'] path) {
45+
stroke: none;
46+
}
47+
48+
.footerSocialLink :global([data-icon='x'] .xTile) {
49+
fill: var(--color-content);
50+
}
51+
52+
.footerSocialLink :global([data-icon='x'] .xGlyph) {
53+
fill: var(--color-content-inverse);
54+
}
55+
56+
.footerSocialLink:hover :global([data-icon='x'] .xTile),
57+
.footerSocialLink:focus-visible :global([data-icon='x'] .xTile) {
58+
fill: var(--color-secondary);
59+
}
60+
3461
.footerSocialBlurb {
3562
margin-top: 0.25rem;
3663
}

src/components/Footer/footer.module.css.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ declare const styles: {
55
readonly footerSocialList: string
66
readonly footerSocialItem: string
77
readonly footerSocialLink: string
8+
readonly footerSocialHeaderRow: string
89
readonly footerSocialIcon: string
910
readonly footerSocialPlatform: string
1011
readonly footerSocialBlurb: string
12+
readonly footerSocialBlurbText: string
1113
readonly footerBottomRow: string
1214
readonly footerBottomGrid: string
1315
readonly footerBottomPrimary: string

src/components/Footer/index.astro

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const year = new Date().getFullYear()
7474
id="page-footer__hire-me-anchor"
7575
class:list={[
7676
styles.footerHireMeAnchor,
77-
"hidden uppercase hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary after:content-['>']",
77+
"hidden uppercase hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary after:ml-1 after:content-['>']",
7878
]}
7979
aria-label="Available Now. Hire Me"
8080
>
@@ -84,7 +84,7 @@ const year = new Date().getFullYear()
8484

8585
{/* Page footer Social Share links */}
8686
<nav class={styles.footerSocial} aria-label="Social links">
87-
<ul class:list={[styles.footerSocialList, 'm-0 p-0 list-none']}>
87+
<ul class:list={[styles.footerSocialList, 'mt-4 sm:m-0 p-0 list-none']}>
8888
{
8989
contactData.company.social
9090
.sort((a, b) => a.order - b.order)
@@ -96,19 +96,23 @@ const year = new Date().getFullYear()
9696
rel="me"
9797
class:list={[
9898
styles.footerSocialLink,
99-
'flex items-baseline uppercase hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary',
99+
'group flex flex-col hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary',
100100
]}
101101
>
102-
<span class={styles.footerSocialIcon}>
103-
<Icon name={social.iconName} variant="inherit" />
102+
<span class:list={[styles.footerSocialHeaderRow, 'flex items-baseline']}>
103+
<span class={styles.footerSocialIcon}>
104+
<Icon name={social.iconName} variant="inherit" />
105+
</span>
106+
<span class:list={[styles.footerSocialPlatform, 'ml-2 mt-4 uppercase']}>
107+
{social.displayName}
108+
</span>
104109
</span>
105-
<span class:list={[styles.footerSocialPlatform, 'ml-2 mt-4']}>
106-
{social.displayName}
110+
<span class:list={[styles.footerSocialBlurb, 'font-serif leading-tight']}>
111+
<span class={styles.footerSocialBlurbText}>
112+
{social.blurb}
113+
</span>
107114
</span>
108115
</a>
109-
<div class:list={[styles.footerSocialBlurb, 'font-serif leading-tight']}>
110-
{social.blurb}
111-
</div>
112116
</li>
113117
))
114118
}

src/content.config.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,6 @@ const testFixtureCollection = defineCollection({
147147
* =================================================================================
148148
*/
149149

150-
/**
151-
* About
152-
*/
153-
const aboutCollection = defineCollection({
154-
loader: glob({ pattern, base: './src/content/about' }),
155-
schema: withBreadcrumbTitleWarning(
156-
z.object({
157-
id: z.string(),
158-
title: z.string(),
159-
}),
160-
'about'
161-
),
162-
})
163-
164150
/**
165151
* Authors
166152
*/
@@ -239,7 +225,6 @@ const testimonialCollection = defineCollection({
239225
*/
240226

241227
export const collections = {
242-
about: aboutCollection,
243228
articles: articlesCollection,
244229
authors: authorsCollection,
245230
caseStudies: caseStudiesCollection,

src/icons/x.svg

Lines changed: 3 additions & 1 deletion
Loading

0 commit comments

Comments
 (0)