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

layout list

parent 97722476
No related branches found
No related tags found
No related merge requests found
.block-projects
.list
.project-title
@include hover-translate-icon
display: flex
align-items: center
text-decoration: none
padding-bottom: $spacing-3
padding-top: $spacing-3
gap: $spacing-3
border-bottom: 1px solid var(--color-border)
@include icon(arrow-right, after)
margin-left: auto
display: inline
opacity: 0
margin-right: $spacing-1
a
flex: 1
&:hover
&,
a
color: $color-accent
&::after
opacity: 1
@include in-page-without-sidebar
@include h2
.grid
@include grid(2, md)
\ No newline at end of file
......@@ -6,4 +6,8 @@
.top
display: block
.block-title
width: auto
\ No newline at end of file
width: auto
.block-projects
.project-content
.media img
width: 100%
\ No newline at end of file
......@@ -100,7 +100,7 @@ params:
index:
show_categories: true
show_description: true
show_year: false
show_year: true
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
share_links:
......
{{- $block := .block -}}
{{- $block_title := .block.title -}}
{{- $block_class := partial "GetBlockClass" .block -}}
{{- $layout := "grid" -}}
{{- $layout := .block.data.layout | default "grid" -}}
{{- with .block.data -}}
<div class="{{ $block_class }}">
......
......@@ -3,10 +3,18 @@
<div class="list">
{{ range $project := .projects -}}
{{ with site.GetPage .file }}
{{ partial "projects/project.html" (dict
"project" .
"heading" $heading
{{ $heading_tag := (dict
"open" ((printf "<%s class='project-title' itemprop='name'>" $heading) | safeHTML)
"close" ((printf "</%s>" $heading) | safeHTML)
) }}
<article class="project" itemscope itemtype="https://schema.org/CreativeWork">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" itemprop="url" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
</article>
{{ end }}
{{ end }}
</div>
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