-
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.
Updated Categor Page and Other Related Contents
- Loading branch information
1 parent
51884e4
commit 8927501
Showing
15 changed files
with
282 additions
and
127 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
126 changes: 126 additions & 0 deletions
126
src/_assets/css/scss/page/_base-articles-category-page.scss
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,126 @@ | ||
.articles-category-page { | ||
padding: 0; | ||
margin: 0; | ||
display: grid; | ||
grid-template-columns: 2fr 1fr; | ||
gap: var(--three-spacing); | ||
|
||
@media screen and (max-width:800px) { | ||
gap: var(--two-spacing); | ||
} | ||
|
||
&__content { | ||
order: 1; | ||
grid-column: 1; | ||
grid-row: span 3; | ||
|
||
&-header { | ||
background-color: var(--bg-primary); | ||
padding: var(--three-spacing) var(--two-spacing); | ||
border-top-right-radius: 0.25rem; | ||
border-bottom-right-radius: 0.25rem; | ||
|
||
@media screen and (max-width:800px) { | ||
padding: var(--two-spacing) var(--default-spacing); | ||
margin-right: var(--default-spacing); | ||
} | ||
|
||
> ul { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
gap: var(--default-spacing); | ||
color: var(--text-lightgray); | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
|
||
a { | ||
color: var(--text-lightgray); | ||
} | ||
} | ||
|
||
> h1 { | ||
color: #fff; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
> p { | ||
margin: var(--default-spacing) 0 0 0; | ||
padding: 0; | ||
} | ||
} | ||
|
||
&-list { | ||
margin: var(--two-spacing) 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--two-spacing); | ||
|
||
@media screen and (max-width:800px) { | ||
margin: var(--default-spacing) 0; | ||
gap: var(--default-spacing); | ||
} | ||
|
||
.article-entry { | ||
padding: 0 var(--two-spacing); | ||
|
||
&__title { | ||
color: var(--text-primary); | ||
font-size: var(--text-size-lg); | ||
font-family: var(--font-title); | ||
font-weight: bold; | ||
display: block; | ||
|
||
&:visited, &:hover { | ||
color: var(--text-primary); | ||
} | ||
} | ||
|
||
&__meta { | ||
color: var(--text-lightgray); | ||
padding-bottom: calc(var(--default-spacing)/2); | ||
} | ||
|
||
&__excerpt { | ||
line-height: 1.5; | ||
color: var(--text-light); | ||
display: block; | ||
|
||
@media screen and (max-width:800px) { | ||
font-size: var(--text-size-default); | ||
} | ||
|
||
&:visited { | ||
color: var(--text-light); | ||
} | ||
|
||
&:hover { | ||
color: #fff; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
&__callout-actions { | ||
order: 2; | ||
grid-column: 2; | ||
margin: 0 var(--two-spacing) 0 0; | ||
|
||
@media screen and (max-width:800px) { | ||
margin: 0 var(--default-spacing); | ||
} | ||
} | ||
|
||
> aside { | ||
order: 3; | ||
grid-column: 2; | ||
padding: 0 var(--two-spacing); | ||
|
||
@media screen and (max-width:800px) { | ||
padding: var(--default-spacing); | ||
} | ||
} | ||
|
||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,31 @@ | ||
--- | ||
layout: _base.njk | ||
--- | ||
|
||
<section class="articles-category-page"> | ||
|
||
<section class="articles-category-page__content"> | ||
<div class="articles-category-page__content-header"> | ||
<ul class="small"> | ||
<li><a href="/articles">Articles</a></li> | ||
<li class="articles-breadcrumb__divider"><i class="fa-solid fa-angles-right"></i></li> | ||
<li class="articles-breadcrumb__item">Category</li> | ||
</ul> | ||
<h1>{{ title }}</h1> | ||
{% if description %}<p>{{ description }}</p>{% endif %} | ||
</div> | ||
<div class="articles-category-page__content-list"> | ||
{{ content | safe }} | ||
</div> | ||
</section> | ||
|
||
{# <section class="articles-category-page__callout-actions container-block"> | ||
Callout Actions here... | ||
</section> #} | ||
|
||
<aside> | ||
{% include '_content/article-category-list.njk' %} | ||
{% include '_content/article-subcategory-list.njk' %} | ||
</aside> | ||
|
||
</section> |
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,4 +1,4 @@ | ||
{ | ||
"layout": "_base.njk", | ||
"layout": "_base-articles-category-page.njk", | ||
"permalink": "articles/{{ title | slugify }}/" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: "Others" | ||
description: "" | ||
--- | ||
|
||
{% if collections.others.length > 0 %} | ||
{% for post in collections.others | sortedCollectionByDateDesc %} | ||
<article class="article-entry"> | ||
<a href="{{ post.url }}" class="article-entry__title">{{ post.data.title }}</a> | ||
<div class="article-entry__meta small"> | ||
<span><strong>{{ post.data.category }}</strong></span> | ||
<span class="divider"> | </span> | ||
<span>Published on {{ post.data.date | localeDate }}</span> | ||
</div> | ||
<a href="{{ post.url }}" class="article-entry__excerpt"> | ||
{% if post.data.description %} | ||
{{ post.data.description | excerpt }} | ||
{% else %} | ||
{{ post.templateContent | excerpt }} | ||
{% endif %} | ||
</a> | ||
</article> | ||
{% endfor %} | ||
{% else %} | ||
No post have been made yet... | ||
{% endif %} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
{ | ||
"layout": "_base-article-page.njk", | ||
"permalink": "articles/others/{{ title | slugify }}/", | ||
"tags": ["articles", "others"], | ||
"category": "Others" | ||
} |
Oops, something went wrong.