💄 style: list tags redesign
This commit is contained in:
commit
644dd1a4ba
@ -32,6 +32,7 @@
|
|||||||
@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/tags.scss';
|
||||||
@import 'syntax/syntax-ayu-dark.scss';
|
@import 'syntax/syntax-ayu-dark.scss';
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
}
|
}
|
||||||
.bloglist-table-row:hover {
|
.bloglist-table-row:hover {
|
||||||
box-shadow: 10px 10px 0px var(--border-color);
|
box-shadow: 0.5rem 0.5rem 0 var(--border-color);
|
||||||
}
|
}
|
||||||
.bloglist-links {
|
.bloglist-links {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
54
sass/parts/_tags.scss
Normal file
54
sass/parts/_tags.scss
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
.taglist-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.taglist-table-row {
|
||||||
|
padding: 2%;
|
||||||
|
background-color: var(--navbar-color);
|
||||||
|
transition: 300ms;
|
||||||
|
width: 28%;
|
||||||
|
margin-right: 1%;
|
||||||
|
margin-top: 1%;
|
||||||
|
|
||||||
|
.card-meta {
|
||||||
|
margin-bottom: 2.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0.5rem 0.5rem 0 var(--border-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
.taglist-table-row {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts {
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 1.2rem;
|
||||||
|
|
||||||
|
.post {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,16 @@
|
|||||||
{% macro list_title(pages, tag_name=false) %}
|
{% macro list_title(pages, tag_name=false) %}
|
||||||
{% if tag_name %}
|
{% if tag_name %}
|
||||||
<h1 class="title-container">Entries tagged - "{{ term.name }}"</h1>
|
<div class="title-container section-title">Tag {{ term.name }}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1 class="page-title">All articles</h1>
|
<h1 class="page-title">All articles</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<ul class="posts">
|
<ul class="posts">
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
<li class="post">
|
<li class="post">
|
||||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
<div><a href="{{ page.permalink }}">{{ page.title }}</a></div>
|
||||||
<span class="meta">{{ macros_format_date::format_date(date=page.date) }}</span>
|
<span class="meta">{{ macros_format_date::format_date(date=page.date) }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro list_title %}
|
{% endmacro list_title %}
|
||||||
|
@ -2,23 +2,20 @@
|
|||||||
|
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
|
|
||||||
{{ macros_page_header::page_header(title="Tags")}}
|
{{ macros_page_header::page_header(title="Tags") }}
|
||||||
|
|
||||||
<div class="tag-cloud">
|
<ul class="taglist-container">
|
||||||
<ul class="tags">
|
{% for term in terms -%}
|
||||||
{% for term in terms %}
|
<section class="taglist-table-row">
|
||||||
<div class="tags-item" id="{{ term.name }}">
|
<div class="bloglist-title">
|
||||||
<svg class="tags-item-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
|
<a href="{{ term.permalink }}"> {{ term.name }}</a>
|
||||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
</div>
|
||||||
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
|
|
||||||
<line x1="7" y1="7" x2="7.01" y2="7"></line>
|
<div class="card-meta">
|
||||||
</svg>
|
{{ term.pages | length }} post{{ term.pages | length | pluralize }}
|
||||||
<a href="{{ term.permalink | safe }}">
|
</div>
|
||||||
{{ term.name }} ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
|
</section>
|
||||||
</a>
|
{% endfor %}
|
||||||
</div>
|
</ul>
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock main_content %}
|
{% endblock main_content %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user