Skip to content

Commit

Permalink
Updated Categor Page and Other Related Contents
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianmayo committed Mar 27, 2024
1 parent 51884e4 commit 8927501
Show file tree
Hide file tree
Showing 15 changed files with 282 additions and 127 deletions.
54 changes: 27 additions & 27 deletions src/_assets/css/scss/_contents/recent-articles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,42 @@
padding-top: var(--default-spacing);


.article-entry {
.article-entry {

&__title {
&__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);
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);
}
&__meta {
color: var(--text-lightgray);
padding-bottom: calc(var(--default-spacing)/2);
}

&__excerpt {
line-height: 1.5;
color: var(--text-light);
display: block;
&__excerpt {
line-height: 1.5;
color: var(--text-light);
display: block;

@media screen and (max-width:800px) {
font-size: var(--text-size-default);
}
@media screen and (max-width:800px) {
font-size: var(--text-size-default);
}

&:visited {
color: var(--text-light);
}
&:visited {
color: var(--text-light);
}

&:hover {
color: #fff;
}
&:hover {
color: #fff;
}
}
}
}
}
126 changes: 126 additions & 0 deletions src/_assets/css/scss/page/_base-articles-category-page.scss
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);
}
}

}
2 changes: 1 addition & 1 deletion src/_assets/css/style.min.css

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions src/_includes/_base-articles-category-page.njk
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>
2 changes: 1 addition & 1 deletion src/articles/articles.json
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 }}/"
}
43 changes: 21 additions & 22 deletions src/articles/cloud-infrastructure.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@ description: "Explore and familiarize with Microsoft Azure cloud services by lea
infrastructure suited for your needs."
---

{% include '_page-callout.njk' %}

<section class="recent-posts">
<h5 class="container recent-posts__title">Recent Posts</h5>
<div class="container recent-posts__entries">
<div class="entry-posts">
{% for post in collections.cloudinfrastructure | sort(false, false, date) %}
<article class="entry-posts__ite">
<a href="{{ post.url }}" class="entry-posts__item-title">{{ post.data.title }}</a>
<div class="entry-posts__item-meta small">Published on {{ post.data.date | localeDate }}</div>
<a href="{{ post.url }}" class="entry-posts__item-excerpt">
{% if post.data.description %}
{{ post.data.description | excerpt }}
{% else %}
{{ post.templateContent | excerpt }}
{% endif %}
</a>
</article>
{% endfor %}
</div>
</div>
</section>
{% if collections.cloudinfrastructure.length > 0 %}
{% for post in collections.cloudinfrastructure | 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 %}
43 changes: 21 additions & 22 deletions src/articles/devops-practices.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@ description: "Start implementing build, test, deployment with automations and
known practices between development and operations."
---

{% include '_page-callout.njk' %}

<section class="recent-posts">
<h5 class="container recent-posts__title">Recent Posts</h5>
<div class="container recent-posts__entries">
<div class="entry-posts">
{% for post in collections.devopspractices | sort(false, false, date) %}
<article class="entry-posts__ite">
<a href="{{ post.url }}" class="entry-posts__item-title">{{ post.data.title }}</a>
<div class="entry-posts__item-meta small">Published on {{ post.data.date | localeDate }}</div>
<a href="{{ post.url }}" class="entry-posts__item-excerpt">
{% if post.data.description %}
{{ post.data.description | excerpt }}
{% else %}
{{ post.templateContent | excerpt }}
{% endif %}
</a>
</article>
{% endfor %}
</div>
</div>
</section>
{% if collections.devopspractices.length > 0 %}
{% for post in collections.devopspractices | 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 %}
26 changes: 26 additions & 0 deletions src/articles/others.njk
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.
6 changes: 6 additions & 0 deletions src/articles/others/others.json
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"
}
Loading

0 comments on commit 8927501

Please sign in to comment.