add download link and post

Seto committed Dec 2, 2025 at 14:54 UTC 1b7a450cbee073b1833b040ec4515bd1dfda287e
4 files changed +251 -17
src/components/layout/Header.astro
+42 -17
@@ -1,7 +1,6 @@
1 ---
2 import { SITE } from '@/config'
3 import ThemeToggle from '@/components/ui/ThemeToggle.astro'
4 -import { Image } from 'astro:assets'
4 ---
5
6 <header>
@@ -12,22 +11,7 @@ import { Image } from 'astro:assets'
11 </div>
12 <div class="header-right">
13 <div class="flex flex-col gap-2 md:flex-row">
15 - <a href="https://apps.apple.com/se/app/pepak-basa-jawa-komplit/id6752241812">
16 - <Image
17 - src="/images/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.svg"
18 - alt="PBJ Komplit Apple AppStore page"
19 - width="150"
20 - height="50"
21 - />
22 - </a>
23 - <a href="https://play.google.com/store/apps/details?id=com.theblangkon.pepakbasajawa">
24 - <Image
25 - src="/images/GetItOnGooglePlay_Badge_Web_color_English.png"
26 - alt="PBJ Komplit Google PlayStore page"
27 - width="150"
28 - height="50"
29 - />
30 - </a>
14 + <a href="/download" class="download-link">Download Our Apps</a>
15 </div>
16 <ThemeToggle />
17 </div>
@@ -57,6 +41,26 @@ import { Image } from 'astro:assets'
41 align-items: center;
42 gap: 1rem;
43 }
44 +
45 + .download-link {
46 + padding: 0.5rem 1rem;
47 + background-color: var(--accent);
48 + color: white;
49 + border-radius: 0.5rem;
50 + font-size: 0.95rem;
51 + transition: all 0.2s ease;
52 + }
53 +
54 + .download-link:hover {
55 + background-color: var(--accent-dark);
56 + transform: translateY(-2px);
57 + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
58 + }
59 +
60 + .download-link:active {
61 + transform: translateY(0);
62 + }
63 +
64 .favicon {
65 position: absolute;
66 width: 1.125rem;
@@ -64,4 +68,25 @@ import { Image } from 'astro:assets'
68 bottom: calc(100% + 3.5rem);
69 left: 0;
70 }
71 + @media (max-width: 480px) {
72 + nav {
73 + justify-content: center;
74 + }
75 +
76 + .logo-container {
77 + width: 100%;
78 + text-align: center;
79 + margin-bottom: 0.5rem;
80 + }
81 +
82 + .header-right {
83 + width: 100%;
84 + justify-content: center;
85 + }
86 +
87 + .download-link {
88 + font-size: 0.9rem;
89 + padding: 0.45rem 0.85rem;
90 + }
91 + }
92 </style>
src/content/posts/unduh-aplikasi-pbj-komplit-bahasa-jawa-untuk-macbook.md new
+10
@@ -0,0 +1,10 @@
1 +---
2 +title: Unduh Aplikasi PBJ Komplit Bahasa Jawa Untuk MacBook
3 +pubDate: '2025-12-02'
4 +---
5 +
6 +# Aplikasi PBJ Komplit Bahasa Jawa Untuk Komputer MacBook
7 +
8 +Untuk kamu yang anti AppStore dan ingin tetap belajar bahasa Jawa dengan senang, kami mempersiapkan aplikasi PBJ Komplit Bahasa Jawa untuk macOS.
9 +
10 +[Unduh Aplikasi PBJ Komplit Bahasa Jawa](/download).
src/pages/api/download-desktop-app.ts new
+75
@@ -0,0 +1,75 @@
1 +import type { APIRoute } from 'astro'
2 +
3 +export const prerender = false
4 +
5 +export const GET: APIRoute = async ({ request }) => {
6 + try {
7 + const STRIPE_SECRET_KEY = import.meta.env.STRIPE_SECRET_KEY
8 +
9 + if (!STRIPE_SECRET_KEY) {
10 + console.error('STRIPE_SECRET_KEY is not configured')
11 + return new Response(JSON.stringify({ error: 'Server configuration error' }), {
12 + status: 500,
13 + headers: { 'Content-Type': 'application/json' }
14 + })
15 + }
16 +
17 + const body = await request.json()
18 + const { wallet_address, destination_currency } = body
19 +
20 + // Validate required parameters
21 + if (!wallet_address) {
22 + return new Response(JSON.stringify({ error: 'wallet_address is required' }), {
23 + status: 400,
24 + headers: { 'Content-Type': 'application/json' }
25 + })
26 + }
27 +
28 + // Create Crypto Onramp Session
29 + const response = await fetch('https://api.stripe.com/v1/crypto/onramp_sessions', {
30 + method: 'POST',
31 + headers: {
32 + Authorization: `Bearer ${STRIPE_SECRET_KEY}`,
33 + 'Content-Type': 'application/x-www-form-urlencoded'
34 + },
35 + body: new URLSearchParams({
36 + 'wallet_addresses[solana]': wallet_address,
37 + ...(destination_currency && {
38 + destination_currency: destination_currency
39 + }),
40 + destination_network: 'solana'
41 + }).toString()
42 + })
43 +
44 + if (!response.ok) {
45 + const errorData = await response.text()
46 + console.error('Stripe API error:', errorData)
47 + return new Response(
48 + JSON.stringify({
49 + error: 'Failed to create onramp session',
50 + details: errorData
51 + }),
52 + {
53 + status: response.status,
54 + headers: { 'Content-Type': 'application/json' }
55 + }
56 + )
57 + }
58 +
59 + const session = await response.json()
60 +
61 + return new Response(JSON.stringify({ client_secret: session.client_secret }), {
62 + status: 200,
63 + headers: { 'Content-Type': 'application/json' }
64 + })
65 + } catch (error) {
66 + console.error('Error creating onramp session:', error)
67 + return new Response(
68 + JSON.stringify({
69 + error: 'Internal server error',
70 + message: error instanceof Error ? error.message : 'Unknown error'
71 + }),
72 + { status: 500, headers: { 'Content-Type': 'application/json' } }
73 + )
74 + }
75 +}
src/pages/download.astro new
+124
@@ -0,0 +1,124 @@
1 +---
2 +import IndexLayout from '@/layouts/IndexLayout.astro'
3 +import { SITE } from '@/config'
4 +import { Image } from 'astro:assets'
5 +---
6 +
7 +<IndexLayout
8 + title={`Unduh - ${SITE.title}`}
9 + description="Hubungi tim PBJ Komplit untuk pertanyaan, saran, atau feedback"
10 +>
11 + <div class="contact-page prose">
12 + <h1>Unduh Aplikasi PBJ Komplit Bahasa Jawa</h1>
13 +
14 + <p>
15 + Aplikasi PBJ Komplit Bahasa Jawa tersedia dalam berbagai platform, mulai dari iOS, Android,
16 + macOS, Windows, dan Linux.
17 + </p>
18 +
19 + <div class="contact-info">
20 + <h2>Unduh</h2>
21 + <a href="https://apps.apple.com/se/app/pepak-basa-jawa-komplit/id6752241812">
22 + <Image
23 + src="/images/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.svg"
24 + alt="PBJ Komplit Apple AppStore page"
25 + width="150"
26 + height="50"
27 + />
28 + </a>
29 + <a href="https://play.google.com/store/apps/details?id=com.theblangkon.pepakbasajawa">
30 + <Image
31 + src="/images/GetItOnGooglePlay_Badge_Web_color_English.png"
32 + alt="PBJ Komplit Google PlayStore page"
33 + width="150"
34 + height="50"
35 + />
36 + </a>
37 + <div class="email-section">
38 + <a href="mailto:info@pepakbasajawa.com" class="email-link"> info@pepakbasajawa.com </a>
39 + </div>
40 + </div>
41 + </div>
42 +</IndexLayout>
43 +
44 +<style>
45 + .contact-page {
46 + max-width: 100%;
47 + margin: 0 auto;
48 + padding: 2rem 0;
49 + }
50 +
51 + .contact-info {
52 + margin: 2rem 0;
53 + }
54 +
55 + .email-section {
56 + margin: 1.5rem 0;
57 + padding: 1rem;
58 + background: var(--code-bg);
59 + border-radius: 8px;
60 + border-left: 4px solid var(--accent);
61 + }
62 +
63 + .email-link {
64 + font-size: 1.25rem;
65 + font-weight: 600;
66 + color: var(--accent);
67 + text-decoration: none;
68 + word-break: break-all;
69 + }
70 +
71 + .email-link:hover {
72 + text-decoration: underline;
73 + }
74 +
75 + .topics {
76 + margin: 2rem 0;
77 + }
78 +
79 + .topics ul {
80 + list-style-type: disc;
81 + margin-left: 1.5rem;
82 + }
83 +
84 + .topics li {
85 + margin: 0.5rem 0;
86 + line-height: 1.6;
87 + }
88 +
89 + .app-info,
90 + .community {
91 + margin: 2rem 0;
92 + }
93 +
94 + .app-info a {
95 + color: var(--accent);
96 + text-decoration: none;
97 + }
98 +
99 + .app-info a:hover {
100 + text-decoration: underline;
101 + }
102 +
103 + .footer-note {
104 + margin: 3rem 0 1rem;
105 + padding: 1.5rem;
106 + background: var(--selection);
107 + border-radius: 8px;
108 + text-align: center;
109 + }
110 +
111 + .footer-note p {
112 + margin: 0.5rem 0;
113 + }
114 +
115 + @media (max-width: 768px) {
116 + .contact-page {
117 + padding: 1rem 0;
118 + }
119 +
120 + .email-link {
121 + font-size: 1.1rem;
122 + }
123 + }
124 +</style>