|
1 | | -/* eslint-disable @typescript-eslint/no-explicit-any */ |
2 | | -"use client"; |
3 | | -import { Strong } from "@/components/markup"; |
4 | | -import Image from "next/image"; |
5 | | -import Link from "next/link"; |
6 | | -import { useEffect, useRef } from "react"; |
7 | | - |
8 | | -export default function Home() { |
9 | | - const isOnce = useRef(false); |
10 | | - const map = useRef<any>(null); |
11 | | - const mapRef = useRef<HTMLDivElement>(null); |
12 | | - |
13 | | - const toggle = (file: string) => { |
14 | | - if (map.current && mapRef.current) { |
15 | | - window.scrollTo({ |
16 | | - top: mapRef.current.offsetTop - 80, |
17 | | - behavior: "smooth", |
18 | | - }); |
19 | | - map.current.destroy(); |
20 | | - map.current = null; |
21 | | - // mapRef.current.innerHTML = ""; |
22 | | - // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
23 | | - //@ts-ignore |
24 | | - map.current = new Vivus( |
25 | | - "map", |
26 | | - { |
27 | | - type: "oneByOne", |
28 | | - duration: 200, |
29 | | - file, |
30 | | - }, |
31 | | - () => { |
32 | | - mapRef.current?.removeChild(mapRef.current.firstChild!); |
33 | | - }, |
34 | | - ); |
35 | | - } |
36 | | - }; |
37 | | - |
38 | | - useEffect(() => { |
39 | | - if (isOnce.current) return; |
40 | | - isOnce.current = true; |
41 | | - // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
42 | | - //@ts-ignore |
43 | | - map.current = new Vivus("map", { |
44 | | - type: "oneByOne", |
45 | | - duration: 200, |
46 | | - file: "/map_marked.svg", |
47 | | - }); |
48 | | - }, []); |
49 | | - |
50 | | - return ( |
51 | | - <div className="text-center md:px-40 flex flex-col items-center"> |
52 | | - <p className="text-lg font-bold md:text-3xl border-b mb-2 px-4"> |
53 | | - ProLab 活動場所への移動 |
54 | | - </p> |
55 | | - <p className="md:text-lg">電気電子・制御情報工学科棟(E03)</p> |
56 | | - <p className="mb-4 md:text-lg"> |
57 | | - <span className="font-bold">2階</span> 校門側 制御情報実験室(SJ教室) |
58 | | - </p> |
59 | | - <div |
60 | | - id="map" |
61 | | - className="w-80 md:w-auto h-auto md:h-[80vh] grid *:row-start-1 *:col-start-1" |
62 | | - ref={mapRef} |
63 | | - ></div> |
64 | | - <Button onClick={() => toggle("/map_marked.svg")}> |
65 | | - SJ教室を確認する |
66 | | - </Button> |
67 | | - <Button onClick={() => toggle("/map_from_ippan.svg")}> |
68 | | - 一般棟からの経路を確認する |
69 | | - </Button> |
70 | | - <Button onClick={() => toggle("/map_from_seimon.svg")}> |
71 | | - 正門からの経路を確認する |
72 | | - </Button> |
73 | | - </div> |
74 | | - ); |
75 | | -} |
76 | | - |
77 | | -const Button = (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ( |
78 | | - <button |
79 | | - className="w-full sm:w-60 md:w-90 px-4 py-2 bg-blue-600 text-white rounded hover:brightness-75 transition mt-4" |
80 | | - {...props} |
81 | | - /> |
82 | | -); |
| 1 | +import type { Metadata } from "next"; |
| 2 | +import AccessClient from "./access-client"; |
| 3 | + |
| 4 | +export const metadata: Metadata = { |
| 5 | + title: "アクセス", |
| 6 | + description: |
| 7 | + "久留米高専プログラミングラボ部(ProLab)の活動場所への行き方です。電気電子・制御情報工学科棟(E03)2階 制御情報実験室(SJ教室)で活動しています。", |
| 8 | + openGraph: { |
| 9 | + url: "https://www.prolab.club/access", |
| 10 | + }, |
| 11 | +}; |
| 12 | + |
| 13 | +export default function AccessPage() { |
| 14 | + return <AccessClient />; |
| 15 | +} |
0 commit comments