diff --git a/.prettierrc b/.prettierrc index b18bf8a..85bbebc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,7 +5,11 @@ "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", - "plugins": ["prettier-plugin-astro"], + "plugins": [ + "prettier-plugin-astro", + "prettier-plugin-tailwind-css", + "@brown-ccv/prettier-config" + ], "overrides": [ { "files": "*.astro", diff --git a/package-lock.json b/package-lock.json index 75c4b54..2078229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.0.5", "@astrojs/tailwind": "^5.1.0", + "@brown-ccv/prettier-config": "^0.3.0", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-form": "^0.0.3", @@ -39,7 +40,8 @@ "eslint": "^8.56.0", "eslint-plugin-astro": "^0.31.4", "prettier": "^3.2.5", - "prettier-plugin-astro": "^0.13.0" + "prettier-plugin-astro": "^0.13.0", + "prettier-plugin-tailwind-css": "^1.5.0" } }, "node_modules/@alloc/quick-lru": { @@ -655,6 +657,14 @@ "eslint-plugin-import": "^2.27.5" } }, + "node_modules/@brown-ccv/prettier-config": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@brown-ccv/prettier-config/-/prettier-config-0.3.0.tgz", + "integrity": "sha512-4JM926Y8S+W9XZ76brCOhnXrR4o+eGJE0OUlmGe+fVnG5lEFkLRxMT0sBuvDhJ0YmgicG/4vnRZxQfyC8AuZLg==", + "peerDependencies": { + "prettier": ">=3.0.0" + } + }, "node_modules/@codemirror/autocomplete": { "version": "6.9.1", "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.9.1.tgz", @@ -14865,7 +14875,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", - "devOptional": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -14896,6 +14905,30 @@ "integrity": "sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==", "devOptional": true }, + "node_modules/prettier-plugin-tailwind-css": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwind-css/-/prettier-plugin-tailwind-css-1.5.0.tgz", + "integrity": "sha512-LUbINk8O0l+r7iPO6fUOQtoZdF7lQ0SGZTrlAl6IjW8zc5URMGqdW2QVoIK2de2HQeKvb9X2xv8aUzf+v2UVYw==", + "dev": true, + "dependencies": { + "prettier": "^2.0.5" + } + }, + "node_modules/prettier-plugin-tailwind-css/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", diff --git a/package.json b/package.json index 3b61e1a..b201a3b 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.0.5", "@astrojs/tailwind": "^5.1.0", + "@brown-ccv/prettier-config": "^0.3.0", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-form": "^0.0.3", @@ -43,6 +44,7 @@ "eslint": "^8.56.0", "eslint-plugin-astro": "^0.31.4", "prettier": "^3.2.5", - "prettier-plugin-astro": "^0.13.0" + "prettier-plugin-astro": "^0.13.0", + "prettier-plugin-tailwind-css": "^1.5.0" } } diff --git a/src/components/ActivityPage.tsx b/src/components/ActivityPage.tsx index 8e244b9..7cca99e 100644 --- a/src/components/ActivityPage.tsx +++ b/src/components/ActivityPage.tsx @@ -24,7 +24,7 @@ const ActivityPage = () => { {user && activityData && (

- {activityData.length} download(s) + {activityData.length} download(s)

diff --git a/src/components/ActivityTable.tsx b/src/components/ActivityTable.tsx index 363de19..b93351b 100644 --- a/src/components/ActivityTable.tsx +++ b/src/components/ActivityTable.tsx @@ -7,10 +7,10 @@ export interface ActivityTableProps { const ActivityTable: React.FC = ({ data }) => { return ( -
- +
+
- + @@ -28,8 +28,8 @@ const ActivityTable: React.FC = ({ data }) => {
Description User Download Date
-

{name}

-

+

{name}

+

{email}

{institution}

diff --git a/src/components/Card.tsx b/src/components/Card.tsx index b3b230e..d9ce65f 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -14,11 +14,11 @@ const Card: React.FC = ({ link, image, title, name, institution, bio // strip 'public/' from the avatar string since astro's public folder is available without this in the link const imageURL = image?.replace("/public", "") return ( -
+
{image && (
{name} @@ -27,7 +27,7 @@ const Card: React.FC = ({ link, image, title, name, institution, bio
diff --git a/src/components/DataForm.tsx b/src/components/DataForm.tsx index eaaa7ea..ffa3aa6 100644 --- a/src/components/DataForm.tsx +++ b/src/components/DataForm.tsx @@ -23,7 +23,7 @@ const DataForm = () => { return ( diff --git a/src/components/Input.tsx b/src/components/Input.tsx index 1e097b5..3a8d66c 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -14,14 +14,14 @@ export const Input = React.forwardRef( return ( {label} -
+
{icon && {icon}}
- + Please enter your {label} {match !== undefined && ( diff --git a/src/components/Login.tsx b/src/components/Login.tsx index 1bff73a..859b9fb 100644 --- a/src/components/Login.tsx +++ b/src/components/Login.tsx @@ -34,7 +34,7 @@ const Login: React.FC = ({ currentUser, setUserFunction }) => { )}
- {message &&

{message}

} + {message &&

{message}

} ) } diff --git a/src/components/Publications.tsx b/src/components/Publications.tsx index b3349df..b36c864 100644 --- a/src/components/Publications.tsx +++ b/src/components/Publications.tsx @@ -58,7 +58,7 @@ const PublicationSection: React.FC = ({ publications }) => { <>

Featured Publications

-
-
+
} + icon={} placeholder="Durand, Jorge..." value={searchInput} onChange={handleChange} @@ -144,10 +144,10 @@ const PublicationSection: React.FC = ({ publications }) => { } > {option.label === "Books" && ( -
+
{pub.image ? ( ) : ( @@ -161,7 +161,7 @@ const PublicationSection: React.FC = ({ publications }) => { {pub.pdf && (
View PDF diff --git a/src/components/Textarea.tsx b/src/components/Textarea.tsx index 2ead700..cb532ae 100644 --- a/src/components/Textarea.tsx +++ b/src/components/Textarea.tsx @@ -14,14 +14,14 @@ export const Textarea = React.forwardRef( return ( {label} - + {characterCount}/{maxLength}