Skip to content

Commit

Permalink
fix - layout on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
yatho committed May 7, 2024
1 parent d2ed2c6 commit 880b985
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/routes/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<p>Published at {formatDate(data.meta.date)}</p>
</div>

<!-- Tags -->
<div class="tags">
{#each data.meta.categories as category}
<span>{category}</span>
Expand Down
25 changes: 18 additions & 7 deletions src/routes/posts/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
text-decoration: underline;
}
ul {
padding: 0;
}
.post {
margin-bottom: 1rem;
list-style: none;
Expand All @@ -53,21 +57,28 @@
border-color: hsl(0, 0%, 90%);
}
& section {
display: flex;
align-items: baseline;
justify-content: space-between;
& .title {
@media screen and (width >= 768px){
display: flex;
align-items: baseline;
justify-content: space-between;
}
& .data {
display: flex;
flex-direction: column;
align-items: flex-end;
@media screen and (width < 768px){
flex-direction: row-reverse;
justify-content: space-between;
}
}
& .time {
font-size: 0.8rem;
color: #666;
}
font-size: 0.8rem;
color: #666;
}
}
}
</style>
1 change: 1 addition & 0 deletions src/routes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
body {
margin: 0;
background-color: var(--color-bg);
min-width: 200px;
}

h1 {
Expand Down

0 comments on commit 880b985

Please sign in to comment.