Skip to content

Commit f992aeb

Browse files
committed
Novas
1 parent e961daf commit f992aeb

File tree

8 files changed

+143
-39
lines changed

8 files changed

+143
-39
lines changed

_includes/layouts/portfolio_list.vto

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,21 @@ layout: ./base.vto
1414
</div>
1515
</header>
1616

17-
<div class="ly-grid portfolio-grid top-xl-2xl">
17+
<div class="ly-columns portfolio-list top-xl-2xl">
1818
{{ for portfolio of results }}
1919
{{ include "templates/portfolio-list.vto" { portfolio } }}
2020
{{ /for }}
2121
</div>
22+
23+
<nav class="pagination">
24+
{{ set prev = pagination.previous }}
25+
{{ set next = pagination.next }}
26+
27+
{{ if prev }}
28+
<a href="{{ prev }}">Páxina anterior</a>
29+
{{ /if }}
30+
{{ if next }}
31+
<a href="{{ next }}">Páxina seguinte</a>
32+
{{ /if }}
33+
</nav>
34+

_includes/styles/components/header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
.header-title {
1919
/* font-family: var(--font-display); */
20-
font-weight: var(--font-black);
20+
font-weight: var(--font-bold);
2121
font-size: var(--size-7);
2222
letter-spacing: var(--size-7-spacing);
2323
line-height: var(--line-xshort);

_includes/styles/components/news.css

Lines changed: 98 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@
2626
row-gap: var(--space-2xs);
2727
}
2828

29-
.news-title {
30-
font-size: var(--size-3);
31-
letter-spacing: var(--size-3-spacing);
32-
margin: 0;
33-
34-
a {
35-
text-decoration: none;
36-
}
37-
}
38-
3929
.news-time {
4030
grid-area: time;
4131

@@ -44,3 +34,101 @@
4434
}
4535
}
4636
}
37+
38+
.news-title {
39+
font-size: var(--size-3);
40+
letter-spacing: var(--size-3-spacing);
41+
margin: 0;
42+
43+
a {
44+
text-decoration: none;
45+
}
46+
}
47+
48+
.news-image {
49+
border-radius: var(--border-radius);
50+
max-width: 100%;
51+
height: auto;
52+
}
53+
54+
.news-home {
55+
grid-column: content;
56+
display: grid;
57+
grid-template-columns: repeat(4, minmax(0, 1fr));
58+
align-content: start;
59+
row-gap: var(--space-3xl);
60+
column-gap: var(--space-2xl);
61+
grid-template-areas: "nth-1 nth-1 nth-1 nth-2"
62+
"nth-3 nth-4 nth-5 nth-6";
63+
> :nth-child(1) {
64+
grid-area: nth-1;
65+
}
66+
> :nth-child(2) {
67+
grid-area: nth-2;
68+
}
69+
> :nth-child(3) {
70+
grid-area: nth-3;
71+
}
72+
> :nth-child(4) {
73+
grid-area: nth-4;
74+
}
75+
> :nth-child(5) {
76+
grid-area: nth-5;
77+
}
78+
> :nth-child(6) {
79+
grid-area: nth-6;
80+
}
81+
}
82+
83+
.news.is-main {
84+
display: grid;
85+
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
86+
grid-template-areas: "content img";
87+
column-gap: var(--space-2xl);
88+
89+
.news-image {
90+
grid-area: img;
91+
}
92+
.news-content {
93+
grid-area: content;
94+
display: grid;
95+
align-content: start;
96+
row-gap: var(--space-xs);
97+
}
98+
.news-intro {
99+
font-size: var(--size-2);
100+
letter-spacing: var(--size-2-spacing);
101+
line-height: var(--line-base);
102+
}
103+
.news-title {
104+
font-size: var(--size-6);
105+
line-height: var(--line-xshort);
106+
letter-spacing: var(--size-6-spacing);
107+
}
108+
}
109+
.news.is-secondary {
110+
display: grid;
111+
grid-template-columns: minmax(0, 1fr);
112+
grid-template-areas: "content" "img";
113+
column-gap: var(--space-xl);
114+
115+
.news-image {
116+
grid-area: img;
117+
}
118+
.news-content {
119+
grid-area: content;
120+
display: grid;
121+
align-content: start;
122+
row-gap: var(--space-xs);
123+
}
124+
.news-intro {
125+
font-size: var(--size-1);
126+
letter-spacing: var(--size-1-spacing);
127+
line-height: var(--line-base);
128+
}
129+
.news-title {
130+
font-size: var(--size-4);
131+
letter-spacing: var(--size-4-spacing);
132+
line-height: var(--line-xshort);
133+
}
134+
}

_includes/styles/components/subheader.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.subheader-title {
2-
font-weight: var(--font-black);
2+
font-weight: var(--font-bold);
33
font-size: var(--size-4);
44
letter-spacing: var(--size-4-spacing);
55
line-height: var(--line-xshort);

_includes/styles/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--size-2-spacing: 0;
2020
--size-3-spacing: -0.02em;
2121
--size-4-spacing: -0.02em;
22+
--size-6-spacing: -0.03em;
2223
--size-7-spacing: -0.04em;
2324

2425
/* Font family */

_includes/templates/news-grid.vto

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
<article>
2-
<header>
3-
<nav>
4-
{{ for tag of news.tags }}
5-
<a href="{{ tag }}">{{ tag }}</a>
6-
{{ /for }}
7-
</nav>
1+
{{ set img = news.body.find((block) => block.type === "image") }}
2+
3+
<article class="news {{ main ? 'is-main' : 'is-secondary' }}">
4+
{{ if img }}
5+
<img class="news-image" src="{{ img.image }}">
6+
{{ /if }}
87

9-
<time datetime='{{ news.date |> date("DATETIME") }}'>
8+
<div class="news-content">
9+
<time class="news-time" datetime='{{ news.date |> date("DATETIME") }}'>
1010
{{ news.date |> date("HUMAN_DATE") }}
1111
</time>
1212

13-
<h1>
13+
<h1 class="news-title">
1414
<a href="{{ news.url }}">{{ news.title }}</a>
1515
</h1>
16-
</header>
1716

18-
<div>
19-
{{ news.intro |> md }}
17+
<nav class="ly-tags news-tags">
18+
{{ for tag of news.tags }}
19+
<a class="filter is-small" href="{{ tag }}">{{ tag }}</a>
20+
{{ /for }}
21+
</nav>
22+
23+
<div class="news-intro">
24+
{{ news.intro |> md }}
25+
</div>
2026
</div>
2127
</article>

index.vto

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ id: home
33
lang: [gl, es]
44
---
55

6-
<section>
7-
<div>
8-
{{# Lista de noticias #}}
9-
{{ for news of search.pages(`type=news lang=${lang}`, "date=desc", 12) }}
10-
{{ include "templates/news-grid.vto" { news } }}
11-
{{ /for }}
12-
</div>
6+
<section class="news-home">
7+
{{ for index, news of search.pages(`type=news lang=${lang}`, "date=desc", 6) }}
8+
{{ include "templates/news-grid.vto" { news, main: index === 0 } }}
9+
{{ /for }}
1310

1411
<nav>
1512
{{# Botón ver máis #}}
@@ -18,11 +15,10 @@ lang: [gl, es]
1815
</nav>
1916
</section>
2017

21-
<section>
22-
{{# Lista de proxectos de socios #}}
18+
{{# <section>
2319
{{
2420
for portfolio of search.pages(`type=portfolio lang=${lang}`, "date=desc", 10)
2521
}}
2622
{{ include "templates/portfolio-list.vto" { portfolio } }}
2723
{{ /for }}
28-
</section>
24+
</section> #}}

portfolio.page.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ export const lang = ["gl", "es"];
44
export const gl = {
55
title: "Portfolio",
66
description: `
7-
Podes suscribirte ao noso [feed RSS](#) para estar ao tanto das últimas novas.
8-
Tamén podes seguirnos nas redes sociais de [X](https://x.com/asociaciondag) e [Instagram](https://www.instagram.com/asociaciondag).
7+
Esta é unha pequena mostra de proxectos realizados polos socios da DAG.
8+
Tamén podes ver a [listaxe de socios](/socios/) e os seus respectivos portfolios.
99
`,
1010
};
1111
export const es = {
1212
title: "Portfolio",
1313
description: `
14-
Puedes suscribirte a nuestro [feed RSS](#) para estar al tanto de las últimas noticias.
15-
También puedes seguirnos en las redes sociales de [X](https://x.com/asociaciondag) e [Instagram](https://www.instagram.com/asociaciondag).
14+
Esta es una pequeña muestra de proyectos realizados por los socios de la DAG.
15+
También puedes ver el [listado de socios](/es/socios/) y sus respectivos portfolios.
1616
`,
1717
};
1818

0 commit comments

Comments
 (0)