1
0
Fork 0

refine ui

This commit is contained in:
nanxiaobei 2021-09-04 06:33:47 +08:00
parent 13431dae52
commit 0a21725d87
3 changed files with 27 additions and 29 deletions

View file

@ -276,7 +276,7 @@ img {
} }
.main-title { .main-title {
margin-bottom: calc(var(--y-gap) - 1rem); margin-bottom: calc(var(--y-gap));
font-size: 4rem; font-size: 4rem;
font-weight: 400; font-weight: 400;
color: var(--air); color: var(--air);
@ -288,11 +288,12 @@ img {
} }
.main-nav a { .main-nav a {
font-size: 1.8rem;
line-height: 5.5rem; line-height: 5.5rem;
color: var(--white); color: var(--white);
background: var(--black); background: var(--black);
border-radius: 0.5rem; border-radius: 0.5rem;
padding-inline: 2.5rem; padding-inline: 3rem;
} }
.main-nav .next { .main-nav .next {
@ -320,7 +321,7 @@ img {
.post-entry h2 { .post-entry h2 {
padding-right: 2rem; padding-right: 2rem;
font-size: 3rem; font-size: 2.8rem;
} }
.post-entry time { .post-entry time {
@ -337,22 +338,22 @@ img {
/* Post single /* Post single
-------------------------------------------------- */ -------------------------------------------------- */
.post-title { .post-title {
display: flex;
margin-bottom: calc(var(--y-gap) + 1rem); margin-bottom: calc(var(--y-gap) + 1rem);
} }
.post-title aside { .post-title p {
display: flex; display: flex;
flex-direction: column; margin-bottom: 1rem;
flex-shrink: 0; font-size: 1.6rem;
width: var(--side); color: var(--lit);
padding-right: var(--gap);
margin-left: calc(var(--side) * -1);
font-size: 1.5rem;
color: var(--air);
transform: translateY(0.4rem); transform: translateY(0.4rem);
} }
.post-title p span::before {
content: '·';
margin-inline: 0.5rem;
}
.post-title h1 { .post-title h1 {
font-size: 5rem; font-size: 5rem;
transform: translateX(-0.3rem); transform: translateX(-0.3rem);
@ -379,10 +380,7 @@ img {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: var(--y-gap); margin-top: var(--y-gap);
margin-right: calc(var(--gap) * -1); background: rgba(var(--dark), 0.05);
margin-left: calc(var(--gap) * -1);
color: var(--white);
background: var(--black);
border-radius: 0.5rem; border-radius: 0.5rem;
} }
@ -391,7 +389,7 @@ img {
align-items: center; align-items: center;
width: 50%; width: 50%;
padding: var(--gap); padding: var(--gap);
font-size: 2.5rem; font-size: 2.2rem;
font-weight: 700; font-weight: 700;
line-height: 1.2; line-height: 1.2;
} }
@ -451,24 +449,24 @@ img {
.post-content h1 { .post-content h1 {
margin-top: var(--y-gap); margin-top: var(--y-gap);
font-size: 5rem; font-size: 4.5rem;
} }
.post-content h2 { .post-content h2 {
margin-top: 6rem; margin-top: 6rem;
font-size: 4rem; font-size: 3.5rem;
} }
.post-content h3 { .post-content h3 {
font-size: 3rem;
}
.post-content h4 {
font-size: 2.5rem; font-size: 2.5rem;
} }
.post-content h4 {
font-size: 2.2rem;
}
.post-content h5 { .post-content h5 {
font-size: 2rem; font-size: 1.8rem;
} }
.post-content h6 { .post-content h6 {
@ -481,7 +479,7 @@ img {
.post-content a { .post-content a {
padding-bottom: 1px; padding-bottom: 1px;
border-bottom: 1.5px solid var(--pro); border-bottom: 1.5px dashed var(--air);
} }
.post-content a code { .post-content a code {

View file

@ -14,7 +14,7 @@
{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }} {{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }}
<article class="post-entry"> <article class="post-entry">
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<time>{{ .Date.Format "January 2, 2006" }}</time> <time>{{ .Date | time.Format ":date_medium" }}</time>
<a href="{{ .Permalink }}"></a> <a href="{{ .Permalink }}"></a>
</article> </article>
{{ end }} {{ end }}

View file

@ -2,12 +2,12 @@
<article class="post-single"> <article class="post-single">
<header class="post-title"> <header class="post-title">
<aside> <p>
<time>{{ .Date.Format "January 2, 2006" }}</time> <time>{{ .Date | time.Format ":date_medium" }}</time>
{{ if or .Params.Author site.Author.name }} {{ if or .Params.Author site.Author.name }}
<span>{{ .Params.Author | default site.Author.name }}</span> <span>{{ .Params.Author | default site.Author.name }}</span>
{{ end }} {{ end }}
</aside> </p>
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
</header> </header>
<section class="post-content">{{ .Content }}</section> <section class="post-content">{{ .Content }}</section>