@@ -4,7 +4,6 @@ import { pathnameWithoutBaseAndLocale } from '~/utils/build/pathnameWithoutBaseA
44import { getRelativeLocaleUrl } from ' astro:i18n'
55import Icon from ' ~/components/Icon.astro'
66import Link from ' ~/components/Link.astro'
7- import OpassDownload from ' ~/components/OpassDownload.astro'
87
98const { t } = useI18n (Astro .url .pathname )
109const pathname = pathnameWithoutBaseAndLocale (Astro .url .pathname )
@@ -181,18 +180,18 @@ const navs: NavItem[] = [
181180 <a href ={ getRelativeLocaleUrl (' en' , pathname )} class =" text-lg" >English</a >
182181 </div >
183182
184- <a class =" register-btn btn-brand flex items-center justify-between px-4 py-3 text-lg" href =" # " >
183+ <Link class =" mobile-nav-item btn-brand flex items-center justify-between px-4 py-3 text-lg" href =" register " >
185184 { t (' nav.register' )}
186185 <Icon name =" mdi:arrow-right" width =" 28" />
187- </a >
186+ </Link >
188187 </div >
189188 </div >
190189 </div >
191190 </div >
192191
193- <a class =" register- btn btn -brand hidden h-full shrink-0 items-center justify-center px-8 md:flex" href =" # " >
192+ <Link class =" btn-brand hidden h-full shrink-0 items-center justify-center px-8 md:flex" href =" register " >
194193 { t (' nav.register' )}
195- </a >
194+ </Link >
196195
197196 <!-- ── Desktop submenu panels (auto-generated from navs data) ──────────────
198197 To add a submenu: add a `submenu: { columns: [...] }` entry to a NavItem.
@@ -233,53 +232,10 @@ const navs: NavItem[] = [
233232 ))
234233 }
235234
236- <template id =" register-modal-header" >
237- <h1 >{ t (' nav.register' )} </h1 >
238- </template >
239- <template id =" register-modal-body" >
240- <div class =" text-[#1e1e1e]" >
241- <div class =" mb-8" >
242- <a href =" https://summit.g0v.tw/tickets" target =" _blank" rel =" noopener noreferrer" class =" btn btn-primary flex items-center gap-2 md:inline-flex" >
243- { t (' register.cta' )} <Icon name =" mdi:external-link" width =" 22" />
244- </a >
245- </div >
246-
247- <div class =" mb-12 grid gap-8 md:grid-cols-2" >
248- <div class =" flex flex-col" >
249- <h4 class =" text-info-dark mb-2" >{ t (' register.time' )} </h4 >
250- <div class =" mb-4" >2026.05.23-24 | 09:00-17:30</div >
251- <div class =" mt-auto" >
252- <a
253- href =" https://calendar.google.com/calendar/render?action=TEMPLATE&text=g0v+Summit+2026&dates=20260523T010000Z/20260524T093000Z&details=g0v+Summit+2026&location=Academia+Sinica"
254- target =" _blank"
255- class =" btn btn-primary flex items-center gap-2 md:inline-flex"
256- >
257- { t (' register.add_to_calendar' )} <Icon name =" mdi:external-link" width =" 22" />
258- </a >
259- </div >
260- </div >
261- <div class =" flex flex-col" >
262- <h4 class =" text-info-dark mb-2" >{ t (' register.location' )} </h4 >
263- <div class =" mb-4" >
264- { t (' register.location_value_1' )} <br />
265- <span class =" text-gray-700" >{ t (' register.location_value_2' )} </span >
266- </div >
267- <div class =" mt-auto" >
268- <Link href =" visit" class =" btn btn-primary flex items-center gap-2 md:inline-flex" >
269- { t (' register.transportation' )} <Icon name =" mdi:external-link" width =" 22" />
270- </Link >
271- </div >
272- </div >
273- </div >
274-
275- <OpassDownload />
276- </div >
277- </template >
278235</nav >
279236
280237<script >
281238 import $ from 'jquery'
282- import { showModalWith } from '~/utils/client/modal'
283239
284240 // ── Mobile nav toggle ────────────────────────────────────────────────────────
285241 const $mobileNav = $('#mobile-nav')
@@ -293,17 +249,6 @@ const navs: NavItem[] = [
293249 $('#burger').toggleClass('is-active')
294250 }
295251
296- // ── Register modal ───────────────────────────────────────────────────────────
297- $('.register-btn').on('click', function (e) {
298- e.preventDefault()
299- if ($mobileNav.hasClass('grid-rows-[1fr]')) toggleMobileNav()
300- showModalWith({
301- header: $('#register-modal-header').html(),
302- body: $('#register-modal-body').html(),
303- size: 'lg',
304- })
305- })
306-
307252 // ── Submenu helpers ──────────────────────────────────────────────────────────
308253 function closeSubmenu($submenu: JQuery<HTMLElement>, $toggle: JQuery<HTMLElement>) {
309254 $submenu.removeClass('grid-rows-[1fr]')
0 commit comments