-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from xfiveco/XCORNER-19-blog-page
XCORNER-19 blog page
- Loading branch information
Showing
14 changed files
with
162 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.c-blog-post { | ||
display: flex; | ||
flex-direction: column; | ||
gap: rem-calc(24px); | ||
|
||
@include bp(medium) { | ||
flex-direction: row; | ||
} | ||
|
||
@include bp(large) { | ||
gap: rem-calc(50px); | ||
} | ||
} | ||
|
||
.c-blog-post__image-wrapper { | ||
display: block; | ||
aspect-ratio: 230 / 132; | ||
width: 100%; | ||
height: auto; | ||
position: relative; | ||
|
||
@include bp(medium) { | ||
width: 230px; | ||
} | ||
|
||
@include bp(large) { | ||
aspect-ratio: 450 / 260; | ||
width: 450px; | ||
} | ||
} | ||
|
||
.c-blog-post__image { | ||
width: 100%; | ||
height: auto; | ||
object-fit: cover; | ||
aspect-ratio: 230 / 132; | ||
|
||
@include bp(large) { | ||
aspect-ratio: 450 / 260; | ||
} | ||
} | ||
|
||
.c-blog-post__title { | ||
font-family: $font-semi-bold; | ||
font-weight: 600; | ||
font-size: rem-calc(20px); | ||
line-height: rem-calc(24px); | ||
text-decoration: none; | ||
color: $color-black; | ||
|
||
@include bp(medium) { | ||
font-size: rem-calc(24px); | ||
line-height: rem-calc(40px); | ||
} | ||
|
||
&:hover { | ||
color: $color-black; | ||
} | ||
} | ||
|
||
.c-blog-post__meta { | ||
font-family: $font-regular; | ||
font-weight: 400; | ||
font-size: rem-calc(16px); | ||
line-height: rem-calc(24px); | ||
color: $color-neutrals-300; | ||
} | ||
|
||
.c-blog-post__summary { | ||
font-family: $font-regular; | ||
font-weight: 400; | ||
font-size: rem-calc(18px); | ||
line-height: rem-calc(24px); | ||
color: $color-neutrals-500; | ||
} | ||
|
||
.c-blog-post__read-more { | ||
font-family: $font-semi-bold; | ||
font-weight: 600; | ||
font-size: rem-calc(18px); | ||
line-height: rem-calc(24px); | ||
color: $color-primary-300; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ | |
@import 'wishlist'; | ||
@import 'facet'; | ||
@import 'accordion'; | ||
@import 'blog-post'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.p-blog { | ||
display: flex; | ||
flex-direction: column; | ||
gap: rem-calc(24px); | ||
|
||
@include bp(large) { | ||
gap: rem-calc(50px); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
@import './create-account'; | ||
@import './forgot-password'; | ||
@import './page'; | ||
@import './blog'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
<article> | ||
<header> | ||
{{#if post.thumbnail}} | ||
<figure> | ||
<a href="{{post.url}}"> | ||
{{> components/common/image | ||
image=post.thumbnail | ||
fallback_size=theme_settings.blog_size | ||
}} | ||
</a> | ||
</figure> | ||
{{/if}} | ||
<h{{#if is_blog_post}}1{{else}}2{{/if}}> | ||
<a href="{{post.url}}"> | ||
{{post.title}} | ||
</a> | ||
</h{{#if is_blog_post}}1{{else}}2{{/if}}> | ||
<p> | ||
{{#if post.author}}{{lang 'blog.posted_by' name=post.author}} on {{/if}}<time>{{post.date_published}}</time> | ||
</p> | ||
</header> | ||
<div> | ||
{{#if post.body}} | ||
{{{post.body}}} | ||
{{else}} | ||
{{{post.summary}}} | ||
{{#if post.show_read_more}} | ||
… | ||
<a href="{{url}}" aria-label="{{post.title}} {{lang 'blog.read_more'}}"> | ||
{{lang 'blog.read_more'}} | ||
</a> | ||
{{/if}} | ||
{{/if}} | ||
</div> | ||
{{#if show_tags}} | ||
{{#if post.tags}} | ||
<ul> | ||
{{#each post.tags}} | ||
<li> | ||
<a href="{{url}}"> | ||
#{{name}} | ||
</a> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
{{/if}} | ||
{{/if}} | ||
{{>components/common/share url=post.url}} | ||
</article> | ||
<article class="c-blog-post"> | ||
<header class="c-blog-post__header"> | ||
{{#if post.thumbnail}} | ||
<a class="c-blog-post__image-wrapper" href="{{post.url}}"> | ||
{{> components/common/image | ||
image=post.thumbnail | ||
fallback_size=theme_settings.blog_size | ||
class="c-blog-post__image" | ||
}} | ||
</a> | ||
{{/if}} | ||
</header> | ||
<div class="c-blog-post__body"> | ||
<h{{#if is_blog_post}}1{{else}}2{{/if}}> | ||
<a class="c-blog-post__title" href="{{post.url}}"> | ||
{{post.title}} | ||
</a> | ||
</h{{#if is_blog_post}}1{{else}}2{{/if}}> | ||
<p class="c-blog-post__meta"> | ||
{{#if post.author}}{{lang 'blog.posted_by' name=post.author}} on {{/if}}<time>{{post.date_published}}</time> | ||
</p> | ||
<p class="c-blog-post__summary"> | ||
{{#if post.body}} | ||
{{{post.body}}} | ||
{{else}} | ||
{{{post.summary}}} | ||
{{/if}} | ||
… | ||
</p> | ||
{{#if post.show_read_more}} | ||
<a class="c-blog-post__read-more" href="{{url}}" aria-label="{{post.title}} {{lang 'blog.read_more'}}"> | ||
{{lang 'blog.read_more'}} | ||
</a> | ||
{{/if}} | ||
</div> | ||
{{#if show_tags}} | ||
{{#if post.tags}} | ||
<ul> | ||
{{#each post.tags}} | ||
<li> | ||
<a href="{{url}}"> | ||
#{{name}} | ||
</a> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
{{/if}} | ||
{{/if}} | ||
{{>components/common/share url=post.url}} | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters