aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/starlight/Footer.astro
blob: 7c3871c0ee58f146336c3aef8f1264036e2ef991 (plain)
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
---
import EditLink from 'virtual:starlight/components/EditLink';
import LastUpdated from 'virtual:starlight/components/LastUpdated';
import Pagination from 'virtual:starlight/components/Pagination';
import config from 'virtual:starlight/user-config';
import { Icon } from '@astrojs/starlight/components';
import SocialShare from '../SocialShare.astro';
---

<footer class="sl-flex">
  <SocialShare />

  <div class="meta sl-flex">
    <EditLink />
    <LastUpdated />
  </div>
  <Pagination />

  {
    config.credits && (
      <a class="kudos sl-flex" href="https://starlight.astro.build">
        <Icon name={'starlight'} /> {Astro.locals.t('builtWithStarlight.label')}
      </a>
    )
  }
</footer>

<style>
  @layer starlight.core {
    footer {
      flex-direction: column;
      gap: 1.5rem;
    }
    .meta {
      gap: 0.75rem 3rem;
      justify-content: space-between;
      flex-wrap: wrap;
      margin-top: 3rem;
      font-size: var(--sl-text-sm);
      color: var(--sl-color-gray-3);
    }
    .meta > :global(p:only-child) {
      margin-inline-start: auto;
    }

    .kudos {
      align-items: center;
      gap: 0.5em;
      margin: 1.5rem auto;
      font-size: var(--sl-text-xs);
      text-decoration: none;
      color: var(--sl-color-gray-3);
    }
    .kudos:hover {
      color: var(--sl-color-white);
    }
  }

  @layer starlight.components {
    .kudos :global(svg) {
      color: var(--sl-color-orange);
    }
  }
</style>