💄 style: redesign post listing and other minor changes
This commit is contained in:
parent
14156b590a
commit
cd2ab356be
@ -32,7 +32,9 @@
|
|||||||
@import 'parts/home-banner.scss';
|
@import 'parts/home-banner.scss';
|
||||||
@import 'parts/footer.scss';
|
@import 'parts/footer.scss';
|
||||||
@import 'parts/theme-switch.scss';
|
@import 'parts/theme-switch.scss';
|
||||||
|
@import 'parts/posts_list.scss';
|
||||||
@import 'parts/tags.scss';
|
@import 'parts/tags.scss';
|
||||||
|
@import 'parts/pagination.scss';
|
||||||
@import 'syntax/syntax-ayu-dark.scss';
|
@import 'syntax/syntax-ayu-dark.scss';
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@ -54,13 +56,13 @@
|
|||||||
--bg-2: #fefefe;
|
--bg-2: #fefefe;
|
||||||
--hover-color: white;
|
--hover-color: white;
|
||||||
--primary-color: #91D8E4;
|
--primary-color: #91D8E4;
|
||||||
--secondary-color: rgb(158, 158, 158);
|
--secondary-color: #d7d7d7;
|
||||||
--links: #78cfcb;
|
--links: #78cfcb;
|
||||||
--text-color: #222226;
|
--text-color: #222226;
|
||||||
--text-color-2: #45454b;
|
--text-color-2: #45454b;
|
||||||
|
--text-color-high-contrast: #151516;
|
||||||
--quote-color: #355f62;
|
--quote-color: #355f62;
|
||||||
--border-color: rgb(114, 114, 114);
|
--border-color: rgb(114, 114, 114);
|
||||||
--light-border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
--meta-color: #757575;
|
--meta-color: #757575;
|
||||||
--accent-color: #087E96;
|
--accent-color: #087E96;
|
||||||
--table-header-color: #BFEAF5;
|
--table-header-color: #BFEAF5;
|
||||||
@ -71,15 +73,13 @@
|
|||||||
--bg-1: rgba(133, 133, 133, 0.5);
|
--bg-1: rgba(133, 133, 133, 0.5);
|
||||||
--bg-2: rgba(23, 23, 23, 100%);
|
--bg-2: rgba(23, 23, 23, 100%);
|
||||||
--primary-color: #7cc4d1;
|
--primary-color: #7cc4d1;
|
||||||
--hover-color: white;
|
--secondary-color: #4a4a4a;
|
||||||
--secondary-color: #696969;
|
|
||||||
--links: #8fdfe5;
|
--links: #8fdfe5;
|
||||||
--text-color: #eae9e9;
|
--text-color: #eae9e9;
|
||||||
--text-color-2: #c7c7c7;
|
--text-color-2: #c7c7c7;
|
||||||
|
--text-color-high-contrast: #f8f8f8;
|
||||||
--quote-color: #a9c5c7;
|
--quote-color: #a9c5c7;
|
||||||
--code: #ef476f;
|
|
||||||
--border-color: rgb(0, 0, 0);
|
--border-color: rgb(0, 0, 0);
|
||||||
--light-border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
--meta-color: #BBBBBB;
|
--meta-color: #BBBBBB;
|
||||||
--accent-color: #91e0ee;
|
--accent-color: #91e0ee;
|
||||||
--table-header-color: #b7e4e4;
|
--table-header-color: #b7e4e4;
|
||||||
@ -130,6 +130,7 @@ article{
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
|
color: var(--text-color-high-contrast);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@ -205,18 +206,12 @@ p {
|
|||||||
max-width: var(--small-layout-width);
|
max-width: var(--small-layout-width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media all and (min-width: 640px) {
|
@media all and (min-width: 600px) {
|
||||||
html {
|
html {
|
||||||
font-size: 16.5px;
|
font-size: 16.5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 720px) {
|
|
||||||
html {
|
|
||||||
font-size: 17px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 960px) {
|
@media all and (min-width: 960px) {
|
||||||
html {
|
html {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
@ -41,44 +41,3 @@
|
|||||||
gap: 18px;
|
gap: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bloglist-title{
|
|
||||||
display: block;
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-top: 1.2em;
|
|
||||||
margin-bottom: 0.83em;
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bloglist-table-row {
|
|
||||||
padding: 2%;
|
|
||||||
background-color: var(--navbar-color);
|
|
||||||
transition: 300ms;
|
|
||||||
width: 28%;
|
|
||||||
margin-right: 1%;
|
|
||||||
margin-top: 1%;
|
|
||||||
}
|
|
||||||
.bloglist-container {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.bloglist-table-row:hover {
|
|
||||||
box-shadow: 0.5rem 0.5rem 0 var(--border-color);
|
|
||||||
}
|
|
||||||
.bloglist-links {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.bloglist-table-row-data {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.bloglist-table-row-date {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
@media only screen and (max-width: 600px) {
|
|
||||||
.bloglist-table-row {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -56,13 +56,13 @@ header {
|
|||||||
justify-content: right;
|
justify-content: right;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
padding: 0.66rem;
|
padding: 0.66rem;
|
||||||
transition: 100ms;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-title {
|
.home-title {
|
||||||
font-size: 1.7em;
|
font-size: 1.7em;
|
||||||
font-weight: 450;
|
font-weight: 450;
|
||||||
padding-right: 0.33rem;
|
padding: 0.12rem;
|
||||||
|
margin-left: -0.12rem;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.home-banner-header {
|
.home-banner-header {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 2.8rem;
|
font-size: 2.8rem;
|
||||||
font-weight: 600;
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
|
|
||||||
#banner-home-subtitle {
|
#banner-home-subtitle {
|
||||||
@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#banner-home-subtitle p {
|
#banner-home-subtitle p {
|
||||||
font-family: 'Inter', Arial, Helvetica, sans-serif;
|
font-family: var(--sans-serif-font);
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,10 +40,13 @@ ul {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title-container {
|
.title-container {
|
||||||
border-bottom: var(--secondary-color) solid 0.5px;
|
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bottom-divider {
|
||||||
|
border-bottom: var(--secondary-color) solid 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
::-moz-selection {
|
::-moz-selection {
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
color: var(--hover-color);
|
color: var(--hover-color);
|
||||||
@ -77,21 +80,33 @@ blockquote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--text-color);
|
|
||||||
text-decoration-color: var(--links);
|
|
||||||
font-weight: 580;
|
|
||||||
}
|
|
||||||
|
|
||||||
p a {
|
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
color: var(--hover-color);
|
color: var(--hover-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:not(.no-hover-padding)::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: -0.15em;
|
||||||
|
right: -0.15em;
|
||||||
|
z-index: -1;
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not(.no-hover-padding):hover::before {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove post list padding */
|
/* Remove post list padding */
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.list > ul {
|
.list > ul {
|
||||||
|
79
sass/parts/_posts_list.scss
Normal file
79
sass/parts/_posts_list.scss
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
.bloglist-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bloglist-row {
|
||||||
|
background-color: var(--navbar-color);
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 2.5rem 0;
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 300;
|
||||||
|
color: var(--meta-color);
|
||||||
|
width: 14.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bloglist-tags {
|
||||||
|
margin-top: -0.5rem;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
margin-right: 0.7rem;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
font-weight: 400;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bloglist-content {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
|
||||||
|
.bloglist-title {
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--text-color-high-contrast);
|
||||||
|
font-weight: 550;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--hover-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
margin: 0.5rem 0 1rem;
|
||||||
|
color: var(--text-color);
|
||||||
|
font-family: var(--sans-serif-font);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 250;
|
||||||
|
line-height: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-posts {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
font-weight: 350;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1100px) {
|
||||||
|
.bloglist-row {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
margin-bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bloglist-content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
@ -1,38 +1,55 @@
|
|||||||
{% macro list_posts(pages) %}
|
{% macro list_posts(posts, max) %}
|
||||||
|
|
||||||
<div class="bloglist-container">
|
<div class="bloglist-container">
|
||||||
{% for page in pages %}
|
{% for post in posts %}
|
||||||
<section class="bloglist-table-row">
|
{% if loop.index <= max %}
|
||||||
<div class="bloglist-title">
|
{% if loop.index == max %}
|
||||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
<section class="bloglist-row">
|
||||||
</div>
|
{% elif loop.last %}
|
||||||
|
<section class="bloglist-row">
|
||||||
<div class="card-meta">
|
|
||||||
{% if page.date %}
|
|
||||||
{{ macros_format_date::format_date(date=page.date) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<span>{{ page.reading_time }} min read</span>
|
|
||||||
{% if page.draft %}
|
|
||||||
<span class="draft-label">DRAFT</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<div class="description">
|
|
||||||
{% if page.description %}
|
|
||||||
{{ page.description }}
|
|
||||||
{% elif page.summary %}
|
|
||||||
{{ page.summary | safe }}…
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set hide_read_more = true %}
|
<section class="bloglist-row bottom-divider">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if post.date %}
|
||||||
|
<div class="date">
|
||||||
|
{{ macros_format_date::format_date(date=post.date) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="bloglist-content">
|
||||||
|
<div class="bloglist-title">
|
||||||
|
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if post.taxonomies.tags %}
|
||||||
|
<div class="bloglist-tags">
|
||||||
|
{% for tag in post.taxonomies.tags %}
|
||||||
|
<a class="tag" href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
{% if post.description %}
|
||||||
|
{{ post.description }}
|
||||||
|
{% elif post.summary %}
|
||||||
|
{{ post.summary | safe }}…
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not hide_read_more %}
|
<a class="readmore" href={{ post.permalink }}>Read more →</a>
|
||||||
<a class="readmore" href={{ page.permalink }}>Read more ⟶</a>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</section>
|
</section>
|
||||||
|
{% endif %}
|
||||||
|
{% if not loop.last %}
|
||||||
|
{% if loop.index == max %}
|
||||||
|
<div class="all-posts">
|
||||||
|
<a href="{{ get_url(path="/blog/") }}">All posts ⟶</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% macro page_header(title) %}
|
{% macro page_header(title) %}
|
||||||
<div class="title-container section-title">
|
<div class="title-container section-title bottom-divider">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro page_header %}
|
{% endmacro page_header %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<nav class="socials nav-navs">
|
<nav class="socials nav-navs">
|
||||||
{%- if config.extra.socials %}
|
{%- if config.extra.socials %}
|
||||||
{% for social in config.extra.socials %}
|
{% for social in config.extra.socials %}
|
||||||
<a rel="noopener noreferrer" target="_blank" class="nav-links social" href={{ social.url | safe | replace(from="$BASE_URL", to=config.base_url) }}>
|
<a rel="noopener noreferrer" target="_blank" class="nav-links no-hover-padding social" href={{ social.url | safe | replace(from="$BASE_URL", to=config.base_url) }}>
|
||||||
<img alt={{ social.name }} title={{ social.name }} src="{{config.base_url}}/social_icons/{{ social.icon }}.svg">
|
<img alt={{ social.name }} title={{ social.name }} src="{{config.base_url}}/social_icons/{{ social.icon }}.svg">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="nav-navs">
|
<div class="nav-navs">
|
||||||
<div>
|
<div>
|
||||||
{% for menu in config.extra.menu %}
|
{% for menu in config.extra.menu %}
|
||||||
<a class="nav-links" href={{ menu.url | safe | replace(from="$BASE_URL" , to=config.base_url) }}>{{ menu.name
|
<a class="nav-links no-hover-padding" href={{ menu.url | safe | replace(from="$BASE_URL" , to=config.base_url) }}>{{ menu.name
|
||||||
}}</a>
|
}}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@ -23,4 +23,4 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user