summaryrefslogtreecommitdiff
path: root/smoke/astro.build-main/src/pages/blog/index.astro
blob: 490c2418463dc1178a6dd04af3197de3d0efa953 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
import Layout from '../../layouts/Page.astro';
import Card from '../../components/blog/Card.astro';
import { getAllPosts } from '../../posts';

const posts = await getAllPosts();

const meta = { title: 'Blog' };
---

<Layout meta={meta}>
    <header>
        <h1 class="title text-gradient">Blog</h1>
        <p></p>
    </header>

    <ul role="list" class="posts">
        {posts.map(post => {
            return (
                <li class="post">
                    <a class="overlay" href={post.href}></a>
                    <Card post={post} variant="summary" />
                </li>
            )
        })}
    </ul>
</Layout>

<style>
    header {
        padding: 3rem 2rem 2rem;
        width: 100%;
        max-width: 64rem;
        flex-grow: 1;
    }
    h1.title {
        font-family: var(--font-display);
        --fill: var(--gradient-pop-1);
        font-size: var(--size-900);
    }
    .posts {
        width: 100%;
        max-width: 64rem;
        padding: 2rem;
        padding-bottom: 4rem;
        display: flex;
        flex-flow: column nowrap;
        font-family: var(--font-body);
        font-size: var(--size-500);
        line-height: 1.3;
        color: var(--color-midnight);
    }
    .post + .post {
        margin-top: 1rem;
    }
    .post {
        position: relative;
        display: flex;
        flex-flow: row wrap;
        padding: 3rem 2rem;
        margin-left: -2rem;
        margin-right: -2rem;
        background: white;
        box-shadow: var(--shadow-sm);
        border-radius: var(--corner-md);
        font-family: var(--font-body);
        font-size: var(--size-500);
        line-height: 1.3;
        color: var(--color-midnight);
    }
    :is(.post:hover, .post:focus-within) .title {
        --fill: var(--gradient-pop-1);
    }
    .post :global(a) {
        z-index: 1;
    }
    .overlay {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        z-index: 0;
    }
</style>