Skip to content

Commit

Permalink
update layout 🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Sep 20, 2024
1 parent d060146 commit bed00fa
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Home/CommunityCards.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Card from '../Card.astro'
<div class="p-3 md:px-20 md:py-10 w-full">

<div class="divider h-[unset] whitespace-normal">
<h2 class="text-3xl font-bold tracking-wider p-5 uppercase">
<h2 id="FOR-THE-RESEARCH-COMMUNITY" class="text-3xl font-bold tracking-wider p-5 uppercase">
for the research community
</h2>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/DeveloperCards.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Card from '../Card.astro'
<div class="p-3 md:px-20 md:py-10 w-full max-sm:p-3">

<div class="divider h-[unset] whitespace-normal">
<h2 class="text-3xl font-bold tracking-wider p-5 uppercase">
<h2 id="FOR-THE-RDM-COMMUNITY" class="text-3xl font-bold tracking-wider p-5 uppercase">
for the RDM community
</h2>
</div>
Expand Down
14 changes: 9 additions & 5 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const linksMin: Link[] = [
]
const drawerIsOpen = Astro.props.drawerIsOpen
const isHome = Astro.url.pathname === URLS.INTERNAL_HOME
---

Expand All @@ -49,9 +50,9 @@ const drawerIsOpen = Astro.props.drawerIsOpen
<input id="my-drawer-input" type="checkbox" class="drawer-toggle" />
<div class="drawer-content flex flex-col">
<!-- Navbar -->
<div class="navbar shadow-md dark:shadow-primary text-primary mb-1 z-50">
<div class="navbar shadow-md dark:shadow-primary text-primary mb-1">
<div class="navbar-start">
<div class="flex-none lg:hidden">
<div class="flex-none" class:list={[{"lg:hidden": drawerIsOpen}]}>
<label id="my-drawer-input-label" for="my-drawer-input" aria-label="open sidebar" class="btn btn-square btn-ghost">
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -70,9 +71,12 @@ const drawerIsOpen = Astro.props.drawerIsOpen
<img src="/arc-website/favicon.svg" alt="logo" class="h-8 w-8" />
</a>
</div>
<div class:list={["navbar-center hidden lg:flex", {"lg:hidden": drawerIsOpen}]}>
<RecMenu className="menu menu-horizontal px-1" links={linksMin} />
</div>
{ isHome &&
<div class:list={["navbar-center hidden lg:flex gap-2", {"lg:hidden": drawerIsOpen}]}>
<a class="btn btn-ghost" href="#FOR-THE-RESEARCH-COMMUNITY">Research Community</a>
<a class="btn btn-ghost" href="#FOR-THE-RDM-COMMUNITY">RDM Community</a>
</div>
}
<div class="navbar-end gap-2">
<Search />
<a class="btn btn-ghost btn-circle" href={URLS.GITHUB_REPO}>
Expand Down
2 changes: 2 additions & 0 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const { title, drawerIsOpen } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/arc-website/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{"ARC | " + title}</title>
<link rel="sitemap" href="/arc-website/sitemap-index.xml" />
</head>
<body>
<div class="flex flex-col min-h-screen">
Expand Down Expand Up @@ -46,6 +47,7 @@ const { title, drawerIsOpen } = Astro.props;
html {
font-family: system-ui, sans-serif;
background: #13151a;
scroll-behavior: smooth;
}
code {
font-family:
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/MarkdownLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ document.addEventListener("DOMContentLoaded", function () {
<h1>{frontmatter.title}</h1>
<!-- <p class="subtitle">Written by {frontmatter.author}</p> -->
<div class="gap-2 flex flex-wrap">
{frontmatter.tags.map((tag: string) => (
{frontmatter.tags && frontmatter.tags.map((tag: string) => (
<small class="text-teal-900 hover:underline"><a href={createTagLink(tag)}>{tag}</a></small>
))}
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/pages/details/tags/[tag].astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import BaseLayout from '../../../layouts/BaseLayout.astro';
import MarkdownLayout from '../../../layouts/MarkdownLayout.astro';
export async function getStaticPaths() {
const allPosts: any[] = await Astro.glob('../*.md');
Expand All @@ -17,11 +18,12 @@ export async function getStaticPaths() {
const { tag } = Astro.params;
const { posts } = Astro.props;
---

<BaseLayout title={tag}>
<div class="w-full flex justify-center p-5">
<div class="prose xl:prose-xl">
<MarkdownLayout frontmatter={{title: "Tag: " + tag}}>
<div class="w-full flex justify-center p-5 grow">
<div class="prose xl:prose-xl grow">
<p>All docs tagged with <em><strong>{tag}</strong></em>.</p>
<ul>
{posts.map((post) => <li>
Expand All @@ -39,4 +41,4 @@ const { posts } = Astro.props;
</ul>
</div>
</div>
</BaseLayout>
</MarkdownLayout>

0 comments on commit bed00fa

Please sign in to comment.