Proper post word wrapping #3
2 changed files with 14 additions and 4 deletions
|
@ -16,7 +16,11 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// Infinite loading function
|
// Infinite loading function
|
||||||
const onInfinite = ({ detail: { loaded, complete } } : { detail : { loaded : () => void, complete : () => void}}) => {
|
const onInfinite = ({
|
||||||
|
detail: { loaded, complete },
|
||||||
|
}: {
|
||||||
|
detail: { loaded: () => void; complete: () => void };
|
||||||
|
}) => {
|
||||||
getNextPosts().then((newPosts) => {
|
getNextPosts().then((newPosts) => {
|
||||||
console.log("Loading next posts...");
|
console.log("Loading next posts...");
|
||||||
if (newPosts.length > 0) {
|
if (newPosts.length > 0) {
|
||||||
|
@ -53,9 +57,7 @@
|
||||||
{#each posts as postObject}
|
{#each posts as postObject}
|
||||||
<PostComponent post={postObject as Post} />
|
<PostComponent post={postObject as Post} />
|
||||||
{/each}
|
{/each}
|
||||||
<InfiniteLoading on:infinite={onInfinite}
|
<InfiniteLoading on:infinite={onInfinite} distance={3000} />
|
||||||
distance={3000}
|
|
||||||
/>
|
|
||||||
<div id="spacer"></div>
|
<div id="spacer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -213,6 +213,14 @@
|
||||||
#postText {
|
#postText {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
word-wrap: break-word;
|
||||||
|
-ms-word-break: break-all;
|
||||||
|
word-break: break-word;
|
||||||
|
-ms-hyphens: auto;
|
||||||
|
-moz-hyphens: auto;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
hyphens: auto;
|
||||||
}
|
}
|
||||||
#headerText {
|
#headerText {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue