Fix: Heros updated, deleted link attribute from frontmatter

feature/oscar-theme
Óscar M. Lage 2022-03-07 23:05:28 +01:00
parent 13b18eaa51
commit 2ecdd688ea
5 changed files with 6 additions and 23 deletions

View File

@ -3,6 +3,5 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
image:
link:
current: false
---

View File

@ -2,9 +2,9 @@
title: "Hero1"
date: 2022-02-28T22:25:30Z
draft: false
image:
link:
image: anon.png
current: false
---
1. Este es el primer texto dinámico del hero
Este es el primer texto dinámico del hero y mejor con el [enlace a twich aquí](https://twitch.tv/oscarmlage), no global ⚡.

View File

@ -1,9 +1,8 @@
---
title: "Hero2"
date: 2022-02-28T22:25:56Z
draft: false
draft: true
image:
link:
current: false
---

View File

@ -1,9 +1,8 @@
---
title: "Hero3"
date: 2022-02-28T22:26:26Z
draft: false
draft: true
image: anon.png
link: https://twitch.tv/oscarmlage
current: true
---

View File

@ -3,29 +3,15 @@
<main class="main wrapper">
<div class="hero">
{{ range (where .Site.Pages "Type" "heros") }}
<div {{ if .Params.current }}class="is-active"{{ end }}>
{{ if .Params.link }}<a href="{{ .Params.link }}">{{ end }}
{{ if .Params.image }}
<img src="heros/{{ .Params.image }}"
alt="{{ .Content | plainify | htmlUnescape | truncate 10 }}" />
{{ end }}
{{ .Content }}
{{ if .Params.link }}</a>{{ end }}
</div>
{{ end }}
<!-- PROVISIONAL PROMO - @todo: change this -->
{{ range (where .Site.Pages "Type" "heros") }}
{{ if .Params.image }}
<div class="hero-img" >
<img src="heros/{{ .Params.image }}"
alt="{{ .Content | plainify | htmlUnescape | truncate 10 }}" />
</div>
<h2 class="hero-title">{{ .Content }}</h2>
{{ end }}
{{ end }}
<h2 class="hero-title">Este es el primer texto dinámico del hero y mejor con el <a href="">enlace a twich aquí</a>, no global ⚡.</h2>
<!-- / PROVISIONAL PROMO - @todo: change this -->
</div>
<div class="posts-container">