mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-06 01:10:40 +01:00
feat: ads
This commit is contained in:
1 parent
e370a53473
commit
626eb7e2d6
5 files changed
+28
-25
No files matched your search
Vendored
+1
@@ -93,6 +93,7 @@
|
|||||||
"Minotauro",
|
"Minotauro",
|
||||||
"MIPMAPCOUNT",
|
"MIPMAPCOUNT",
|
||||||
"mišek",
|
"mišek",
|
||||||
|
"mmnow",
|
||||||
"modeltransform",
|
"modeltransform",
|
||||||
"MURICA",
|
"MURICA",
|
||||||
"NEGATIVEX",
|
"NEGATIVEX",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import { Flex } from '@radix-ui/themes';
|
import { Flex } from '@radix-ui/themes';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
import { Ad, AdType } from '../../../components/Ad';
|
||||||
import PageWrapper from '../../../components/PageWrapper';
|
import PageWrapper from '../../../components/PageWrapper';
|
||||||
import { TankSearch } from './components/TankSearch';
|
import { TankSearch } from './components/TankSearch';
|
||||||
|
|
||||||
@@ -11,6 +12,10 @@ export default function Page() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<PageWrapper size={1200} color="purple">
|
<PageWrapper size={1200} color="purple">
|
||||||
|
<Flex justify="center">
|
||||||
|
<Ad type={AdType.TankopediaHorizontal800} style={{ flex: 1 }} />
|
||||||
|
</Flex>
|
||||||
|
|
||||||
<TankSearch
|
<TankSearch
|
||||||
onSelect={(tank) => {
|
onSelect={(tank) => {
|
||||||
router.push(`./tankopedia/${tank.id}`);
|
router.push(`./tankopedia/${tank.id}`);
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { ComponentProps, useEffect } from 'react';
|
||||||
|
|
||||||
|
export enum AdType {
|
||||||
|
TankopediaHorizontal800 = 738182777,
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AdProps extends ComponentProps<'div'> {
|
||||||
|
type: AdType;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Ad({ type, ...props }: AdProps) {
|
||||||
|
useEffect(() => {
|
||||||
|
(window as any).msAdsQueue.push(function () {
|
||||||
|
(window as any).mmnow.render({ adUnitId: type, elementId: type });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return <div id={`${type}`} {...props} />;
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
export function AdHorizontal() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<script
|
|
||||||
async
|
|
||||||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1289406790225052"
|
|
||||||
crossOrigin="anonymous"
|
|
||||||
/>
|
|
||||||
<ins
|
|
||||||
className="adsbygoogle"
|
|
||||||
style={{ display: 'block' }}
|
|
||||||
data-ad-client="ca-pub-1289406790225052"
|
|
||||||
data-ad-slot="2391822409"
|
|
||||||
data-ad-format="auto"
|
|
||||||
data-full-width-responsive="true"
|
|
||||||
/>
|
|
||||||
<script
|
|
||||||
dangerouslySetInnerHTML={{
|
|
||||||
__html: `(adsbygoogle = window.adsbygoogle || []).push({});`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -36,7 +36,7 @@ export function Party3() {
|
|||||||
{/* pub center */}
|
{/* pub center */}
|
||||||
<script
|
<script
|
||||||
async
|
async
|
||||||
src="https://adsdk.microsoft.com/pubcenter/sdk.js?siteId=364600&publisherId=253617120"
|
src="https://adsdk.microsoft.com/mmnow/sdk.js?siteId=364645&publisherId=253617120"
|
||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in new issue
Block a user