Skip to content

Commit

Permalink
hub recipe adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed May 27, 2024
1 parent 531bda7 commit dab720e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ENV CYPRESS_INSTALL_BINARY=0
ENV PNPM_HOME=/usr/local/share/pnpm
ENV PATH="$PNPM_HOME:$PATH"

ENV VITE_APP_GNOCCHI_ORIGIN=https://gnocchi.biscuits.club

FROM base as dev
COPY ./pnpm-lock.yaml .
RUN pnpm fetch
Expand Down
3 changes: 2 additions & 1 deletion apps/gnocchi/hub/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function App({
<article
itemScope
itemType="https://schema.org/Recipe"
className="h-recipe"
className="h-recipe flex flex-col gap-4 items-stretch"
>
<TopLineRoot>
{data.mainImageUrl && (
Expand All @@ -56,6 +56,7 @@ export function App({
</P>
</TopLineTitle>
</TopLineRoot>
{data.note && <Note className="self-start">{data.note}</Note>}
{data.prelude && (
<div>
<Suspense>
Expand Down
2 changes: 1 addition & 1 deletion apps/gnocchi/hub/src/components/MainImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function MainImage({ url, title }: MainImageProps) {
<TopLineImage className="block relative w-full h-30vh rounded-lg overflow-hidden">
<img
src={url}
className={clsx('u-photo', 'object-cover object-center')}
className={clsx('u-photo', 'object-cover object-center w-full h-full')}
alt={`A photo of ${title}`}
/>
</TopLineImage>
Expand Down
1 change: 1 addition & 0 deletions apps/gnocchi/hub/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export interface HubRecipeData {
publisher: {
fullName: string;
};
note?: string;
}
1 change: 1 addition & 0 deletions server/src/routers/gnocchi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ gnocchiRouter.get('/hubRecipe/:planId/:recipeSlug', async (req) => {
mainImageUrl: snapshot.mainImage?.url,
ingredients: snapshot.ingredients,
instructions: snapshot.instructions,
note: snapshot.note,
publisher: {
fullName: recipe.publisherFullName ?? 'Anonymous',
},
Expand Down

0 comments on commit dab720e

Please sign in to comment.