feat: some ads basework

This commit is contained in:
TrèsAbhi committed 2024-10-09 22:35:10 -05:00
1 parent e52063c12d
commit 9923efe8ab
4 files changed
+64 -73

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import type { APIContext } from 'astro';
export const prerender = false;
export async function GET({}: APIContext) {
const response = await fetch(
`https://api.nitropay.com/v1/ads-${import.meta.env.PUBLIC_NITROPAY_ID}.txt`,
);
const text = await response.text();
const date = new Date();
const content = `# Generated on ${date.toUTCString()}\n\n${text}`;
return new Response(content);
}
+5 -4
View File
@@ -1,5 +1,6 @@
---
import { Box, Flex, Heading } from '@radix-ui/themes';
import { Ad } from '../components/Ad';
import HomeHero from '../components/HomeHero.astro';
import { Plugs } from '../components/Plugs.tsx';
import ToolCard from '../components/ToolCard.astro';
@@ -29,13 +30,13 @@ import RootLayout from '../layouts/RootLayout.astro';
<ToolCard tool={tankPerformanceTool} />
</Flex>
<!-- {
!exempt && (
{
(
<Flex justify="center">
<AdMidSectionResponsive />
<Ad client:only="react" />
</Flex>
)
} -->
}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={sessionTool} />