new tag style

This commit is contained in:
FarseaSH 2023-12-23 19:58:32 +08:00
parent d587ced39c
commit ab4dc72cbd
2 changed files with 75 additions and 22 deletions

View file

@ -217,6 +217,7 @@ $gray: #919EB1;
.avatar{
max-height: 45px;
float: left;
margin-right: 5px;
}
.intro{
@ -235,17 +236,10 @@ $gray: #919EB1;
line-height: 18px;
}
.tag{
.moment-signature{
font-size: 80%;
margin-left: 0px;
margin-right: 10px;
color: #6c757d!important;
white-space: nowrap;
&::before{
content:"#";
padding-right: 1px;
}
}
}
@ -280,6 +274,48 @@ $gray: #919EB1;
}
}
.tag-div {
display: -webkit-flex;
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 20px;
.new-tag {
line-height: 30px;
padding-left: 20px;
padding-right: 15px;
margin-right: 10px;
border-radius: 15px;
background-color: #EDEDED;
color: #132939;
text-indent: -10px;
font-size: 90%;
white-space: nowrap;
&::before{
content:"#";
text-align: center;
background-color: #8EA1B0;
color: #ffffff;
padding-top: 1px;
padding-bottom: 1px;
padding-left: 6px;
padding-right: 6px;
border-radius: 12px;
margin-right: 2px;
font-size: 110%;
}
}
}
.single-pic{
max-width: 65%;
max-height: 250px;

View file

@ -34,28 +34,45 @@
{{ end }}
</div>
<div class="intro">
<div class="name">
{{ with $page.Params.name }}
<div class="name">{{ . }}</div>
{{ . }}
{{ else }}
<div class="name">{{ $site.Params.name }}</div>
{{ $site.Params.name }}
{{ end }}
</div>
<div class="moment-signature">
{{ with $page.Params.signature }}
{{ . }}
{{ else }}
发布了
{{ end }}
<div>
{{ $tags_filtered := slice}}
{{ with $page.Params.tags }}
{{ range . }}
{{ with .}}
{{ $tags_filtered = $tags_filtered | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ with $tags_filtered }}
{{ range . }}<span class="tag text-muted">{{ . }}</span>{{ end }}
{{ end }}
</div>
</div>
</div>
<div style="padding-left: 5px; padding-right: 5px;">
{{/* tag */}}
{{ $tags_filtered := slice}}
{{ with $page.Params.tags }}
{{ range . }}
{{ with .}}
{{ $tags_filtered = $tags_filtered | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ with $tags_filtered }}
<div class="tag-div">
{{ range . }}
<div class="new-tag">
{{ . }}
</div>
{{ end }}
</div>
{{ end }}
{{/* Main text content */}}
{{ if .Site.Params.features.heti }}<div class="context heti">{{ else }}<div class="context">{{ end }}
{{ $page.Content }}