Skip to content

Commit

Permalink
Fixed blog-post ordering (by desc)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdevxy committed Nov 29, 2024
1 parent 5690997 commit f88f91d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/src/main/resources/graphql/find-blog-posts.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query findBlogPosts($limit: Int = 100, $skip: Int = 0, $locale: String = "en", $preview: Boolean = false) {
pageBlogPostCollection(limit: $limit, skip: $skip, locale: $locale, preview: $preview) {
pageBlogPostCollection(limit: $limit, skip: $skip, locale: $locale, preview: $preview, order: publishedDate_DESC) {
total
limit
items {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void findBlogPost_NotFound() {
void findBlogPosts() {
// given
wiremock.register(post(urlPathEqualTo("/")).withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer PUBLISHED"))
.withRequestBody(containing("query findBlogPosts($limit: Int = 100, $skip: Int = 0, $locale: String = \\\"en\\\", $preview: Boolean = false)"))
.withRequestBody(containing("query findBlogPosts($limit: Int = 100, $skip: Int = 0, $locale: String = \\\"en\\\", $preview: Boolean = false, order: publishedDate_DESC)"))
.willReturn(ok().withBodyFile("find-blog-posts.json")));

// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void findBlogPost_NotFound() {
void findBlogPosts() {
// given
wiremock.register(post(urlPathEqualTo("/")).withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer PREVIEW"))
.withRequestBody(containing("query findBlogPosts($limit: Int = 100, $skip: Int = 0, $locale: String = \\\"en\\\", $preview: Boolean = false)"))
.withRequestBody(containing("query findBlogPosts($limit: Int = 100, $skip: Int = 0, $locale: String = \\\"en\\\", $preview: Boolean = false, order: publishedDate_DESC)"))
.willReturn(ok().withBodyFile("find-blog-posts.json")));

// when
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="h{heading} px-5">{value}</p>
<p class="h{heading} blog-header">{value}</p>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{#if image.fullWidth}
<img src="{image.url}" style="width: 100%; object-fit: cover; object-position: 50% 50%;" alt="{image.title}">
{#else}
<img src="{image.url}" style="width: {image.width}px; height: {image.height};" alt="{image.title}">
<img src="{image.url}" style="width: {image.width}; height: {image.height};" alt="{image.title}" class="img-fluid">
{/if}
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="py-3 px-5 fs-5">
<div class="blog-paragraph">
{#include blog/blog-text blocks=blocks}{/include}
</div>
21 changes: 21 additions & 0 deletions component/src/main/resources/web/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
background-color: #23123B
}

.blog-header{
padding-right: 3rem !important;
padding-left: 3rem !important;
}

.blog-paragraph {
padding: 1rem 3rem !important;
font-size:1.25rem !important;
}

@media only screen and (max-width: 767px) {
.blog-paragraph {
padding: 1rem 1rem !important;
font-size: 1.25rem !important;
}
.blog-header{
padding-right: 1rem !important;
padding-left: 1rem !important;
}
}

.card-with-effect {
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
background: #fff;
Expand Down

0 comments on commit f88f91d

Please sign in to comment.