Skip to content

Commit

Permalink
fix: post gitinfo style
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Aug 26, 2019
1 parent 8b42377 commit 8ecbc1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions assets/scss/_common/post-gitinfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
margin-top: ($fontSize * 5);
display: flex;
justify-content: space-between;
color: var(--color-contrast-medium);
color: alpha(var(--color-contrast-medium), 0.8);
overflow-x: auto;
a {
color: var(--color-contrast-medium);
color: alpha(var(--color-contrast-medium), 0.8);
&:hover {
color: var(--color-primary);
}
Expand All @@ -17,7 +17,7 @@
display: flex;
}

.commit {
.commit, .commit-msg {
margin-right: 1em;
}

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ <h1 class="post-title">{{ .Title }}</h1>
{{ $icon := (replace (index .Site.Data.SVG .Site.Params.gitIcon) "icon" "icon git-icon") }}
<div class="gitinfo-item commit">
{{- with .Site.Params.repoURL -}}
{{- $commit := (printf `<a href="%s/commit/%s" target="_blank">%s</a>` . $.GitInfo.Hash $.GitInfo.AbbreviatedHash) -}}
{{- $commit := (printf `<a href="%s/commit/%s" target="_blank">%s%s</a>` . $.GitInfo.Hash $icon $.GitInfo.AbbreviatedHash) -}}
{{- $.Scratch.Set "commit" $commit -}}
{{- else -}}
{{- $.Scratch.Set "commit" $.GitInfo.AbbreviatedHash -}}
{{- end -}}
{{- $commit := .Scratch.Get "commit" -}}
{{- printf `%s%s` $icon $commit | safeHTML -}}
{{- printf `%s` $commit | safeHTML -}}
</div>
{{ end }}
{{ if .Site.Params.displayCommitMessage }}
Expand Down

0 comments on commit 8ecbc1a

Please sign in to comment.