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

added html and css to large layout for large posts block

parent 32889764
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,38 @@
@include grid($block-posts-grid-columns)
.media picture img
width: 100%
&--large
.post
.more
@include icon(arrow-right, after, true)
p[itemprop="articleBody"]
margin-top: $spacing1
@include media-breakpoint-down(desktop)
.post + .post
margin-top: $spacing2
@include media-breakpoint-up(desktop)
.large
.post
flex-direction: row
gap: half($grid-gutter)
+ .post
margin-top: $spacing2
@include in-page-with-sidebar
.large
.post
.media,
.post-content
width: calc(#{col(4, 8)} + #{half($grid-gutter)})
@include in-page-without-sidebar
.large
.post
gap: $grid-gutter
.media
width: col(6)
.post-content
width: col(5)
p[itemprop="articleBody"]
margin-top: calc(#{$spacing1} + #{$spacing0})
&--list
article
border-bottom: 1px solid $color-border
......
{{- $direction := "" -}}
{{ $heading_level := .heading_level | default 3 }}
{{ $heading := printf "h%d" $heading_level }}
<div class="grid">
{{ range $post := .posts -}}
{{ with site.GetPage (printf "/posts/%s" $post) }}
{{ partial "posts/post.html" (dict
"post" .
"heading" $heading
) }}
{{ $heading_tag := partial "GetHeadingTag" (dict
"level" $heading_level
"attributes" "class='page-title'"
)}}
{{ $index := .index}}
<div class="large">
{{ range .posts }}
{{ with site.GetPage (printf "/posts/%s" .) }}
{{ if .Params.image }}
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<article class='post' itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<div class="post-content">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if site.Params.posts.index.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
<div class="post-meta">
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time>
{{ if site.Params.posts.index.show_author }}
{{- partial "posts/author" . -}}
{{ end }}
</div>
{{ if site.Params.posts.index.show_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
{{ if site.Params.posts.index.truncate_description }}
<p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.posts.index.truncate_description
) }}</p>
{{ else }}
<p itemprop="articleBody">{{ partial "PrepareText" .Params.summary }}</p>
{{ end }}
{{- end -}}
{{- end -}}
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
</div>
<div class="media">
{{- if .Params.image -}}
{{- partial "commons/image.html"
(dict
"image" .Params.image
"sizes" site.Params.image_sizes.sections.posts.item
) -}}
{{- else if site.Params.posts.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>
</article>
{{ end }}
{{ end }}
</div>
</div>
\ No newline at end of file
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