refactor: migrate Font Awesome to npm package

- Remove Font Awesome files from public/assets and update .gitignore
- Switch from CDN to local npm package for Font Awesome
- Update BaseLayout.astro to use Font Awesome from node_modules
- Add specific gitignore patterns for vendor files
- Keep public/assets directory structure for future custom assets

This change improves the project by:
1. Using proper dependency management through npm
2. Reducing external dependencies on CDN
3. Maintaining cleaner source control
4. Following best practices for vendor file management
This commit is contained in:
Peter Wood
2025-05-18 07:26:58 -04:00
parent 9ba3bccd56
commit a38c869770
5 changed files with 34 additions and 6768 deletions

9
.gitignore vendored
View File

@@ -7,6 +7,10 @@ dist/
# dependencies # dependencies
node_modules/ node_modules/
# vendor files
public/assets/fontawesome/
node_modules/@fortawesome/
# logs # logs
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
@@ -17,6 +21,9 @@ pnpm-debug.log*
.env .env
.env.production .env.production
# DevContainer environment files
.devcontainer/.env
# macOS-specific files # macOS-specific files
.DS_Store .DS_Store
@@ -28,5 +35,3 @@ pnpm-debug.log*
# Test coverage # Test coverage
coverage/ coverage/
# DevContainer environment files
.devcontainer/.env

2
package-lock.json generated
View File

@@ -811,6 +811,8 @@
}, },
"node_modules/@fortawesome/fontawesome-free": { "node_modules/@fortawesome/fontawesome-free": {
"version": "6.7.2", "version": "6.7.2",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz",
"integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==",
"license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)",
"engines": { "engines": {
"node": ">=6" "node": ">=6"

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,10 @@ const { title } = Astro.props;
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{title}</title> <title>{title}</title>
<link rel="stylesheet" href="/src/styles/radix-ui.css" /> <link rel="stylesheet" href="/src/styles/radix-ui.css" />
<link rel="stylesheet" href="/assets/fontawesome/css/all.min.css" /> <link
rel="stylesheet"
href="/node_modules/@fortawesome/fontawesome-free/css/all.min.css"
/>
<link rel="stylesheet" href="/src/styles/global.css" /> <link rel="stylesheet" href="/src/styles/global.css" />
</head> </head>
<body> <body>

View File

@@ -417,6 +417,18 @@ tbody tr:hover {
.button-icon { .button-icon {
flex-shrink: 0; flex-shrink: 0;
display: inline-block;
width: 1em;
height: 1em;
font-size: 1rem;
vertical-align: middle;
margin-right: 0.5rem;
}
.action-btn .fa-solid {
display: inline-block !important;
font-family: "Font Awesome 6 Free", sans-serif !important;
font-weight: 900 !important;
} }
.edit-btn { .edit-btn {
@@ -638,3 +650,12 @@ tbody tr:hover {
font-size: 1.8em; font-size: 1.8em;
} }
} }
/* Adding explicit styles for each icon */
.fa-pen-to-square::before {
content: "\f14b";
}
.fa-trash-can::before {
content: "\f2ed";
}