Skip to content
Snippets Groups Projects
Commit d8a1bbee authored by Olivia206's avatar Olivia206
Browse files

made alternate class a mixin and fixed some displays for alternate posts/pages without image

parent ab0eef50
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@
aspect-ratio: unset
@include media-breakpoint-up(desktop)
width: columns(4)
&:not(:first-child)
&:not(:first-child, .without-image)
margin-top: -5%
&:nth-child(odd)
margin-left: auto
......
......@@ -16,7 +16,7 @@
{{ else }}
{{ $image_class = "" }}
{{ end }}
<article class="{{ $image_class }}">
<article class="{{ $image_class }} {{- if (not (isset .Params "image")) -}} without-image {{- end -}}">
{{ $heading_tag.open }}
<a href="{{- .Permalink -}}">
{{- partial "PrepareHTML" .Title -}}
......
......@@ -19,7 +19,7 @@
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<article class='post {{ if $alternate }}{{ $direction }} {{if not (modBool $index 2)}}left{{ else}}right{{end}}{{end}}' itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<article class='post {{ if $alternate }} {{- if (not (isset .Params "image")) -}} without-image {{- end -}}{{ $direction }} {{if not (modBool $index 2)}}left{{ else}}right{{end}}{{end}}' itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<div class="post-content">
{{- $title := partial "PrepareHTML" .Title -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment