/ src / components / PageList.astro
PageList.astro
 1  ---
 2  const { currentPage } = Astro.props;
 3  
 4  import PageLink from "./PageLink.astro";
 5  import CurrentPageLink from "./CurrentPageLink.astro";
 6  import TermPrompt from "../components/TermPrompt.astro";
 7  ---
 8  
 9  <p>
10    <TermPrompt />
11    <b>ls</b>
12  </p>
13  
14  {Astro.url.pathname == "/" ? <CurrentPageLink filename="index.mdx" /> : <PageLink filename="index.mdx" link="/" />}
15  
16  <br />
17  
18  {
19    Astro.url.pathname.includes("/contacts") ? (
20      <CurrentPageLink filename="contacts.mdx" />
21    ) : (
22      <PageLink filename="contacts.mdx" link="/contacts" />
23    )
24  }
25  
26  <br />
27  
28  {
29    ["/articles/", "/articles"].includes(Astro.url.pathname) ? (
30      <CurrentPageLink filename="articles.mdx" />
31    ) : (
32      <PageLink filename="articles.mdx" link="/articles" />
33    )
34  }
35  
36  <br />
37  
38  {
39    ["/notes/", "/notes"].includes(Astro.url.pathname) ? (
40      <CurrentPageLink filename="notes.mdx" />
41    ) : (
42      <PageLink filename="notes.mdx" link="/notes" />
43    )
44  }
45  
46  <br />
47  
48  {
49    Astro.url.pathname.includes("/music") ? (
50      <CurrentPageLink filename="music.mdx" />
51    ) : (
52      <PageLink filename="music.mdx" link="/music" />
53    )
54  }
55  
56  <br />
57  
58  {
59    Astro.url.pathname.includes("/events") ? (
60      <CurrentPageLink filename="events.mdx" />
61    ) : (
62      <PageLink filename="events.mdx" link="/events" />
63    )
64  }
65  
66  <br />
67  
68  {
69    Astro.url.pathname.includes("/changelog") ? (
70      <CurrentPageLink filename="changelog.mdx" />
71    ) : (
72      <PageLink filename="changelog.mdx" link="/changelog" />
73    )
74  }
75