Skip to content

Commit aabd65d

Browse files
committed
final adsense test
1 parent 5d700b0 commit aabd65d

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

main.py

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_user_data(session):
8787
Script(src="/_vercel/insights/script.js"),
8888
Link(href="https://cdn.jsdelivr.net/npm/daisyui@4.12.12/dist/full.min.css",rel="stylesheet",type="text/css"),
8989
Script(src="https://unpkg.com/htmx-ext-sse@2.2.1/sse.js"),
90-
Script(custom_element="amp-ad" ,src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"),
90+
Meta(name="google-adsense-account" ,content="ca-pub-2090178937498462"),
9191
Script(src="https://cdn.tailwindcss.com"),
9292
Title("OpenSAT"),
9393
Style(open('main.css').read())
@@ -429,25 +429,22 @@ def generate_question_cards():
429429
for i, x in enumerate(question_objects(section))
430430
]
431431
def ad_maven_card():
432-
"""
433-
Returns a FastHTML component rendering an AdSense advertisement card.
434-
"""
435432
return Div(
436-
Script(
437-
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2090178937498462",
438-
crossorigin="anonymous"
439-
),
440-
Ins(
441-
cls="adsbygoogle",
442-
style="display:block",
443-
data_ad_client="ca-pub-2090178937498462",
444-
data_ad_slot="8188391527",
445-
data_ad_format="auto",
446-
data_full_width_responsive="true"
447-
),
448-
Script("(adsbygoogle = window.adsbygoogle || []).push({});"),
449-
cls="w-96 h-auto mx-auto my-4 shadow-lg border rounded-lg p-4"
450-
)
433+
Script(
434+
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2090178937498462',
435+
crossorigin='anonymous'
436+
),
437+
Ins(
438+
cls="adsbygoogle",
439+
style="display:block",
440+
data_ad_format="fluid",
441+
data_ad_layout_key="-6w+ed+2i-1n-4w",
442+
data_ad_client="ca-pub-2090178937498462",
443+
data_ad_slot="7186574111"
444+
),
445+
Script("(adsbygoogle = window.adsbygoogle || []).push({});"),
446+
cls="card bg-base-200 shadow-xl w-96 h-auto mx-auto rounded-lg"
447+
)
451448

452449

453450

0 commit comments

Comments
 (0)