Improve Board style

This commit is contained in:
riggraz
2019-09-05 13:51:17 +02:00
parent f9f2b291d6
commit 12121218e2
2 changed files with 38 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ const PostList = ({ posts, areLoading, error, handleLoadMore, page, hasMore }: P
loadMore={handleLoadMore}
threshold={50}
hasMore={hasMore}
loader={<Spinner />}
loader={<Spinner key={0} />}
useWindow={true}
>
{posts.map((post, i) => (

View File

@@ -1,3 +1,38 @@
@media (max-width: 800px) {
.boardContainer {
flex-direction: column;
.sidebar {
position: relative;
width: 100%;
top: 0;
.sidebar-box {
width: 100%;
}
}
.box {
width: 100%;
}
}
}
@media (min-width: 801px) {
.boardContainer {
flex-direction: row;
.sidebar {
position: sticky;
top: 20px;
.sidebar-box {
width: 250px;
}
}
}
}
.boardContainer {
display: flex;
flex: 1 1 auto;
@@ -5,15 +40,11 @@
align-items: flex-start;
flex-wrap: nowrap;
.sidebar {
top: 20px;
position: sticky;
.sidebar-box {
flex: 0 0 auto;
width: 250px;
display: flex;
flex-direction: column;
justify-content: flex-start;
@@ -116,6 +147,7 @@
flex: 1 1 auto;
.postLink {
display: block;
text-decoration: none;
border-radius: 4px;
margin: 8px 0;