調整列表頁樣式

This commit is contained in:
kroutony 2020-02-26 11:29:05 +08:00
parent 40155a3944
commit 03ec7ed141
2 changed files with 21 additions and 15 deletions

View File

@ -18,7 +18,7 @@ main {
}
body.post-archive {
.container {
.posts {
display: flex;
flex-wrap: wrap;
}
@ -30,6 +30,10 @@ body.post-archive {
flex: 1;
flex-basis: calc(33.33% - 10px);
}
.pagination {
display: flex;
justify-content: center;
}
}
body.single-post {

View File

@ -4,22 +4,24 @@
<div class="container">
<div class="row">
<div class="col">
@foreach($posts as $post)
<article>
<div class="row">
<div class="col">
<?php if($post->featureImage): ?>
<div class="img-wrapper">
<img src="{{ $post->featureImage->url }}" alt="{{ $post->featureImage->description }}" class="post-feature-image">
<div class="posts">
@foreach($posts as $post)
<article>
<div class="row">
<div class="col">
<?php if($post->featureImage): ?>
<div class="img-wrapper">
<img src="{{ $post->featureImage->url }}" alt="{{ $post->featureImage->description }}" class="post-feature-image">
</div>
<?php endif; ?>
<h2 class="title"><a href="{{ route($resource . '.show', [$post->id]) }}">{{ $post->title }}</a></h2>
<div class="excerpt">{{ $post->excerpt }}</div>
<div class="date">{{ $post->created_at }}</div>
</div>
<?php endif; ?>
<h2 class="title"><a href="{{ route($resource . '.show', [$post->id]) }}">{{ $post->title }}</a></h2>
<div class="excerpt">{{ $post->excerpt }}</div>
<div class="date">{{ $post->created_at }}</div>
</div>
</div>
</article>
@endforeach
</article>
@endforeach
</div>
</div>
</div>
<div class="row">