diff options
Diffstat (limited to 'layouts/_default/summary.html')
-rw-r--r-- | layouts/_default/summary.html | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 8627793..fee5664 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -2,15 +2,15 @@ {{- $tagsStyle := $params.summaryStyle.tags -}} {{- $tagsTheme := $params.summaryStyle.tags.theme | default "image" -}} -<article onclick="location.href='{{ $.RelPermalink }}'" class="summary summary-animation" itemscope itemtype="http://schema.org/Article" style="margin-bottom:0"> +<article onclick="window.open('{{ $.RelPermalink }}')" class="summary summary-animation" itemscope itemtype="http://schema.org/Article" style="margin-bottom:0"> {{- /* Featured image */ -}} {{- if not $params.summaryStyle.hiddenImage -}} {{- $image := $params.featuredimagepreview | default $params.featuredimage -}} {{- with .Resources.GetMatch "featured-image" -}} - {{- $image = .RelPermalink -}} + {{- $image = (.Fill "796x238 Center q90").RelPermalink -}} {{- end -}} {{- with .Resources.GetMatch "featured-image-preview" -}} - {{- $image = .RelPermalink -}} + {{- $image = (.Fill "796x238 Center q90").RelPermalink -}} {{- end -}} {{- with $image -}} <div class="featured-image-preview"> @@ -24,7 +24,7 @@ </div> {{- end -}} {{- end -}} - {{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}} + {{- dict "Src" . "Title" $.Description "Resources" $.Resources "Height" 798 "Width" 238 | partial "plugin/image.html" -}} </div> {{- end -}} {{- end -}} @@ -37,19 +37,19 @@ {{- if not $params.summaryStyle.hiddenMeta -}} {{- /* Meta */ -}} <div class="post-meta summary-post-meta"> - {{- $authorName := $params.author | default .Site.Author.name | default " " -}} + {{- $authorName := $params.name | default .Site.Author.name | default " " -}} {{- if not (eq $authorName " ") -}} {{ $author := index .Site.Data.authors $authorName }} {{- $authorLink := $author.link | default .Site.Home.RelPermalink -}} <span class="post-author"> - {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author.nickname -}} + {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "svg-icon icon-user") "Content" $author.nickname -}} {{- partial "plugin/link.html" $options -}} </span> {{- end -}} {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}} {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}} - <span class="post-publish"><i class="far fa-clock fa-fw"></i> + <span class="post-publish"><i class="svg-icon icon-clock"></i> {{- printf `<time class="timeago" datetime="%v">%v</time>` $timeAgoDate . | safeHTML -}} </span> {{- end -}} @@ -57,20 +57,25 @@ {{- $categories := slice -}} {{- range .Params.categories -}} {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}} - {{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}} + {{- $categories = $categories | append (printf `<a href="%v"><i class="svg-icon icon-folder"></i>%v</a>` $category.RelPermalink $category.Title) -}} {{- end -}} {{- with delimit $categories " " -}} - <span class="post-category"> + <span class="post-category"> {{ . }} </span> {{- end -}} + {{- with .Params.Views -}} + <span class="post-meta-views"> + <i class="svg-icon icon-eye"></i>{{ . }} + </span> + {{- end -}} + {{- $comment := .Site.Params.Comment -}} {{- $remark42 := $comment.remark42 | default dict -}} {{- if $remark42.enable -}} - <i class="far fa-comment fa-fw"></i> - <span class="remark42__counter" data-url="{{ .Permalink }}"> - + <span class="post-meta-comments"> + <i class="svg-icon icon-comments"></i><span class="remark42__counter" data-url="{{ .Permalink }}"></span> </span> {{- end -}} </div> @@ -80,7 +85,7 @@ {{- if not $params.summaryStyle.hiddenDescription -}} <div class="content summary-content"> {{- with .Summary -}} - {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} + {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}} {{- else -}} {{- .Description | safeHTML -}} {{- end -}} |