Skip to content

Commit

Permalink
add home page link
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed Apr 26, 2024
1 parent 8296cbb commit 64b6709
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/address-to-english-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const AddressToEnglishInput = () => {
autoFocus
ref={inputRef}
className={cn(
"whitespace-pre-wrap inline-block text-start break-words break-all text-2xl bg-secondary/50 resize-none focus-visible:ring-0 !ring-offset-0 transition-colors",
"whitespace-pre-wrap inline-block text-start break-words break-all text-2xl bg-secondary/15 resize-none focus-visible:ring-0 !ring-offset-0 transition-colors",
!isValid && "border-red-500",
)}
value={value}
Expand All @@ -81,6 +81,7 @@ export const AddressToEnglishInput = () => {
value={isLoading ? "正在更新中華郵政資料..." : result}
readOnly
placeholder="No. 122, Sec. 1, Chongqing S. Rd., Zhongzheng Dist., Taipei City 100, Taiwan (R.O.C.)"
rows={3}
/>
{result && (
<div className="flex items-center gap-2 justify-center">
Expand Down
5 changes: 5 additions & 0 deletions src/pages/[lang]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Calculator,
Sparkles,
QrCode,
Languages,
} from "lucide-react";
import HomeItem from "../../components/home/home-item.astro";
import { createTranslation, LanguageKey } from "@/utils/language";
Expand Down Expand Up @@ -52,6 +53,10 @@ for (const [fromId, from] of Object.entries(calculatorConfig)) {
<p>{t("global.description")}</p>
<h2 class="flex items-center gap-2"><Sparkles />{t("home.recommended")}</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<HomeItemContainer href={`/${code}/address-to-english`}>
<Languages />
<p>台灣中華郵政地址轉英文</p>
</HomeItemContainer>
<HomeItemContainer href={`/${code}/free-qrcode-generator`}>
<QrCode />
<p>{t("qrcode.title")}</p>
Expand Down

0 comments on commit 64b6709

Please sign in to comment.