import { ComponentChildren } from 'preact'; import Card from '../../components/Card.js'; import Section from '../../components/Section.js'; import DownloadButton from '../../components/DownloadButton.js'; import "./index.css"; import { useColorScheme, usePageTitle } from '../../hooks.js'; import Button, { Link } from '../../components/Button.js'; import gitHubIcon from "../../assets/boxicons/bx-github.svg?raw"; import dockerIcon from "../../assets/boxicons/bx-docker.svg?raw"; import noteStructureIcon from "../../assets/boxicons/bx-folder.svg?raw"; import attributesIcon from "../../assets/boxicons/bx-tag.svg?raw"; import hoistingIcon from "../../assets/boxicons/bx-chevrons-up.svg?raw"; import revisionsIcon from "../../assets/boxicons/bx-history.svg?raw"; import syncIcon from "../../assets/boxicons/bx-refresh-cw.svg?raw"; import protectedNotesIcon from "../../assets/boxicons/bx-shield.svg?raw"; import jumpToIcon from "../../assets/boxicons/bx-send-alt.svg?raw"; import searchIcon from "../../assets/boxicons/bx-search.svg?raw"; import webClipperIcon from "../../assets/boxicons/bx-paperclip.svg?raw"; import importExportIcon from "../../assets/boxicons/bx-swap-horizontal.svg?raw"; import shareIcon from "../../assets/boxicons/bx-globe.svg?raw"; import codeIcon from "../../assets/boxicons/bx-code.svg?raw"; import restApiIcon from "../../assets/boxicons/bx-extension.svg?raw"; import textNoteIcon from "../../assets/boxicons/bx-note.svg?raw"; import fileIcon from "../../assets/boxicons/bx-file.svg?raw"; import canvasIcon from "../../assets/boxicons/bx-pen.svg?raw"; import mermaidIcon from "../../assets/boxicons/bx-vector-square.svg?raw"; import mindmapIcon from "../../assets/boxicons/bx-network-chart.svg?raw"; import calendarIcon from "../../assets/boxicons/bx-calendar.svg?raw"; import tableIcon from "../../assets/boxicons/bx-table.svg?raw"; import boardIcon from "../../assets/boxicons/bx-columns-3.svg?raw"; import geomapIcon from "../../assets/boxicons/bx-map.svg?raw"; import { getPlatform } from '../../download-helper.js'; import { useEffect, useState } from 'preact/hooks'; import { Trans, useTranslation } from 'react-i18next'; export function Home() { usePageTitle(""); return ( <> ); } function HeroSection() { const { t } = useTranslation(); const platform = getPlatform(); const colorScheme = useColorScheme(); const [ screenshotUrl, setScreenshotUrl ] = useState(); useEffect(() => { switch (platform) { case "macos": setScreenshotUrl(`/screenshot_desktop_mac_${colorScheme}.webp`); break; case "linux": setScreenshotUrl(`/screenshot_desktop_linux_${colorScheme}.webp`); break; case "windows": default: setScreenshotUrl(`/screenshot_desktop_win_${colorScheme}.webp`); break; } }, [ colorScheme ]); return (

{t("hero_section.title")}

{t("hero_section.subtitle")}

{screenshotUrl && {t("hero_section.screenshot_alt")}}
) } function OrganizationBenefitsSection() { const { t } = useTranslation(); return ( <>
{t("organization_benefits.note_structure_description")} {t("organization_benefits.attributes_description")} {t("organization_benefits.hoisting_description")}
); } function ProductivityBenefitsSection() { const { t } = useTranslation(); return ( <>
{t("productivity_benefits.revisions_content")} {t("productivity_benefits.sync_content")} {t("productivity_benefits.protected_notes_content")} {t("productivity_benefits.jump_to_content")} {t("productivity_benefits.search_content")} {t("productivity_benefits.web_clipper_content")}
); } function NoteTypesSection() { const { t } = useTranslation(); return (

, , , , ]} />

); } function ExtensibilityBenefitsSection() { const { t } = useTranslation(); return ( <>
{t("extensibility_benefits.import_export_description")} {t("extensibility_benefits.share_description")} {t("extensibility_benefits.scripting_description")} {t("extensibility_benefits.api_description")}
); } function CollectionsSection() { const { t } = useTranslation(); return (
); } function ListWithScreenshot({ items, horizontal, cardExtra }: { items: { title: string, imageUrl: string, description: string, moreInfo: string, iconSvg?: string }[]; horizontal?: boolean; cardExtra?: ComponentChildren; }) { const [ selectedItem, setSelectedItem ] = useState(items[0]); const { t } = useTranslation(); return (
    {items.map(item => (
  • setSelectedItem(item)} onClick={() => setSelectedItem(item)} moreInfoUrl={item.moreInfo} iconSvg={item.iconSvg} > {item.description}
  • ))}
{selectedItem && ( <> {t("components.list_with_screenshot_alt")} )}
) } function FaqSection() { const { t } = useTranslation(); return (
{t("faq.mobile_answer")} {t("faq.database_answer")} {t("faq.server_answer")} {t("faq.scaling_answer")} {t("faq.network_share_answer")} {t("faq.security_answer")}
); } function FaqItem({ question, children }: { question: string; children: ComponentChildren }) { return ( {children} ) } function FinalCta() { const { t } = useTranslation(); return (

{t("final_cta.description")}

) }