{
let pageMetadata = $ref>();
const widgetsEl = $ref();
+const postButton = $ref();
const widgetsShowing = $ref(false);
provide('router', mainRouter);
@@ -134,17 +135,15 @@ onMounted(() => {
window.addEventListener('resize', () => {
if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true;
let scrollPos = 0;
- const postButton = document.getElementById('postButton');
function checkPosition() {
let windowY = window.scrollY;
- if (postButton != null) {
- if (windowY < scrollPos) {
- postButton.style.transform = 'scale(1)';
- } else {
- postButton.style.transform = 'scale(0)';
- }
- }
+ postButton.style.transform = `scale(${windowY < scrollPos ? '1' : '0'})`;
+ // if (windowY < scrollPos) {
+ // postButton.style.transform = 'scale(1)';
+ // } else {
+ // postButton.style.transform = 'scale(0)';
+ // }
scrollPos = windowY;
}