Clanek: manj oglasov - brez vmesnega cez zaslon, brez parallaxa, brez pasu nad sliko, v besedilu najvec dva
This commit is contained in:
parent
70f16e21c7
commit
11e61e5405
@ -9,12 +9,10 @@ import { Button } from "@/components/ui/button";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import Header from "@/components/header";
|
||||
import Footer from "@/components/footer";
|
||||
import AdSense, { InArticleAd, PageSideAds, MultiplexAd } from "@/components/adsense";
|
||||
import { InArticleAd, PageSideAds, MultiplexAd } from "@/components/adsense";
|
||||
import { useIsMobile } from "@/hooks/use-mobile";
|
||||
import DOMPurify from "dompurify";
|
||||
import ShareButtons from "@/components/share-buttons";
|
||||
import InterstitialAd from "@/components/interstitial-ad";
|
||||
import ParallaxAd from "@/components/parallax-ad";
|
||||
import { useEffect, useMemo } from "react";
|
||||
|
||||
const ALLOWED_IFRAME_DOMAINS = [
|
||||
@ -310,16 +308,6 @@ export default function ArticlePage() {
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<div className="mb-2 rounded-md overflow-hidden bg-card border border-card-border" data-testid="ad-above-image">
|
||||
<div className="text-[9px] text-muted-foreground/40 text-center pt-1 uppercase tracking-widest">Anzeige</div>
|
||||
<AdSense
|
||||
slot="4154017639"
|
||||
format="horizontal"
|
||||
style={{ display: "block", width: "100%", height: "90px" }}
|
||||
responsive={false}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{article.coverImage && (
|
||||
<div className="relative overflow-hidden rounded-md mb-5 max-h-[420px]">
|
||||
<img
|
||||
@ -383,6 +371,9 @@ export default function ArticlePage() {
|
||||
[&_div[style]]:flex [&_div[style]]:justify-center
|
||||
[&_blockquote:not(.instagram-media)]:border-l-primary [&_blockquote:not(.instagram-media)]:bg-accent/50 [&_blockquote:not(.instagram-media)]:rounded-r-md [&_blockquote:not(.instagram-media)]:py-1
|
||||
[&_.instagram-media]:!bg-transparent [&_.instagram-media]:!border-0 [&_.instagram-media]:!shadow-none [&_.instagram-media]:!p-0 [&_.instagram-media]:mx-auto`;
|
||||
// Najvec dva oglasa v besedilu: po prvem odstavku in na sredini.
|
||||
const last = segments.length - 1;
|
||||
const AD_AFTER = last <= 0 ? [] : (last === 1 ? [0] : [0, Math.floor(last / 2)]);
|
||||
return (
|
||||
<div ref={(el) => {
|
||||
if (!el) return;
|
||||
@ -403,7 +394,7 @@ export default function ArticlePage() {
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
data-testid={idx === 0 ? "article-content" : `article-content-${idx}`}
|
||||
/>
|
||||
{idx < segments.length - 1 && <InArticleAd />}
|
||||
{AD_AFTER.includes(idx) && <InArticleAd />}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@ -425,9 +416,7 @@ export default function ArticlePage() {
|
||||
|
||||
<RelatedArticles currentSlug={slug || ""} />
|
||||
</main>
|
||||
<ParallaxAd />
|
||||
<Footer narrow />
|
||||
<InterstitialAd />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user