Skip to content

Commit 84c787f

Browse files
committed
Novas
1 parent 2b264af commit 84c787f

File tree

11 files changed

+86
-26
lines changed

11 files changed

+86
-26
lines changed

_components/button/comp.vto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="section section-button">
2-
<a href="{{ url }}">
2+
<a class="button" href="{{ url }}">
33
{{ text }}
44
</a>
55
</div>

_includes/layouts/news_list.vto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ layout: layouts/base.vto
55
<header class="header">
66
<h1 class="header-title">{{ title }}</h1>
77

8+
<div class="header-subtitle">{{ description |> md }}</div>
9+
810
<div class="header-filter ly-tags">
911
{{ for tag of search.values("tags", "type=news lang=" + lang).sort() }}
1012
<span class="filter">{{ tag }}</span>
1113
{{ /for }}
1214
</div>
1315
</header>
1416

15-
<div class="ly-list news-list top-m-xl">
17+
<div class="ly-list news-list top-xl-2xl">
1618
{{ for news of results }}
1719
{{ include "templates/news-list.vto" { news } }}
1820
{{ /for }}
Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
---
22
layout: layouts/base.vto
33
---
4-
<article>
5-
<header>
6-
<nav>
7-
{{ for tag of tags }}
8-
<a href="/tags/{{ tag }}">{{ tag }}</a>
9-
{{ /for }}
10-
</nav>
114

12-
<time datetime='{{ date |> date("DATETIME") }}'>
13-
{{ date |> date("HUMAN_DATE") }}
14-
</time>
5+
{{ set backPage = search.page(`id=news-1 lang=${lang}`) }}
6+
<a class="back" href="{{ backPage.url }}">
7+
<img src="{{ 'arrow/arrow_left_line' |> icon("mingcute") }}">
8+
<span>{{ backPage.title }}</span>
9+
</a>
1510

16-
<h1>{{ title }}</h1>
17-
</header>
11+
<header class="header">
12+
<time class="header-time" datetime='{{ date |> date("DATETIME") }}'>
13+
{{ date |> date("HUMAN_DATE") }}
14+
</time>
1815

19-
<div>
16+
<h1 class="header-title">{{ title }}</h1>
17+
18+
<div class="header-description is-big">
2019
{{ intro |> md }}
2120
</div>
2221

23-
<div>
24-
{{ for block of body }}
25-
{{ await comp[block.type](block) }}
22+
<nav class="ly-tags header-filter">
23+
{{ for tag of tags }}
24+
<a class="filter" href="/tags/{{ tag }}">{{ tag }}</a>
2625
{{ /for }}
27-
</div>
28-
</article>
26+
</nav>
27+
</header>
28+
29+
<div class="blocks top-2xl">
30+
{{ for block of body }}
31+
{{ await comp[block.type](block) }}
32+
{{ /for }}
33+
</div>

_includes/styles/components/blocks.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@
6767
border-radius: var(--border-radius);
6868
}
6969
}
70+
71+
.section-button {
72+
text-align: center;
73+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.button {
2+
display: inline-flex;
3+
text-decoration: none;
4+
font-size: var(--size-2);
5+
font-weight: var(--font-bold);
6+
border: solid 1px;
7+
padding: 0.5em 1em;
8+
border-radius: var(--border-radius);
9+
color: var(--color-black);
10+
11+
&:hover {
12+
background-color: var(--color-hover);
13+
}
14+
}

_includes/styles/components/header.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
}
1212
}
1313

14+
.header-time {
15+
font-size: var(--size-0);
16+
}
17+
1418
.header-title {
1519
/* font-family: var(--font-display); */
1620
font-weight: var(--font-black);
@@ -39,6 +43,11 @@
3943
text-indent: 1em;
4044
}
4145
}
46+
47+
&.is-big {
48+
font-size: var(--size-3);
49+
line-height: var(--line-base);
50+
}
4251
}
4352
.header-filter {
4453
margin-top: var(--space-m);
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
.news-list {
2+
--row-gap: var(--space-s);
3+
border-top: solid 1px var(--color-line);
4+
padding-top: var(--row-gap);
5+
26
.news {
37
display: grid;
48
grid-column: content;
59
grid-template-columns: subgrid;
610
align-items: baseline;
7-
border-bottom: solid 1px;
11+
border-bottom: solid 1px var(--color-line);
812
padding-bottom: var(--row-gap);
13+
grid-template-areas: "time time time" "header header header";
14+
15+
@media (min-width: 800px) {
16+
grid-template-areas: "time header header";
17+
}
918
}
1019

1120
.news-header {
12-
grid-column: center-start / content-end;
21+
grid-area: header;
1322
display: flex;
1423
flex-wrap: wrap;
1524
align-items: center;
@@ -18,8 +27,8 @@
1827
}
1928

2029
.news-title {
21-
font-size: var(--size-4);
22-
letter-spacing: var(--size-4-spacing);
30+
font-size: var(--size-3);
31+
letter-spacing: var(--size-3-spacing);
2332
margin: 0;
2433

2534
a {
@@ -28,7 +37,10 @@
2837
}
2938

3039
.news-time {
31-
grid-column: content-start;
32-
text-align: right;
40+
grid-area: time;
41+
42+
@media (min-width: 800px) {
43+
text-align: right;
44+
}
3345
}
3446
}

_includes/styles/utils.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.top-m-xl {
22
margin-top: var(--space-m-xl);
33
}
4+
.top-xl-2xl {
5+
margin-top: var(--space-xl-2xl);
6+
}
47
.top-2xl {
58
margin-top: var(--space-2xl);
69
}

_includes/styles/variables.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
:root {
22
/* Colors */
33
--color-black: #1a1a1a;
4+
--color-line: #ddd;
45
--color-white: #fff;
6+
--color-hover: #eee;
57

68
/* Font sizes */
79
--size-0: 0.875rem;

news.page.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@ export const lang = ["gl", "es"];
33

44
export const gl = {
55
title: "Novas",
6+
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).
9+
`,
610
};
711
export const es = {
812
title: "Noticias",
13+
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).
16+
`,
917
};
1018

1119
export default function* ({ search, paginate, lang }: Lume.Data) {

0 commit comments

Comments
 (0)