Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import HomeLayout from "../layouts/HomeLayout.astro";
<main id="main" tabindex="-1">
<section id="intro" class="chapter is-active" data-scene="intro" aria-label="Introduction">
<div class="chapter__inner">
<h1 class="sr-only">mdbase</h1>
<h1 class="home-title">Structured data in ordinary Markdown files</h1>
<p>
An mdbase is a folder of Markdown files with enough shared structure
for applications to understand them. The files remain readable in a
Expand All @@ -25,6 +25,10 @@ import HomeLayout from "../layouts/HomeLayout.astro";
which applications may use it. If a collection remains on your
computer, the mdbase Connector serves the folder locally.
</p>
<div class="chapter__actions home-actions">
<a class="home-action home-action--primary" href="https://editor.mdbase.dev/">Open the Editor</a>
<a class="home-action" href="/spec/">Read the specification</a>
</div>
</div>
</section>

Expand Down
35 changes: 34 additions & 1 deletion src/styles/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
align-items: center;
scroll-margin-top: 120px;
}
.chapter:first-child { min-height: 126vh; }
/* A full viewport keeps the headline above the fold beside the intro diagram. */
.chapter:first-child { min-height: 100vh; }
.chapter:last-child { min-height: 120vh; }

.chapter__inner {
Expand All @@ -57,6 +58,38 @@
letter-spacing: 0;
}
.home-body p { margin: 0 0 20px; }

/* global.css is not loaded here, so homepage links need their own rule. */
.home-body a {
color: var(--color-text);
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
.home-body a:hover { color: var(--color-text-soft); }

.home-body .home-title {
max-width: 18ch;
margin-bottom: 28px;
font-size: clamp(1.7rem, 3.2vw, 2.4rem);
line-height: 1.12;
letter-spacing: -0.01em;
}

.chapter__actions.home-actions {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem 1.5rem;
}
.home-body .home-action--primary {
padding: 0.55rem 1rem;
border: 1px solid var(--color-text);
text-decoration: none;
}
.home-body .home-action--primary:hover {
color: var(--color-canvas);
background: var(--color-text);
}
.chapter__lead, .chapter__body { color: var(--color-text); }

.file-tree,
Expand Down
Loading