style: flipping cards as background

This commit is contained in:
Riccardo
2023-12-16 23:27:07 +01:00
parent 9ab92751bd
commit d0028457ef
13 changed files with 284 additions and 32 deletions

17
app/api/news/route.ts Normal file
View File

@@ -0,0 +1,17 @@
import prisma from '../../../prisma/prisma';
import { ApiResponse } from '../../../utils/apiResponse';
export async function GET() {
const news = await prisma.news.findMany({
orderBy: {
createdAt: 'desc'
},
take: 50
});
if (news && news.length === 50) {
return ApiResponse(200, JSON.stringify(news));
}
return ApiResponse(500, 'Internal server error');
}

View File

@@ -66,16 +66,6 @@
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
@apply bg-custom-background bg-size-cover;
}
}
.styledH2 {
@apply text-xl font-bold;
}

View File

@@ -1,6 +1,7 @@
import { Analytics } from '@vercel/analytics/react';
import type { Metadata } from 'next';
import { Inter as FontSans } from 'next/font/google';
import { Background } from '../components/custom/background/background';
import { cn } from '../utils/utils';
import './globals.css';
@@ -29,7 +30,7 @@ export default function RootLayout({
fontSans.variable
)}
>
{children}
<Background>{children}</Background>
<Analytics />
</body>
</html>

View File

@@ -434,7 +434,7 @@ export default function Privacy() {
title='Privacy Policy'
description='Last updated: December 03, 2023'
content={body}
style='w-2/3'
style='w-2/3 overflow-auto h-[90vh]'
/>
);
}