diff --git a/themes/academic/assets/scss/ansol.scss b/themes/academic/assets/scss/ansol.scss index 02ec9bc..c693478 100644 --- a/themes/academic/assets/scss/ansol.scss +++ b/themes/academic/assets/scss/ansol.scss @@ -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; } diff --git a/themes/academic/layouts/_default/single.html b/themes/academic/layouts/_default/single.html index bf6b91e..bd795a2 100644 --- a/themes/academic/layouts/_default/single.html +++ b/themes/academic/layouts/_default/single.html @@ -12,24 +12,10 @@ {{ if eq .Params.layout "evento" }}

Informação do evento

- {{ with .Params.metadata.event.date }} -

- Data: - {{ 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 }} -

- {{ end }} +

+ Data: + {{ partial "event-date" . }} +

{{ with .Params.metadata.event.site }}

Website: {{ .title | or .url }}

diff --git a/themes/academic/layouts/eventos/single.html b/themes/academic/layouts/eventos/single.html index 20bae44..a3752cf 100644 --- a/themes/academic/layouts/eventos/single.html +++ b/themes/academic/layouts/eventos/single.html @@ -14,24 +14,10 @@

Informação do evento

- {{ with .Params.metadata.event.date }} -

- Data: - {{ 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 }} -

- {{ end }} +

+ Data: + {{ partial "event-date" . }} +

{{ with .Params.metadata.event.site }}

Website: {{ .title | or .url }}

diff --git a/themes/academic/layouts/index.html b/themes/academic/layouts/index.html index fe20837..a785a75 100644 --- a/themes/academic/layouts/index.html +++ b/themes/academic/layouts/index.html @@ -21,7 +21,7 @@ {{ $query = first 3 $query -}} {{ range $post := $query -}}
  • - +
    {{ $cover := (index (.Resources.ByType "image") 0) }} {{ if not $cover }} {{ $cover = resources.Get "images/default-news-cover.png" }} @@ -29,7 +29,7 @@ {{ with $cover }} {{ end }} - +

    {{ .Title }}

    @@ -38,7 +38,7 @@
    {{ .Summary }} -

    Ler tudo

    +

    Ler tudo

  • @@ -79,33 +79,17 @@ {{ range $post := $query }}
  • - {{ partial "thumbnail" . }} -
    -

    - {{ .Title }} -

    -

    - - {{ 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 }} - - — - {{ .Params.metadata.event.location }} -

    -
    + + {{ partial "thumbnail" . }} +
    +

    {{ .Title }}

    +

    + {{ partial "event-date" . }} + — + {{ .Params.metadata.event.location }} +

    +
    +
  • {{ end }} diff --git a/themes/academic/layouts/partials/event-date.html b/themes/academic/layouts/partials/event-date.html new file mode 100644 index 0000000..64e1bbc --- /dev/null +++ b/themes/academic/layouts/partials/event-date.html @@ -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 }} diff --git a/themes/academic/layouts/partials/evento.html b/themes/academic/layouts/partials/evento.html index 9f5e1e5..77c6d87 100644 --- a/themes/academic/layouts/partials/evento.html +++ b/themes/academic/layouts/partials/evento.html @@ -1,28 +1,11 @@ -{{ partial "thumbnail" . }} -
    -

    - {{ .Title }} -

    -

    - - {{ 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 }} - - — - {{ .Params.metadata.event.location }} -

    -
    - + + {{ partial "thumbnail" . }} +
    +

    {{ .Title }}

    +

    + {{ partial "event-date" . }} + — + {{ .Params.metadata.event.location }} +

    +
    +
    diff --git a/themes/academic/layouts/partials/thumbnail.html b/themes/academic/layouts/partials/thumbnail.html index 4259574..b734bb8 100644 --- a/themes/academic/layouts/partials/thumbnail.html +++ b/themes/academic/layouts/partials/thumbnail.html @@ -1,12 +1,10 @@ - - {{ $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 }} - - {{ end }} - +{{ end }} +{{ with $cover }} + +{{ end }}