Skip to content

Commit

Permalink
更新宽屏广告展示
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzhonglian committed Jun 12, 2024
1 parent 9728354 commit 4c9ae42
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion basic_theme/assets/mobirise/css/mbr-additional.css
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ a {
}
.cid-sFzxmVl7J6 {
padding-top: 10rem;
padding-bottom: 10rem;
/* padding-bottom: 10rem; */
background-color: #ffffff;
}
.cid-sFzxmVl7J6 .row {
Expand Down
23 changes: 23 additions & 0 deletions basic_theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,28 @@
MkDocs version : {{ mkdocs_version }}
Docs Build Date UTC : {{ build_date_utc }}
-->

<script>
function adsCallbackWideScreen(data) {
document.getElementById('ads_banner_WideScreen').innerHTML = data.html;
}

// Create a script element to load the JSONP file
var script = document.createElement('script');
script.src = 'https://data.dafeiyang.cn/ads/banner_WideScreen.jsonp?callback=adsCallbackWideScreen';
document.body.appendChild(script);
</script>

<script>
function adsCallbackNarrowScreen(data) {
document.getElementById('ads_banner_NarrowScreen').innerHTML = data.html;
}

// Create a script element to load the JSONP file
var script = document.createElement('script');
script.src = 'https://data.dafeiyang.cn/ads/banner_NarrowScreen.jsonp?callback=adsCallbackNarrowScreen';
document.body.appendChild(script);
</script>

</body>
</html>
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
</div>
</section>

<!-- This div will be populated with the ad content -->
<div id="ads_banner_WideScreen" style="min-height: 150px;"></div>

<section data-bs-version="5.1" class="features23 cid-sFAyHxWQ1N" id="features24-20">
<div class="container">
<div class="row justify-content-center">
Expand Down

0 comments on commit 4c9ae42

Please sign in to comment.