Added adsense

This commit is contained in:
Torsten Schulz
2024-02-12 14:58:13 +01:00
parent 9c704825cd
commit e75482793e
2 changed files with 12 additions and 1 deletions

View File

@@ -8,9 +8,15 @@ html, body {
background: #ffffff;
color: #005100;
}
.header > div,
.header > span {
display: inline-block;
vertical-align: middle;
}
h1 {
padding: 0 0.5em;
margin: 0;
display: inline-block;
}
.menu {
background-color: #2E7D32;

View File

@@ -117,7 +117,12 @@ Wt::WHBoxLayout *App::createActionLayout(Wt::WVBoxLayout *verticalContainer) {
void App::createHeadContainer(Wt::WVBoxLayout *layout) {
auto header = layout->addNew<Wt::WContainerWidget>();
header->addNew<Wt::WText>("<h1>ypChat</h1>");
header->addNew<Wt::WText>("<h1>ypChat</h1>")->setInline(true);
header->addNew<Wt::WText>((std::string)"<script async src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456\" crossorigin=\"anonymous\"></script>"
+ "<ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px\" "
+ "data-ad-client=\"ca-pub-1104166651501135\" data-ad-slot=\"8252321071\"></ins> "
+ "<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>", Wt::TextFormat::UnsafeXHTML)
->setInline(true);
header->setStyleClass("header");
}