💄 style: use cards/boxes for tag list
This commit is contained in:
parent
b1728fc441
commit
b33a942766
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 %}
|
||||||
|
@ -4,26 +4,18 @@
|
|||||||
|
|
||||||
{{ macros_page_header::page_header(title="Tags") }}
|
{{ macros_page_header::page_header(title="Tags") }}
|
||||||
|
|
||||||
<div class="tags">
|
<ul class="taglist-container">
|
||||||
<ul class="list-with-title">
|
{% for term in terms -%}
|
||||||
{% for term in terms -%}
|
<section class="taglist-table-row">
|
||||||
<li>
|
<div class="bloglist-title">
|
||||||
<h2 class="listing-title"><a href="#{{ term.name }}">{{ term.name }}</a></h2>
|
<a href="{{ term.permalink }}"> {{ term.name }}</a>
|
||||||
<ul class="listing">
|
</div>
|
||||||
{% for page in term.pages -%}
|
|
||||||
<li class="listing-item">
|
<div class="card-meta">
|
||||||
<a href="{{ page.permalink }}" title="{{ page.title }}">{{ page.title }}</a>
|
{{ term.pages | length }} post{{ term.pages | length | pluralize }}
|
||||||
<div class="post-time">
|
</div>
|
||||||
<span class="date">
|
</section>
|
||||||
{{ macros_format_date::format_date(date=page.date) }}
|
{% endfor %}
|
||||||
</span>
|
</ul>
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endfor %}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock main_content %}
|
{% endblock main_content %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user