Remove links redundantes da homepage

This commit is contained in:
Hugo Peixoto 2023-03-31 17:46:28 +01:00
parent b3ebf330c8
commit fc89d28020
7 changed files with 65 additions and 112 deletions

View File

@ -192,18 +192,21 @@ nav.main .nav-search:hover {
.events-list li {
min-width: 300px;
display: grid;
grid-template-areas: "img text";
justify-content: left;
background-color: white;
width: calc(50% - 50px);
column-gap: 1rem;
}
.events-list.events-list-full-width li {
width: calc(100% - 50px);
}
.events-list .wrapper {
display: grid;
grid-template-areas: "img text";
justify-content: left;
background-color: white;
column-gap: 1rem;
}
.events-list .event-cover {
width: 90px;
height: 90px;
@ -214,10 +217,8 @@ nav.main .nav-search:hover {
.events-list .img { grid-area: img; }
.events-list .text { grid-area: text; margin-top: 5px; }
.events-list .date { }
.events-list .subheader { font-size: 0.8rem; margin-top: 10px; }
.events-list .title { font-size: 1.25rem; }
.events-list .headline { font-size: 1.25rem; margin-top: 5px;}
p { margin: 0px; }

View File

@ -12,24 +12,10 @@
{{ if eq .Params.layout "evento" }}
<h3>Informação do evento</h3>
{{ with .Params.metadata.event.date }}
<p>
<strong>Data:</strong>
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 de January de 2006" .start }}
{{ else }}
{{ time.Format "2 de January de 2006" .start }} das
{{ time.Format "15:04" .start }} às
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ else }}
De {{ time.Format "2 de January de 2006" .start }} até {{ time.Format "2 de January de 2006" .finish }}
{{ end }}
</p>
{{ end }}
<p>
<strong>Data:</strong>
{{ partial "event-date" . }}
</p>
{{ with .Params.metadata.event.site }}
<p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p>

View File

@ -14,24 +14,10 @@
<h3>Informação do evento</h3>
{{ with .Params.metadata.event.date }}
<p>
<strong>Data:</strong>
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 de January de 2006" .start }}
{{ else }}
{{ time.Format "2 de January de 2006" .start }} das
{{ time.Format "15:04" .start }} às
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ else }}
De {{ time.Format "2 de January de 2006" .start }} até {{ time.Format "2 de January de 2006" .finish }}
{{ end }}
</p>
{{ end }}
<p>
<strong>Data:</strong>
{{ partial "event-date" . }}
</p>
{{ with .Params.metadata.event.site }}
<p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p>

View File

@ -21,7 +21,7 @@
{{ $query = first 3 $query -}}
{{ range $post := $query -}}
<li>
<a class='cover' href="{{ .Permalink }}">
<div class='cover'>
{{ $cover := (index (.Resources.ByType "image") 0) }}
{{ if not $cover }}
{{ $cover = resources.Get "images/default-news-cover.png" }}
@ -29,7 +29,7 @@
{{ with $cover }}
<img class='news-cover' src="{{ .Permalink }}" />
{{ end }}
</a>
</div>
<div class='text'>
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
@ -38,7 +38,7 @@
<div class="summary">
{{ .Summary }}
<p><a href="{{ .Permalink }}">Ler tudo</a></p>
<p style='margin-top: 1em'><a href="{{ .Permalink }}">Ler tudo</a></p>
</div>
</div>
</li>
@ -79,33 +79,17 @@
{{ range $post := $query }}
<li>
{{ partial "thumbnail" . }}
<div class="text">
<p class="headline">
<a class="title" href="{{ .Permalink }}">{{ .Title }}</a>
</p>
<p class="subheader">
<span class="date">
{{ with .Params.metadata.event.date }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 de January de 2006" .start }}
{{ else }}
{{ time.Format "2 de January de 2006" .start }} das
{{ time.Format "15:04" .start }} às
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ else }}
De {{ time.Format "2 de January de 2006" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ end }}
{{ end }}
</span>
&mdash;
<span class='location'>{{ .Params.metadata.event.location }}</span>
</p>
</div>
<a class="wrapper" href="{{ .Permalink }}">
{{ partial "thumbnail" . }}
<div class='text'>
<p class="headline">{{ .Title }}</p>
<p class="subheader">
<span class="date">{{ partial "event-date" . }}</span>
&mdash;
<span class='location'>{{ .Params.metadata.event.location }}</span>
</p>
</div>
</a>
</li>
{{ end }}
</ul>

View File

@ -0,0 +1,15 @@
{{ with .Params.metadata.event.date }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 de January de 2006" .start }}
{{ else }}
{{ time.Format "2 de January de 2006" .start }} das
{{ time.Format "15:04" .start }} às
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ else }}
De {{ time.Format "2 de January de 2006" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ end }}
{{ end }}

View File

@ -1,28 +1,11 @@
{{ partial "thumbnail" . }}
<div class="text">
<p class="headline">
<a class="title" href="{{ .Permalink }}">{{ .Title }}</a>
</p>
<p class="subheader">
<span class="date">
{{ with .Params.metadata.event.date }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 de January de 2006" .start }}
{{ else }}
{{ time.Format "2 de January de 2006" .start }} das
{{ time.Format "15:04" .start }} às
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ else }}
De {{ time.Format "2 de January de 2006" .start }} a {{ time.Format "2 de January de 2006" .finish }}
{{ end }}
{{ end }}
</span>
&mdash;
<span class='location'>{{ .Params.metadata.event.location }}</span>
</p>
</div>
<a class="wrapper" href="{{ .Permalink }}">
{{ partial "thumbnail" . }}
<div class="text">
<p class="headline">{{ .Title }}</p>
<p class="subheader">
<span class="date">{{ partial "event-date" . }}</span>
&mdash;
<span class='location'>{{ .Params.metadata.event.location }}</span>
</p>
</div>
</a>

View File

@ -1,12 +1,10 @@
<a class="img" href="{{ .Permalink }}">
{{ $cover := (.Resources.GetMatch "cover.*") }}
{{ $cover := (.Resources.GetMatch "cover.*") }}
{{ if not $cover }}
{{ $cover := (index (.Resources.ByType "image") 0) }}
{{ if not $cover }}
{{ $cover := (index (.Resources.ByType "image") 0) }}
{{ if not $cover }}
{{ $cover = resources.Get "images/default-events-cover.png" }}
{{ end }}
{{ $cover = resources.Get "images/default-events-cover.png" }}
{{ end }}
{{ with $cover }}
<img class='event-cover' src="{{ .Permalink }}" alt="" />
{{ end }}
</a>
{{ end }}
{{ with $cover }}
<img class='event-cover' src="{{ .Permalink }}" alt="" />
{{ end }}