Skip to content

Commit 205bf75

Browse files
committed
fix: search select links and add ad placements
1 parent c4d8b17 commit 205bf75

File tree

3 files changed

+36
-14
lines changed

3 files changed

+36
-14
lines changed

partials/footer.html

+24-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row" style="margin-bottom: 0;">
44
<div class="s12 m10 offset-m1">
55
<div class="row" style="gap:2rem;">
6-
<div class="s12 l4">
6+
<div class="s12 m6 l4">
77
<h5>Help Materialize Grow</h5>
88
<p class="grey-text text-darken-2">
99
We hope you have enjoyed using Materialize and if you feel like it
@@ -17,7 +17,8 @@ <h5>Help Materialize Grow</h5>
1717
>Contribute</a
1818
>
1919
</div>
20-
<div class="s12 l4">
20+
21+
<div class="s12 m6 l4">
2122
<h5>Join the Discussion</h5>
2223
<p class="grey-text text-darken-2">
2324
We have a Gitter chat room set up where you can talk directly with
@@ -31,18 +32,30 @@ <h5>Join the Discussion</h5>
3132
>Chat</a
3233
>
3334
</div>
34-
<div class="s12 l4" style="overflow: hidden;">
35+
36+
<div class="s12 m6 l4" style="overflow: hidden;">
3537
<h5>Star us</h5>
36-
<iframe
37-
src="https://ghbtns.com/github-btn.html?user=materializecss&amp;repo=materialize&amp;type=watch&amp;count=true&amp;size=large"
38-
allowtransparency="true"
39-
frameborder="0"
40-
scrolling="0"
41-
width="170"
42-
height="30"
43-
></iframe>
38+
<div>
39+
<iframe
40+
src="https://ghbtns.com/github-btn.html?user=materializecss&amp;repo=materialize&amp;type=watch&amp;count=true&amp;size=large"
41+
allowtransparency="true"
42+
frameborder="0"
43+
scrolling="0"
44+
width="170"
45+
height="30"
46+
></iframe>
47+
</div>
48+
49+
<!-- Ad Placements -->
50+
<div style="width: 100%;">
51+
<small>Advertisment</small>
52+
<div
53+
style="border: 1px dotted red; height: 90px; width: 100%; "
54+
></div>
55+
</div>
4456
</div>
4557
</div>
58+
4659
<div class="footer-copyright">
4760
© 2014-
4861
<noscript>2018</noscript>

partials/navbar.html

+9
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,14 @@
9696
</li>
9797
</ul>
9898
</li>
99+
100+
<!-- Ad Placements -->
101+
<li
102+
class="surface"
103+
style="height: 100px; width: 100%; left: 0; bottom: 0; position: sticky;"
104+
>
105+
<small>Advertisment</small>
106+
<div style="border: 1px dotted red; height: 90px; width: 100%; "></div>
107+
</li>
99108
</ul>
100109
</header>

src/main.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ document.addEventListener("DOMContentLoaded", function() {
5050
onAutocomplete: (items) => {
5151
if (items.length === 1) {
5252
const targetItem = items[0];
53-
document.location.assign("/" + targetItem.url);
53+
document.location.href = targetItem.url;
5454
}
5555
},
5656
});
@@ -84,11 +84,11 @@ document.addEventListener("DOMContentLoaded", function() {
8484

8585
const footerElem = document.querySelector("body > footer");
8686
const footerOffset = footerElem
87-
? // https://youmightnotneedjquery.com/#offset
88-
footerElem.getBoundingClientRect().top -
87+
? footerElem.getBoundingClientRect().top -
8988
window.scrollY +
9089
document.documentElement.clientTop
9190
: 0;
91+
9292
const bottomOffset =
9393
footerOffset - socialHeight - tocHeight - tocWrapperHeight;
9494

0 commit comments

Comments
 (0)