7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-22 06:11:30 +00:00

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

View File

@ -12,24 +12,10 @@
{{ if eq .Params.layout "evento" }} {{ if eq .Params.layout "evento" }}
<h3>Informação do evento</h3> <h3>Informação do evento</h3>
{{ with .Params.metadata.event.date }} <p>
<p> <strong>Data:</strong>
<strong>Data:</strong> {{ partial "event-date" . }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }} </p>
{{ 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 }}
{{ with .Params.metadata.event.site }} {{ with .Params.metadata.event.site }}
<p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p> <p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p>

View File

@ -14,24 +14,10 @@
<h3>Informação do evento</h3> <h3>Informação do evento</h3>
{{ with .Params.metadata.event.date }} <p>
<p> <strong>Data:</strong>
<strong>Data:</strong> {{ partial "event-date" . }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }} </p>
{{ 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 }}
{{ with .Params.metadata.event.site }} {{ with .Params.metadata.event.site }}
<p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p> <p><strong>Website:</strong> <a href="{{ .url }}">{{ .title | or .url }}</a></p>

View File

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

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 }} {{ if not $cover }}
{{ $cover := (index (.Resources.ByType "image") 0) }} {{ $cover = resources.Get "images/default-events-cover.png" }}
{{ if not $cover }}
{{ $cover = resources.Get "images/default-events-cover.png" }}
{{ end }}
{{ end }} {{ end }}
{{ with $cover }} {{ end }}
<img class='event-cover' src="{{ .Permalink }}" alt="" /> {{ with $cover }}
{{ end }} <img class='event-cover' src="{{ .Permalink }}" alt="" />
</a> {{ end }}