Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing configuration for FontAwesome icons #108

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions ui/src/app/(home)/_components/after-login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ const AfterLogin = async () => {
' Search for and manage any grouping on behalf of the owner.',
href: '/admin',
icon: faKey,
width: 48,
height: 48,
role: Role.ADMIN,
ariaLabel: 'key'
},
Expand All @@ -37,8 +35,6 @@ const AfterLogin = async () => {
description: 'View and manage my memberships. Search for new groupings to join as a member.',
href: '/memberships',
icon: faIdCard,
width: 54,
height: 48,
number: numberOfMemberships,
role: Role.UH,
ariaLabel: 'id-card'
Expand All @@ -49,8 +45,6 @@ const AfterLogin = async () => {
'Review members, manage Include and Exclude lists, ' + 'configure preferences, and export members.',
href: '/groupings',
icon: faWrench,
width: 48,
height: 48,
number: numberOfGroupings,
role: Role.OWNER,
ariaLabel: 'wrench'
Expand All @@ -67,7 +61,7 @@ const AfterLogin = async () => {
className="flex justify-center items-center rounded-full
h-[100px] w-[100px] bg-white mx-auto relative lg:ml-0"
>
<FontAwesomeIcon className="w-14 h-16" aria-label="user" icon={faUser} />
<FontAwesomeIcon className="fa-4x" aria-label="user" icon={faUser} />
<div
className="bg-blue-background rounded-full flex justify-center
items-center h-[30px] w-[30px] absolute left-3 bottom-0 ml-16"
Expand Down Expand Up @@ -104,8 +98,7 @@ const AfterLogin = async () => {
<div className="flex items-center mb-1">
<FontAwesomeIcon
icon={pageInfoItem.icon}
style={{ width: `${pageInfoItem.width}px`, height: `${pageInfoItem.height}px` }}
className="mr-5 mb-4 max-w-${pageInfoItem.icon.width} h-auto text-text-primary"
className="mr-5 mb-4 fa-3x h-auto text-text-primary"
aria-label={pageInfoItem.ariaLabel}
/>
{pageInfoItem.number !== null && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const SideNav = ({ groupingPath }: { groupingPath: string }) => {
<FontAwesomeIcon
aria-hidden="true"
icon={icon}
className="w-5 h-5 text-text-primary"
className="text-text-primary"
/>
</Link>
</TooltipTrigger>
Expand Down
5 changes: 5 additions & 0 deletions ui/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import Navbar from '@/components/layout/navbar/navbar';
import Footer from '@/components/layout/footer';
import type { Metadata } from 'next';

// FontAwesome configuration.
import { config } from '@fortawesome/fontawesome-svg-core';
import '@fortawesome/fontawesome-svg-core/styles.css';
config.autoAddCss = false;

const sourceSans3 = Source_Sans_3({
subsets: ['latin'],
weight: ['400', '600', '700', '900'],
Expand Down
Loading