mirror of
https://github.com/Xevion/utsa-handbook.git
synced 2025-12-15 20:13:36 -06:00
Add link type, remove heroImage
This commit is contained in:
@@ -17,8 +17,8 @@ import { version } from "@/../package.json";
|
||||
<footer class="dark:text-zinc-400 pt-8 px-4 pb-24 text-center">
|
||||
<p>
|
||||
<a href={GITHUB_URL} target="_blank">Handbook</a> v{version}
|
||||
<a href={`${GITHUB_URL}/commit/${longHash}`} target="_blank"
|
||||
>({shortHash})</a
|
||||
>
|
||||
<a href={`${GITHUB_URL}/commit/${longHash}`} target="_blank">
|
||||
({shortHash})
|
||||
</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import get from '@/content/sidebar';
|
||||
import get, {Link} from '@/content/sidebar';
|
||||
import clsx from 'clsx';
|
||||
const { currentPage } = Astro.props;
|
||||
const currentPageMatch = currentPage.slice(1);
|
||||
@@ -11,7 +11,7 @@ const isCurrentPage = (item): boolean => {
|
||||
return false;
|
||||
};
|
||||
|
||||
const getLinkClasses = (link) => {
|
||||
const getLinkClasses = (link: Link) => {
|
||||
const baseClasses = "block py-2 px-6 my-1 transition-colors border-l hover:border-zinc-400 hover:text-slate-900"
|
||||
const isCurrent = isCurrentPage(link);
|
||||
|
||||
|
||||
@@ -3,12 +3,11 @@ import type { CollectionEntry } from 'astro:content';
|
||||
import BaseHead from '@components/BaseHead.astro';
|
||||
import Header from '@components/Header.astro';
|
||||
import Footer from '@components/Footer.astro';
|
||||
import FormattedDate from '@components/FormattedDate.astro';
|
||||
import Sidebar from '@components/Sidebar.astro';
|
||||
|
||||
type Props = CollectionEntry<'handbook'>['data'];
|
||||
|
||||
const { title, description, pubDate, heroImage, lastModified } = Astro.props;
|
||||
const { title, description, pubDate, lastModified } = Astro.props;
|
||||
const currentPage = new URL(Astro.request.url).pathname;
|
||||
---
|
||||
<html lang="en">
|
||||
@@ -37,8 +36,8 @@ const currentPage = new URL(Astro.request.url).pathname;
|
||||
</div>
|
||||
<main class="py-4 px-8 pb-32 col-span-6 overflow-auto">
|
||||
<div>
|
||||
<slot />
|
||||
<!-- <PageContent content={content}>
|
||||
<slot />
|
||||
</PageContent> -->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
import BaseHead from '@components/BaseHead.astro';
|
||||
import Header from '@components/Header.astro';
|
||||
import Footer from '@components/Footer.astro';
|
||||
import { SITE_TITLE, SITE_DESCRIPTION } from '@/consts';
|
||||
import { getCollection } from 'astro:content';
|
||||
import FormattedDate from '@components/FormattedDate.astro';
|
||||
@@ -106,6 +105,5 @@ const posts = (await getCollection('handbook')).sort(
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
import BaseHead from '@components/BaseHead.astro';
|
||||
import Header from '@components/Header.astro';
|
||||
import Footer from '@components/Footer.astro';
|
||||
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
||||
---
|
||||
|
||||
@@ -12,6 +11,5 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
||||
</head>
|
||||
<body class="dark:text-zinc-200 dark:bg-zinc-800">
|
||||
<Header />
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user