Skip to content

Commit

Permalink
add buy me coffee.
Browse files Browse the repository at this point in the history
  • Loading branch information
binchenX committed Jul 13, 2024
1 parent 43d4244 commit ca14585
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/assets/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.custom-coffee-link-container {
position: fixed;
top: 0;
right: 0;
z-index: 1000;
background-color: #f8f9fa;
padding: 10px;
}
4 changes: 4 additions & 0 deletions docs/assets/inject-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
document.addEventListener("DOMContentLoaded", function () {
var linkHtml = '<div class="custom-coffee-link-container"><a href="https://ko-fi.com/binchenx" target="_blank">Buy Me Coffee</a></div>';
document.body.insertAdjacentHTML('afterbegin', linkHtml);
});
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ nav:
- Network: "ch7.md"
- CNI: "ch8.md"

extra_css:
- assets/custom.css
extra_javascript:
- assets/inject-link.js

theme:
name: material

0 comments on commit ca14585

Please sign in to comment.