Przeglądaj źródła

Add more padding to bottom of page and account for header when deciding whether a post is in view

sbkwgh 7 lat temu
rodzic
commit
90b28cee5b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      frontend/src/components/routes/Thread.vue

+ 2 - 2
frontend/src/components/routes/Thread.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class='route_container'>
+	<div class='route_container' style='padding-bottom: 17.5rem;'>
 		<confirm-modal v-model='showConfirmModal' @confirm='deleteThread' text='Delete' color='red'>
 			Are you sure you want to delete this thread?
 			<br>This <b>cannot</b> be undone
@@ -346,7 +346,7 @@
 				let topPostInView = posts.find(post => {
 					let rect = post.$el.getBoundingClientRect()
 
-					return (rect.top >= 0) && (rect.bottom <= window.innerHeight)
+					return (rect.top >= 74) && (rect.bottom <= window.innerHeight)
 				})
 
 				let postIndex = posts.indexOf(topPostInView)