Skip to content

Commit 152367a

Browse files
committed
feat: add localized agenda search placeholder
1 parent d993d61 commit 152367a

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

src/components/agenda/DayLink.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
const { curTitle, title, href } = Astro.props
33
---
44

5-
<a class:list={[title === curTitle ? 'text-info-dark border-info-dark border-b-6' : 'text-info', 'hover:text-info-dark px-6 md:px-10 text-lg transition-colors']} href={href}>{title}</a>
5+
<a class:list={[title === curTitle ? 'text-info-dark border-info-dark border-b-6' : 'text-info', 'hover:text-info-dark px-6 text-lg font-bold transition-colors md:px-10']} href={href}>{title}</a>

src/components/agenda/Search.astro

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
---
22
import Icon from '~/components/Icon.astro'
3+
import { useI18n } from '~/i18n/utils'
4+
5+
const { t } = useI18n(Astro.url.pathname)
36
---
47

58
<div class="flex items-center gap-2 border-b border-[#848484]">
6-
<Icon name="mdi:magnify" width="24" />
7-
<input class="agenda-search w-full outline-none" type="text" />
9+
<Icon name="mdi:magnify" width="24" color="#D1D1D1" />
10+
<input class="agenda-search w-full outline-none" type="text" placeholder={t('agenda.search_keyword')} />
811
</div>
12+
13+
<style>
14+
.agenda-search::placeholder {
15+
color: #d1d1d1;
16+
}
17+
</style>

src/components/agenda/desktop/Desktop.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ schedule.sessions.forEach(session => {
2626
<div class="agenda hidden lg:block">
2727
<div class="sticky top-0 z-30 mb-6 flex flex-col justify-center bg-white" style="height: var(--agenda-header-height);">
2828
<div class="container">
29-
<div class="mt-4 mb-5 flex gap-4 font-bold">
29+
<div class="mt-4 mb-5 flex gap-4">
3030
<DayLink href={getRelativeLocaleUrl(locale, 'agenda/day1')} title="Day 1" curTitle={title} />
3131
<DayLink href={getRelativeLocaleUrl(locale, 'agenda/day2')} title="Day 2" curTitle={title} />
3232
<div class="ml-auto">

src/i18n/messages/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"main_note": "Notes",
3131
"main_live": "Live",
3232
"qa": "Q&A",
33-
"note": "Collab Notes"
33+
"note": "Collab Notes",
34+
"search_keyword": "Search agendas"
3435
},
3536
"visit": {
3637
"info": {

src/i18n/messages/zh-tw.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"main_note": "議程共筆",
3131
"main_live": "議程直播",
3232
"qa": "線上提問",
33-
"note": "共同筆記"
33+
"note": "共同筆記",
34+
"search_keyword": "以關鍵字搜尋議程"
3435
},
3536
"visit": {
3637
"info": {

0 commit comments

Comments
 (0)