1 ---
2 import { SITE } from '@/config'
3 import { getLangFromUrl, useTranslations } from '@/i18n/utils'
4
5 const currentLang = getLangFromUrl(Astro.url)
6 const t = useTranslations(currentLang)
7 const today = new Date()
8 ---
9
10 <footer>
11 <div class="footer-content">
12 <div class="footer-links">
13 <nav class="footer-nav">
14 <a href={`${currentLang === 'id' ? '' : '/' + currentLang}/contact`}>{t('nav.contact')}</a>
15 <a href={`${currentLang === 'id' ? '' : '/' + currentLang}/privacy-policy`}>{t('nav.privacy')}</a>
16 <a href={`${currentLang === 'id' ? '' : '/' + currentLang}/terms-of-use`}>{t('nav.terms')}</a>
17 </nav>
18 </div>
19 <div class="footer-bottom">
20 <div class="copyright">
21 <span class="date">
22 &copy;
23 {today.getFullYear()}
24 </span>
25 <a href="https://5mb.app" target="__blank">{SITE.author}</a>
26 </div>
27 <div class="powered-by">
28 {t('footer.poweredBy')}{' '}
29 <a href="https://smbcloud.xyz" target="__blank">smbCloud</a> |{' '}
30 <a href="https://github.com/smbcloudXYZ/pepakbasajawa-web" target="__blank">{t('footer.source')}</a>
31 </div>
32 </div>
33 </div>
34 </footer>
35 <style>
36 footer {
37 font-size: var(--font-size-s);
38 font-weight: var(--font-weight-light);
39 line-height: 1.75;
40 color: var(--text-secondary);
41 margin-top: 4rem;
42 }
43
44 .footer-content {
45 display: flex;
46 flex-direction: column;
47 gap: 1.5rem;
48 width: 100%;
49 }
50
51 .footer-links {
52 padding-bottom: 1rem;
53 border-bottom: 1px solid var(--border);
54 }
55
56 .footer-nav {
57 display: flex;
58 gap: 1.5rem;
59 justify-content: center;
60 flex-wrap: wrap;
61 }
62
63 .footer-nav a {
64 color: var(--text-secondary);
65 text-decoration: none;
66 padding: 0.25rem 0.5rem;
67 border-radius: 0.25rem;
68 transition: all 0.2s ease-out;
69 }
70
71 .footer-nav a:hover {
72 color: var(--text-primary);
73 background-color: var(--code-bg);
74 }
75
76 .footer-bottom {
77 display: flex;
78 justify-content: space-between;
79 align-items: center;
80 flex-direction: row;
81 flex-wrap: nowrap;
82 width: 100%;
83 }
84
85 .copyright,
86 .powered-by {
87 white-space: nowrap;
88 }
89
90 .powered-by a {
91 color: var(--text-secondary);
92 text-decoration: none;
93 transition: color 0.2s ease-out;
94 }
95
96 .powered-by a:hover {
97 color: var(--text-primary);
98 }
99
100 @media (max-width: 768px) {
101 .footer-nav {
102 gap: 1rem;
103 }
104
105 .footer-bottom {
106 flex-direction: column;
107 gap: 0.75rem;
108 text-align: center;
109 }
110
111 .copyright,
112 .powered-by {
113 white-space: normal;
114 }
115 }
116 </style>