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
2 changes: 1 addition & 1 deletion .generated/content.json

Large diffs are not rendered by default.

79 changes: 2 additions & 77 deletions app/docs-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,13 @@ export function DocsShell({

const results = useMemo(() => search(searchPages, query), [query, searchPages]);
const editUrl = sourceEditUrl(page);
const isDemo = page.route === "/app/demo/";

return (
<>
<a className="skip-link" href="#main">
Skip to content
</a>
<header className={`site-header${isDemo ? " site-header--demo" : ""}`}>
<header className="site-header">
<Link className="brand" href="/" aria-label="TaskNotes documentation home">
<TaskNotesMark />
<span className="brand__copy">
Expand All @@ -116,12 +115,6 @@ export function DocsShell({
</span>
</Link>
<div className="site-header__actions">
{isDemo ? (
<Link className="demo-docs-link" href="/app/">
App docs
</Link>
) : (
<>
<button
className="search-trigger"
type="button"
Expand All @@ -144,12 +137,9 @@ export function DocsShell({
<option value="dark">Dark</option>
</select>
</label>
</>
)}
<a className="app-link" href="https://app.tasknotes.dev/">
Open app
</a>
{!isDemo ? (
<button
className="menu-trigger"
type="button"
Expand All @@ -159,12 +149,10 @@ export function DocsShell({
>
<MenuMark />
</button>
) : null}
</div>
</header>

<div className={`site-shell${isDemo ? " site-shell--demo" : ""}`}>
{!isDemo ? (
<div className="site-shell">
<aside
className={`sidebar${menuOpen ? " is-open" : ""}`}
aria-label="Documentation"
Expand Down Expand Up @@ -205,32 +193,14 @@ export function DocsShell({
<a href="https://github.com/callumalpass">GitHub</a>
</footer>
</aside>
) : null}

{!isDemo ? (
<button
className={`sidebar-overlay${menuOpen ? " is-visible" : ""}`}
type="button"
aria-label="Close documentation navigation"
onClick={() => setMenuOpen(false)}
/>
) : null}

{isDemo ? (
<main className="demo-page" id="main">
<header className="demo-page__intro">
<div>
<p className="demo-page__eyebrow">Interactive demo</p>
<h1>Try TaskNotes</h1>
</div>
<p>
Explore with 24 sample tasks. Changes stay in this browser
session and never touch a collection.
</p>
</header>
<InteractiveDemo />
</main>
) : (
<main className="prose" id="main">
{page.route !== "/" ? (
<nav className="breadcrumbs" aria-label="Breadcrumb">
Expand Down Expand Up @@ -264,9 +234,7 @@ export function DocsShell({
</footer>
) : null}
</main>
)}

{!isDemo ? (
<aside className="toc-column" aria-label="Page outline">
{!page.hideToc && page.toc.length > 1 ? (
<nav className="toc" aria-label="On this page">
Expand All @@ -284,7 +252,6 @@ export function DocsShell({
</nav>
) : null}
</aside>
) : null}
</div>

{searchOpen ? (
Expand Down Expand Up @@ -336,48 +303,6 @@ export function DocsShell({
);
}

const TASKNOTES_APP_ORIGIN = (
process.env.NEXT_PUBLIC_TASKNOTES_APP_ORIGIN ?? "https://app.tasknotes.dev"
).replace(/\/$/, "");
const EMBEDDED_DEMO_URL = `${TASKNOTES_APP_ORIGIN}/embed/?demo=24`;
const FULL_DEMO_URL = `${TASKNOTES_APP_ORIGIN}/?demo=24`;

function InteractiveDemo() {
const [instance, setInstance] = useState(0);

return (
<section className="demo-player" aria-labelledby="interactive-demo-heading">
<header className="demo-player__toolbar">
<div>
<h2 id="interactive-demo-heading">Live demo</h2>
<p>Disposable data · resets when you reload</p>
</div>
<div className="demo-player__actions">
<button
type="button"
onClick={() => setInstance((current) => current + 1)}
>
Reset demo
</button>
<a href={FULL_DEMO_URL} target="_blank" rel="noreferrer">
Open in a new tab ↗
</a>
</div>
</header>
<div className="demo-player__frame">
<iframe
key={instance}
src={EMBEDDED_DEMO_URL}
title="Interactive TaskNotes demo"
loading="eager"
referrerPolicy="no-referrer"
sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
/>
</div>
</section>
);
}

function search(pages: SearchEntry[], query: string): SearchEntry[] {
const terms = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
if (query.trim().length < 2 || !terms.length) return [];
Expand Down
176 changes: 0 additions & 176 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -537,158 +537,6 @@ video {
font-weight: 700;
}

.demo-callout {
display: grid;
max-width: 64rem;
padding: 1.2rem 1.3rem;
margin: 2rem 0 2.5rem;
gap: 0.35rem;
background: var(--color-accent-soft);
border-top: 1px solid var(--color-accent);
border-bottom: 1px solid var(--color-border-strong);
}

.demo-callout__label,
.demo-page__eyebrow {
color: var(--color-accent-strong);
font: 500 0.65rem/1.4 var(--mono);
letter-spacing: 0.05em;
text-transform: uppercase;
}

.demo-callout strong {
font-size: 1.08rem;
}

.demo-callout > span:not(.demo-callout__label) {
max-width: 62ch;
color: var(--color-text-soft);
}

.demo-callout a {
width: fit-content;
margin-top: 0.3rem;
font-weight: 700;
}

.site-shell--demo {
display: block;
width: min(100%, 100rem);
}

.demo-docs-link {
padding: 0.3rem 0.45rem;
color: var(--color-text-soft);
font: 500 0.68rem/1.2 var(--mono);
text-decoration: none;
}

.demo-docs-link:hover {
color: var(--color-accent-strong);
}

.demo-page {
min-height: calc(100dvh - var(--header-height));
padding: clamp(0.8rem, 2vw, 1.5rem);
background: var(--color-surface);
}

.demo-page__intro {
display: flex;
max-width: 86rem;
padding: 0.15rem 0 1rem;
margin-inline: auto;
align-items: end;
justify-content: space-between;
gap: 1.5rem;
}

.demo-page__intro h1 {
font-size: clamp(1.65rem, 3vw, 2.45rem);
line-height: 1.05;
letter-spacing: -0.025em;
}

.demo-page__intro > p {
max-width: 38rem;
color: var(--color-text-soft);
font-size: 0.92rem;
line-height: 1.45;
text-wrap: balance;
}

.demo-player {
max-width: 86rem;
margin-inline: auto;
overflow: hidden;
background: var(--color-surface-subtle);
border: 1px solid var(--color-border-strong);
border-radius: var(--radius);
}

.demo-player__frame {
height: clamp(38rem, calc(100dvh - 12rem), 58rem);
background: var(--color-surface-subtle);
}

.demo-player__frame iframe {
display: block;
width: 100%;
height: 100%;
border: 0;
}

.demo-player__toolbar {
display: flex;
min-height: 3.25rem;
padding: 0.55rem 0.7rem;
align-items: center;
justify-content: space-between;
gap: 1rem;
background: var(--color-surface);
border-bottom: 1px solid var(--color-border-strong);
}

.demo-player__toolbar h2,
.demo-player__toolbar p {
margin: 0;
}

.demo-player__toolbar h2 {
font-size: 0.9rem;
line-height: 1.2;
}

.demo-player__toolbar p {
color: var(--color-text-soft);
font: 400 0.62rem/1.4 var(--mono);
}

.demo-player__actions {
display: flex;
align-items: center;
gap: 0.5rem;
white-space: nowrap;
}

.demo-player__actions button,
.demo-player__actions a {
min-height: 2rem;
padding: 0.35rem 0.55rem;
color: var(--color-accent-strong);
background: transparent;
border: 1px solid var(--color-border-strong);
border-radius: var(--radius);
font: 500 0.68rem/1.2 var(--mono);
text-decoration: none;
}

.demo-player__actions button:hover,
.demo-player__actions a:hover {
color: var(--color-text);
background: var(--color-surface-subtle);
}

.page-source {
display: flex;
padding-top: 1rem;
Expand Down Expand Up @@ -1338,30 +1186,6 @@ video {
border-left: 0;
}

.demo-page {
padding: 0.75rem;
}

.demo-page__intro {
align-items: flex-start;
flex-direction: column;
gap: 0.45rem;
}

.demo-page__intro > p {
font-size: 0.84rem;
}

.demo-player__toolbar {
align-items: flex-start;
flex-direction: column;
}

.demo-player__frame {
height: calc(100dvh - 15rem);
min-height: 36rem;
}

.card:nth-child(odd) {
border-right: 0;
}
Expand Down
17 changes: 0 additions & 17 deletions content/app/demo.md

This file was deleted.

9 changes: 1 addition & 8 deletions content/app/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@ changes require a connection.
<figcaption>The Today workspace in the desktop layout.</figcaption>
</figure>

<div class="demo-callout">
<span class="demo-callout__label">Disposable sample collection</span>
<strong>Try TaskNotes before connecting your own collection.</strong>
<span>Explore Today, Scratchpad, search, and saved views with sample tasks. Your changes disappear when the demo resets.</span>
<a href="/app/demo/">Open the interactive demo →</a>
</div>

## Begin here

1. [Try TaskNotes with sample tasks](/app/demo/) or [open or install TaskNotes](/app/getting-started/).
1. [Open or install TaskNotes](/app/getting-started/).
2. [Learn how mdbase supports TaskNotes](/app/mdbase/).
3. [Choose where your collection lives](/app/collections/), then follow the
[connection walkthrough](/app/connect-mdbase/) with video and written steps.
Expand Down
2 changes: 0 additions & 2 deletions navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ navigation:
route: /app/getting-started/
- title: Connect to mdbase
route: /app/connect-mdbase/
- title: Interactive demo
route: /app/demo/
- title: Choose a collection
route: /app/collections/
- title: What is mdbase?
Expand Down
Loading
Loading