diff options
author | 8rain1ag <asleeppiano@outlook.com> | 2020-02-19 23:38:58 +0300 |
---|---|---|
committer | 8rain1ag <asleeppiano@outlook.com> | 2020-02-19 23:38:58 +0300 |
commit | 3f7ceab4f21ab8c3e61e1e3429155b9b36188792 (patch) | |
tree | 313bbb922bdf2db87490d7c114bee6885c3c0bc2 /layouts/_default | |
parent | 9382b2b14faa01d1e5b4d842645097d4a6ab0342 (diff) |
single page done
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/li.html | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/layouts/_default/li.html b/layouts/_default/li.html index f7bd7b5..dc7a053 100644 --- a/layouts/_default/li.html +++ b/layouts/_default/li.html @@ -1,31 +1,15 @@ <article class="post-item"> - {{$grid_class := ""}} - {{if (not (isset .Params "description")) | and (not (isset .Params "image")) | and (not (isset .Params "tags"))}} - {{$grid_class = "post-item-grid--only-title"}} - {{else if (not (isset .Params "description")) | and (not (isset .Params "image"))}} - {{$grid_class = "post-item-grid--title-with-tag"}} - {{else if (not (isset .Params "tags") | and (not (isset .Params "image")))}} - {{$grid_class = "post-item-grid--noimage-nopad"}} - {{else if not (isset .Params "description")}} - {{$grid_class = "post-item-grid--nodesc"}} - {{else if not (isset .Params "image")}} - {{$grid_class = "post-item-grid--noimage"}} - {{else if not (isset .Params "tags")}} - {{$grid_class = "post-item-grid--nopad"}} - {{end}} - <div class="post-item-grid {{$grid_class}}"> - <a class="post-item-grid__title post-item__link" href="{{.Permalink}}"> + <div class="post-item-flex"> + <a class="{{if not (isset .Params "tags")}}no-tag{{end}} post-item__meta post-item--left" href="{{.Permalink}}"> <h2 class="post-item__title">{{.Title}}</h2> <time class="post-item__date" datetime="{{.Date.Format "2006-01-02"}}">{{.Date.Format "2006-01-02"}}</time> - </a> {{if isset .Params "description"}} - <a class="post-item-grid__description post-item__link" href="{{.Permalink}}"> <div class="post-item__description">{{.Description}}</div> - </a> {{end}} + </a> {{if isset .Params "image"}} - <a class="post-item-grid__image post-item__image" href="{{.Permalink}}"> - <img src="{{printf "%s%s" .File.Dir .Params.image}}" alt="{{.Title}}" /> + <a class="post-item--right post-item__image" href="{{.Permalink}}"> + <img src="{{printf "%s%s" .File.Dir .Params.image | absURL}}" alt="{{.Title}}" /> </a> {{end}} {{if isset .Params "tags"}} |