Skip to content

Commit f3edfba

Browse files
authored
fix
1 parent f983444 commit f3edfba

4 files changed

Lines changed: 37 additions & 7 deletions

File tree

_includes/telegram-button.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<a href="https://t.me/rheuiii" class="telegram-button" id="telegramButton" target="_blank" rel="noopener noreferrer">
2+
Reach me on Telegram
3+
</a>
4+
<script>
5+
const telegramBtn = document.getElementById('telegramButton');
6+
window.addEventListener('scroll', () => {
7+
if (window.scrollY > (document.body.scrollHeight / 2)) {
8+
telegramBtn.classList.add('active');
9+
} else {
10+
telegramBtn.classList.remove('active');
11+
}
12+
});
13+
</script>

_layouts/default.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ <h2 class="project-tagline">{{ page.description | default: site.description | de
8383
{% if site.github.is_project_page %}
8484
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
8585
{% endif %}
86-
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
86+
<span class="site-footer-credits">Zakhar Pashkin. All Rights Reserved.</a>.</span>
8787
</footer>
8888
</main>
8989
{% include back-to-top.html %}
90+
{% include telegram-button.html %}
9091
<script>
9192
document.addEventListener('DOMContentLoaded', function () {
9293
document.querySelectorAll('img:not([loading])').forEach(function (img) {
@@ -95,4 +96,4 @@ <h2 class="project-tagline">{{ page.description | default: site.description | de
9596
});
9697
</script>
9798
</body>
98-
</html>
99+
</html>

assets/css/custom.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ img {
3636
display: block;
3737
}
3838

39+
.telegram-button {
40+
position: fixed;
41+
bottom: 1rem;
42+
left: 1rem;
43+
display: none;
44+
padding: 0.5rem 0.75rem;
45+
background: #0088cc;
46+
color: #fff;
47+
border-radius: 4px;
48+
text-decoration: none;
49+
}
50+
51+
.telegram-button.active {
52+
display: block;
53+
}
54+
3955
.ascii-banner {
4056
color: #39ff14;
4157
text-shadow: 0 0 5px #39ff14;
@@ -46,4 +62,4 @@ img {
4662
.ascii-banner {
4763
display: none;
4864
}
49-
}
65+
}

assets/images/favicon.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)