mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-11-22 22:31:32 +00:00
119 lines
4.6 KiB
HTML
119 lines
4.6 KiB
HTML
{{- define "main" -}}
|
|
<p class="about body-width">
|
|
A <strong>ANSOL - Associação Nacional para o Software Livre</strong> é uma
|
|
associação portuguesa sem fins lucrativos que tem como fim a divulgação,
|
|
promoção, desenvolvimento, investigação e estudo da Informática Livre e das
|
|
suas repercussões sociais, políticas, filosóficas, culturais, técnicas e
|
|
científicas.
|
|
</p>
|
|
|
|
<div class='body-width'>
|
|
<p class="why-join">
|
|
<span>Precisamos da tua ajuda</span>
|
|
<a href="{{ (site.GetPage "inscricao").Permalink }}" class='cta'>Junta-te a nós</a>
|
|
</p>
|
|
</div>
|
|
|
|
<section class='news-section'>
|
|
<h2 class="pull-header body-width">Notícias</h2>
|
|
<ul class='news-list body-width'>
|
|
{{ $query := where site.RegularPages "Type" "noticias" -}}
|
|
{{ $news := site.GetPage "categories/noticia" -}}
|
|
{{ $query = $query | intersect $news.Pages -}}
|
|
{{ $query = first 3 $query -}}
|
|
{{ range $post := $query -}}
|
|
<li>
|
|
<a class='cover' href="{{ .Permalink }}">
|
|
{{ range (first 1 (.Resources.ByType "image")) -}}
|
|
<img class='news-cover' src="{{ .Permalink }}" />
|
|
{{ end -}}
|
|
</a>
|
|
|
|
<div class='text'>
|
|
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
|
|
|
<p class="published-date">{{ time.Format "2 de January de 2006" .PublishDate }}</p>
|
|
|
|
<div class="summary">
|
|
{{ .Summary }}
|
|
<p><a href="{{ .Permalink }}">Ler tudo</a></p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<p class="see-more body-width">
|
|
<a href="{{ (site.GetPage "noticias").Permalink }}">Ver mais notícias</a>
|
|
</p>
|
|
</section>
|
|
|
|
<section class='campaigns-section'>
|
|
<h2 class="pull-header body-width">Iniciativas</h2>
|
|
<ul class='campaigns-list body-width'>
|
|
{{ $query := where site.RegularPages "Type" "iniciativas" }}
|
|
{{ $query := where $query "Params.featured" true }}
|
|
{{ $query = first 3 $query }}
|
|
|
|
{{ range $post := $query }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">
|
|
{{ with (.Resources.ByType "image").GetMatch "*cover*" }}
|
|
<img class='campaign-cover' src="{{ .Permalink }}" />
|
|
{{ end }}
|
|
</a>
|
|
<h3 class='title'><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
|
|
<section class='events-section'>
|
|
<h2 class="pull-header body-width">Próximos eventos</h2>
|
|
<ul class='events-list body-width'>
|
|
{{ $query := where site.RegularPages "Type" "eventos" }}
|
|
{{ $query = where $query "Params.metadata.event.date.finish" ">=" (now.Format "2006-01-02") }}
|
|
{{ $query = first 3 $query }}
|
|
|
|
{{ range $post := $query }}
|
|
<li>
|
|
<a class="img" href="{{ .Permalink }}">
|
|
{{ with (.Resources.ByType "image").GetMatch "*cover*" }}
|
|
<img class='event-cover' src="{{ .Permalink }}" />
|
|
{{ end }}
|
|
</a>
|
|
<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>
|
|
—
|
|
<span class='location'>{{ .Params.metadata.event.location }}</span>
|
|
</p>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<p class="see-more body-width">
|
|
Falta aqui algum evento?
|
|
<a href="mailto:contacto@ansol.org">manda-nos uma mensagem</a>
|
|
</p>
|
|
</section>
|
|
{{- end -}}
|