diff --git a/src/apps/Projects/ProjectsGrid/ProjectsGrid.tsx b/src/apps/Projects/ProjectsGrid/ProjectsGrid.tsx index 098859c..63a1c68 100644 --- a/src/apps/Projects/ProjectsGrid/ProjectsGrid.tsx +++ b/src/apps/Projects/ProjectsGrid/ProjectsGrid.tsx @@ -12,7 +12,7 @@ export const ProjectsGrid = (props: ProjectsGridProps) => { return (
{props.projects.map((p) => ( - + ))}
); diff --git a/src/components/ProjectCard/ProjectCard.css b/src/components/ProjectCard/ProjectCard.css index 76f63cc..d668130 100644 --- a/src/components/ProjectCard/ProjectCard.css +++ b/src/components/ProjectCard/ProjectCard.css @@ -23,6 +23,14 @@ border-top-left-radius: 5px; border-top-right-radius: 5px; box-shadow: 0 2px 2px 0 var(--gray-300); + position: relative; +} + +.project-card-last-edited { + position: absolute; + bottom: 0; + right: 8px; + padding-bottom: 3px; } .project-card-footer { @@ -44,6 +52,7 @@ overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; + line-clamp: 2; display: -webkit-box; } diff --git a/src/components/ProjectCard/ProjectCard.tsx b/src/components/ProjectCard/ProjectCard.tsx index 017ee3b..2915d13 100644 --- a/src/components/ProjectCard/ProjectCard.tsx +++ b/src/components/ProjectCard/ProjectCard.tsx @@ -1,4 +1,4 @@ -import type { ProjectData } from '@ty/Types.ts'; +import type { ProjectData, Translations } from '@ty/Types.ts'; import * as Tooltip from '@radix-ui/react-tooltip'; import './ProjectCard.css'; @@ -6,21 +6,29 @@ import { Avatar } from '@components/Avatar/Avatar.tsx'; type ProjectCardProps = { project: ProjectData; - lang: string; + i18n: Translations; }; export const ProjectCard = (props: ProjectCardProps) => { + const { t, lang } = props.i18n; + return (

{props.project.project.title}

{props.project.project.description}
+
+ {`${t['Last Edited']} ${new Date( + props.project.project.updated_at || + props.project.project.created_at + ).toLocaleDateString('en-US')}`} +
diff --git a/src/i18n/en/projects.json b/src/i18n/en/projects.json index 94df0bc..cc059ff 100644 --- a/src/i18n/en/projects.json +++ b/src/i18n/en/projects.json @@ -20,5 +20,6 @@ "Disable Auto-Generation": "Disable Auto-Generation", "Re-Enable Auto-Generation": "Re-Enable Auto-Generation", "home": "Home", - "event": "Event" + "event": "Event", + "Last Edited": "Last Edited" } \ No newline at end of file diff --git a/src/themes/default/index.css b/src/themes/default/index.css index 50098c8..8c5e47e 100644 --- a/src/themes/default/index.css +++ b/src/themes/default/index.css @@ -178,6 +178,13 @@ h3 { font-size: 10px; } +.av-body-small-italic { + font-family: Inter; + font-size: 14px; + font-weight: 400; + font-style: italic; +} + p { margin: 0.8em 0; padding: 0;