style tags page

This commit is contained in:
Chester How 2020-09-16 13:47:11 +08:00
parent 34df66d7ef
commit 7ddb37b309
4 changed files with 129 additions and 122 deletions

View file

@ -4,9 +4,9 @@
<h2 class="nav-title">{{ site.title }}</h2> <h2 class="nav-title">{{ site.title }}</h2>
</a> </a>
<ul> <ul>
<li><a href="{{ site.baseurl }}/">Posts</a></li>
<li><a href="{{ '/tags' | prepend: site.baseurl }}">Tags</a></li> <li><a href="{{ '/tags' | prepend: site.baseurl }}">Tags</a></li>
<li><a href="{{ '/about' | prepend: site.baseurl }}">About</a></li> <li><a href="{{ '/about' | prepend: site.baseurl }}">About</a></li>
<li><a href="{{ site.baseurl }}/">Posts</a></li>
</ul> </ul>
</div> </div>
</nav> </nav>

View file

@ -1,7 +1,7 @@
--- ---
layout: default layout: default
permalink: /404.html
title: "404" title: "404"
permalink: /404.html
--- ---
<div class="notfound"> <div class="notfound">

View file

@ -1,49 +1,53 @@
--- ---
layout: default layout: default
permalink: /tags.html
title: "Tags" title: "Tags"
permalink: /tags/
--- ---
<div class="tags"> <div class="tags">
<div class="tags-header"> <div class="tags-header">
<div class="tags-header-title"> <h2 class="tags-header-title">{{ page.title }}</h2>
<h2>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h2> <div class="tags-header-line"></div>
</div> </div>
<div class="tags-header-line"></div> <div class="tags-clouds">
</div> {% for tag in site.tags %}
<div class="tags-content"> <a href="#{{ tag[0] }}">{{ tag[0] }}</a>
<div class="tags-content-clouds"> {% endfor %}
{% for tag in site.tags %} </div>
<a href="#{{ tag[0] }}" title="{{ tag[0] }}" rel="{{ tag[1].size }}"> {% for tag in site.tags %}
{{ tag[0] }} <div class="tags-item" id="{{ tag[0] }}">
</a> <svg
{% endfor %} class="tags-item-icon"
</div> xmlns="http://www.w3.org/2000/svg"
<div class="tags-content-list"> width="20"
{% for tag in site.tags %} height="20"
<div class="tags-content-item"> viewBox="0 0 24 24"
<span class="tags-content-item-seperator" id="{{ tag[0] }}"> fill="none"
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24"> stroke="currentColor"
<path d="M341.333333 375.466667a33.962667 33.962667 0 0 1-24.132266-10.001067l-256-256a34.133333 34.133333 0 1 1 48.264533-48.264533l256 256A34.133333 34.133333 0 0 1 341.333333 375.466667z" fill="#808080"></path> stroke-width="2"
<path d="M597.333333 955.733333a17.015467 17.015467 0 0 1-12.066133-5.000533l-426.666667-426.666667A17.015467 17.015467 0 0 1 153.6 512V170.666667a17.066667 17.066667 0 0 1 17.066667-17.066667h341.333333c4.522667 0 8.874667 1.792 12.066133 5.000533l426.666667 426.666667a17.0496 17.0496 0 0 1 0 24.132267l-341.333333 341.333333A17.015467 17.015467 0 0 1 597.333333 955.733333zM187.733333 504.9344l409.6 409.6L914.5344 597.333333l-409.6-409.6H187.733333v317.201067zM597.333333 785.066667a17.015467 17.015467 0 0 1-12.066133-5.000534l-213.333333-213.333333a17.0496 17.0496 0 0 1 0-24.132267l170.666666-170.666666a17.0496 17.0496 0 0 1 24.132267 0l213.333333 213.333333a17.0496 17.0496 0 0 1 0 24.132267l-170.666666 170.666666A17.015467 17.015467 0 0 1 597.333333 785.066667zM408.132267 554.666667L597.333333 743.867733 743.867733 597.333333 554.666667 408.132267 408.132267 554.666667z" fill="#808080"></path> stroke-linecap="round"
<path d="M401.92 280.746667c16.503467 17.066667 24.746667 37.256533 24.746667 60.586666s-8.2432 43.52-24.746667 60.586667C385.416533 418.423467 365.226667 426.666667 341.333333 426.666667c-23.330133 0-43.229867-8.2432-59.733333-24.746667-17.066667-17.066667-25.6-37.256533-25.6-60.586667s8.533333-43.52 25.6-60.586666c16.503467-16.503467 36.4032-24.746667 59.733333-24.746667 23.893333 0 44.0832 8.2432 60.586667 24.746667z" fill="#808080"></path> stroke-linejoin="round"
</svg> class="feather feather-tag"
<span class="tags-content-item-text">{{ tag[0] }}</span> >
</span> <path
{% for post in tag[1] %} 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"
<div class="tags-content-post"> ></path>
<a href="{{ post.url}}" title="{{ post.title }}"> <line x1="7" y1="7" x2="7.01" y2="7"></line>
<span class="tags-content-post-title">{{ post.title }}</span> </svg>
</a> <h2 class="tags-item-label">{{ tag[0] }}</h2>
<span class="tags-content-post-meta"> {% for post in tag[1] %}
<time datetime="{{ post.date | date:'%Y-%m-%d' }}"> <a class="tags-post" href="{{ post.url | prepend: site.baseurl }}">
{{ post.date | date:"%Y-%m-%d" }} <div>
</time> <span class="tags-post-title">{{ post.title }}</span>
</span> <div class="tags-post-line"></div>
</div> </div>
<!-- <hr> --> <span class="tags-post-meta">
{% endfor %} <time datetime="{{ post.date }}">
</div> {{ post.date | date:"%Y-%m-%d" }}
{% endfor %} </time>
</div> </span>
</div> </a>
</div> {% endfor %}
</div>
{% endfor %}
</div>

View file

@ -1,86 +1,89 @@
.tags { .tags {
&-header {
&-title {
color: $default-shade;
font-family: $sans-serif;
font-size: 4rem;
margin: 1rem 0;
text-align: center;
}
&-line {
border-top: 0.4rem solid $default-shade;
display: block;
margin: 0 auto 3rem;
width: 4rem;
}
}
&-clouds {
text-align: center;
font-family: $sans-serif; font-family: $sans-serif;
&-header { a {
&-title { display: inline-block;
color: $default-shade; margin: 0 0.1rem 0.2rem;
font-size: 2rem; padding: 0.2rem 0.5rem;
margin: 1rem 0 0 0; background: rgba(0, 0, 0, 0.05);
text-align: center; border-radius: 5px;
} color: $default-color;
text-decoration: none;
&-line {} &:hover,
&:active {
background: rgba(0, 0, 0, 0.1);
}
}
}
&-item {
&-icon {
height: 1rem;
} }
&-content { &-label {
&-clouds { display: inline-block;
margin: 20px 0 15px 0; margin: 2rem 0 0.5rem;
text-align: center; font-family: $sans-serif;
color: $default-color;
}
}
a { &-post {
font-size: 1rem; display: flex;
background: #C0C0C0; justify-content: space-between;
display: inline-block; padding: 5px 0;
border: 1px solid rgba(255, 255, 255, 0.8);
border-radius: 999em;
padding: 0 10px;
color: #ffffff;
line-height: 24px;
text-decoration: none;
margin: 0 2px;
margin-bottom: 6px;
&:hover, &-title {
&:active { color: $default-color;
background-color: #DFDFDF !important; text-decoration: none;
color: white; white-space: nowrap;
border-color: white; overflow: hidden;
text-decoration: none; text-overflow: ellipsis;
}
}
}
&-list {}
&-item {
&-seperator {
color: #808080;
font-size: 1.2rem !important;
&::before {
margin-right: 5px;
}
}
&-text {}
}
&-post {
margin: 10px;
&-title {
line-height: 1.3;
margin-top: 30px;
margin-bottom: 8px;
}
&-meta {
color: #CCC;
text-align: right;
float: right;
}
a {
color: #404040;
&:hover,
&:focus {
color: #808080;
}
}
}
} }
} &-line {
@include transition(all 0.3s ease-out);
border-top: 0.1rem solid $default-shade;
display: block;
width: 0;
}
&-meta {
color: $default-tint;
text-align: right;
white-space: nowrap;
}
&:hover,
&:active {
.tags-post-line {
width: 3rem;
}
.tags-post-meta {
color: $default-shade;
}
}
}
}