Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierniki committed Oct 18, 2023
2 parents 5a3b114 + 788f535 commit cb9b1df
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 13 deletions.
8 changes: 7 additions & 1 deletion src/app/[lang]/article/[slug]/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { Skeleton } from "@/components/ui/Skeleton/Skeleton"

export default function Loading() {
return null
return (
<div className="w-full">
<Skeleton className="min-h-[150px] w-full" />
</div>
)
}
9 changes: 6 additions & 3 deletions src/components/ArticleCard/ArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type ArticleCardProps = {
locale: Locale
lines?: "1" | "2" | "3"
isMain?: boolean
imageClassName?: string
}

export const hygraphArticleToCardProps = (article: {
Expand Down Expand Up @@ -53,6 +54,7 @@ export function ArticleCard({
lines = "2",
locale,
isMain = false,
imageClassName,
}: ArticleCardProps) {
const mainTag = tags?.[0]
return (
Expand All @@ -67,9 +69,10 @@ export function ArticleCard({
>
<div
className={cn(
orientation === "horizontal" && "min-h-[82px] md:w-1/2 md:min-w-[204px]",
"bg-gradient-to-brh-[264px] relative h-[82px] min-h-[82px] w-[82px] from-gray-200 to-gray-300 md:min-h-[264px] md:w-full",
isMain && "min-h-[264px] w-auto"
orientation === "horizontal" ? "min-h-[82px] md:min-w-[204px]" : "md:w-full",
"bg-gradient-to-brh-[264px] relative h-[82px] min-h-[82px] w-[82px] from-gray-200 to-gray-300 md:min-h-[264px]",
isMain && "min-h-[264px] w-auto",
imageClassName
)}
>
{imageUrl && (
Expand Down
6 changes: 3 additions & 3 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export async function Footer({ lang, footer }: FooterProps) {
})}
</ul>
</nav>
<div className="flex flex-col justify-between gap-10 lg:gap-0">
<div className="flex w-1/3 justify-end lg:w-full">
<div className="flex flex-col justify-between gap-10 lg:items-end lg:gap-0">
<div className="w-1/3">
<DynamicLangSelect />
</div>
<p className="text-sm text-custom-gray-300">
© {new Date().getFullYear()} {companyName} All rights reserved.
© {new Date().getFullYear()} {companyName} {footer?.ownershipAndCredits}
</p>
</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/components/LangSelect/LangSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ function LangSelect() {

return (
<Select value={lang} onValueChange={(locale) => router.push(`/${locale}`)}>
<SelectTrigger
className="w-full min-w-full rounded-xl bg-white lg:w-[70px] lg:min-w-[70px]"
aria-label="language select"
>
<SelectTrigger className="w-full min-w-full rounded-xl bg-white lg:min-w-[80px]" aria-label="language select">
<SelectValue>{lang.toUpperCase()}</SelectValue>
</SelectTrigger>
<SelectContent className="bg-white">
Expand Down
7 changes: 6 additions & 1 deletion src/components/RecentArticles/RecentArticlesInfinite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ export function RecentArticlesInfinite({ initialArticles }: RecentArticlesInfini

return (
<section className="flex flex-col gap-5">
<ArticleCard article={hygraphArticleToCardProps(firstArticle)} orientation="horizontal" locale={locale} />
<ArticleCard
article={hygraphArticleToCardProps(firstArticle)}
orientation="horizontal"
locale={locale}
imageClassName="w-1/2"
/>
<div className="grid gap-5 md:grid-cols-3">
{otherArticles.map((article) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/TrendingArticles/TrendingArticles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function TrendingArticles({ locale, title }: TrendingArticlesProps)
</div>

{minifiedArticles.length > 0 && (
<div className="col-span-1 flex flex-col gap-5">
<div className="col-span-1 flex flex-col gap-[1.13rem] lg:gap-[1.17rem]">
{minifiedArticles.map((article) => {
return (
<ArticleMinifiedCard
Expand Down
1 change: 1 addition & 0 deletions src/lib/queries/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const getNavigationQuery = graphql(`
logo {
url
}
ownershipAndCredits
companyName
youtubeLink
twitterLink
Expand Down

0 comments on commit cb9b1df

Please sign in to comment.