Skip to content

Commit 1a8aabb

Browse files
committed
fix: adjust ad dimensions and styles for better responsiveness
1 parent 162de52 commit 1a8aabb

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

docs/assets/css/ads.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
right: 20px;
139139
bottom: 20px;
140140
z-index: 1000;
141-
width: 340px;
141+
width: 320px;
142142
background: transparent;
143143
border-radius: 8px;
144144
padding: 10px;
@@ -199,11 +199,16 @@
199199

200200
.left-sidebar-ad {
201201
display: block !important;
202-
width: 320px !important;
203-
height: 60px !important;
202+
width: 300px !important;
203+
height: 300px !important;
204204
margin: 0 auto;
205205
background: #f8f9fa;
206206
border-radius: 4px;
207+
aspect-ratio: 1 / 1 !important;
208+
min-width: 250px;
209+
min-height: 250px;
210+
max-width: 300px;
211+
max-height: 300px;
207212
}
208213

209214
/* Dark Mode Fixed Left Ad */
@@ -231,12 +236,12 @@
231236
@media (min-width: 1400px) {
232237
.fixed-left-ad {
233238
right: 40px;
234-
width: 370px;
239+
width: 320px;
235240
}
236241

237242
.left-sidebar-ad {
238-
width: 350px !important;
239-
height: 60px !important;
243+
width: 300px !important;
244+
height: 300px !important;
240245
}
241246
}
242247

docs/overrides/main.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
<div class="fixed-ad-wrapper">
3838
<button class="ad-close-btn" onclick="closeAd()" aria-label="Close advertisement">×</button>
3939
<ins class="adsbygoogle left-sidebar-ad"
40-
style="display:block"
40+
style="display:block; width:300px; height:300px;"
4141
data-ad-client="ca-pub-9818368894527523"
4242
data-ad-slot="7345696411"
43-
data-ad-format="horizontal"
44-
data-full-width-responsive="false"></ins>
43+
data-ad-format="square"
44+
data-full-width-responsive="true"></ins>
4545
<script>
4646
(adsbygoogle = window.adsbygoogle || []).push({});
4747
</script>

0 commit comments

Comments
 (0)