add some styles

This commit is contained in:
FarseaSH 2021-09-01 23:49:09 +08:00
parent 45abd1c519
commit b7e6c0cd39
3 changed files with 60 additions and 23 deletions

View file

@ -1,9 +1,11 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> -->
<!-- todo change jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> -->
<!-- 点赞 --> <!-- 点赞 -->
<link href="https://cdn.bootcss.com/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"> <link href="https://cdn.bootcss.com/font-awesome/5.8.2/css/all.min.css" rel="stylesheet">

View file

@ -4,9 +4,9 @@
<!-- 时间 --> <!-- 时间 -->
<div class="pure-u-1 pure-u-sm-1-3"> <div class="pure-u-1 pure-u-sm-1-3">
<div class="time"> <div class="time">
<h2>{{ .Date.Format "Jan 2"}}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) <div class="month-day">{{ .Date.Format "Jan 2"}}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22)
.Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}</h2> .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}</div>
<h4>{{ .Date.Format "2006"}}</h4> <div class="year">{{ .Date.Format "2006"}}</div>
</div> </div>
</div> </div>
@ -22,18 +22,20 @@
<!-- 抬头 --> <!-- 抬头 -->
<!-- 头像前面margin2px --> <!-- 头像前面margin2px -->
<div style="margin-top: 2px;"> <div style="margin-top: 2px;" class="user-info">
{{ with .Params.avatar }} <div class="avatar-block">
<img src='{{ . }}' class="avatar"> {{ with .Params.avatar }}
{{ else }} <img src='{{ . }}' class="avatar">
<!-- fixme check whether the default avatar path is url or not--> {{ else }}
<img src='{{ $.Site.BaseURL }}/{{ .Site.Params.avatar }}' class="avatar"> <!-- fixme check whether the default avatar path is url or not-->
{{ end }} <img src='{{ $.Site.BaseURL }}/{{ .Site.Params.avatar }}' class="avatar">
{{ end }}
</div>
<div class="intro"> <div class="intro">
{{ with .Params.name }} {{ with .Params.name }}
<h4 class="text-primary name">{{ . }}</h4> <div class="name">{{ . }}</div>
{{ else }} {{ else }}
<h4 class="text-primary name">{{ .Site.Params.name }}</h4> <div class="name">{{ .Site.Params.name }}</div>
{{ end }} {{ end }}
<div> <div>
{{ $tags_filtered := slice}} {{ $tags_filtered := slice}}
@ -88,11 +90,9 @@
{{ end }} {{ end }}
<!-- 附注信息 --> <!-- 附注信息 -->
<div> <div class="moment-note">
<p class="text-black-50 note"> <p class="note">{{ .Date.Format "15:04" }} {{ .Params.note }}</p>
{{ .Date.Format "15:04" }} {{ .Params.note }} <div style="padding-right: 12px;"><i class="far fa-heart"></i></div>
</p>
<i class="far fa-heart" style="float: right; margin-right: 5px; color:#808080"></i>
</div> </div>
</div> </div>
<!-- 分隔线 --> <!-- 分隔线 -->

View file

@ -2,6 +2,13 @@
body{ body{
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.jumbotron{
padding-top: 64px;
padding-bottom: 64px;
margin-bottom: 32px;
}
.page{ .page{
max-width: 1150px; max-width: 1150px;
margin: auto; margin: auto;
@ -19,9 +26,10 @@ body{
margin: auto; margin: auto;
} }
.moment-content{ .moment-content {
position: relative; position: relative;
} }
/* 时间 */ /* 时间 */
.time{ .time{
text-align: right; text-align: right;
@ -41,6 +49,11 @@ body{
} }
/* 抬头 */ /* 抬头 */
.user-info{
display: flex;
}
.avatar{ .avatar{
max-height: 45px; max-height: 45px;
float: left; float: left;
@ -56,6 +69,7 @@ body{
color:#186D9C!important; color:#186D9C!important;
margin-bottom: 0; margin-bottom: 0;
line-height: 1.1; line-height: 1.1;
font-size: 24px;
} }
.tag::before{ .tag::before{
@ -65,6 +79,7 @@ body{
font-size: 80%; font-size: 80%;
margin-left: 0px; margin-left: 0px;
margin-right: 10px; margin-right: 10px;
color: #6c757d!important;
} }
/* 正文 */ /* 正文 */
@ -125,11 +140,31 @@ body{
} }
/* 附注信息 */ /* 附注信息 */
.note{ .moment-note{
display: flex;
margin-bottom: 10px;
justify-content: space-between;
}
.moment-note .note{
font-size: 80%; font-size: 80%;
text-indent: 20px; text-indent: 20px;
float: left; color: rgb(0, 0, 0, 0.5);
margin-bottom: 10px;
margin-top: 0;
margin-bottom: 0;
}
.moment-note{
margin-right: 5px;
color:#808080
}
/* hr */
hr {
border-width: 0;
border-top: 1px solid;
border-color: rgb(0, 0, 0, 0.1);
} }
/* footer底注 */ /* footer底注 */