Skip to content

Build your personal knowledge base with Trilium Notes

3.9 KB
Raw Blame
@font-face {
    font-family: "Inter";
    src: url(./assets/fonts/Inter/Inter-VariableFont_opsz,wght.woff2) format("woff2");
}

:root {
    --background-color: #fff;
    --foreground-color: black;
    --muted-color: #606060;
    --card-background-color: white;
    --card-box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
    --header-background-color: rgba(255, 255, 255, 0.75);
    --brand-1: #e47b19;
    --brand-2: #4fa52b;
    --brand-3: #e33f3b;
    --brand-foreground-color: white;
    --header-height: 80px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground-color: #fff;
        --background-color: #0a0e14;
        --muted-color: #c5c5c5;
        --header-background-color: rgba(0, 0, 0, 0.75);
        --card-background-color: #ffffff12;
        --card-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
    }
}

html,
body {
    margin: 0;
    line-height: 1.5;
    font-family: Inter,
        system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Noto Sans", "Noto Sans CJK SC",
        "Hiragino Sans", "Hiragino Kaku Gothic ProN",
        "Microsoft YaHei", "Meiryo", "Malgun Gothic",
        "PingFang SC", "Source Han Sans SC",
        "Source Han Sans JP", "Source Han Sans KR";
    min-height: 100vh;
}

main {
    min-height: calc(100vh - 80px - 136px);
    display: flex;
    flex-direction: column;
}

body {
    background: var(--background-color);
    color: var(--foreground-color);
}

a {
    color: var(--brand-3);
    text-decoration: none;

    &:not(.button):hover {
    text-decoration: underline;
    }
}

.content-wrapper {
    max-width: 1200px;
    width: 90%;
    margin: auto;
    box-sizing: border-box;
}

section {
    padding: 1em 0;
    justify-content: center;
    align-items: stretch;

    &.fill {
        flex-grow: 1;
        display: flex;
    }

    h2 {
        text-align: center;
        font-weight: 300;
        margin-top: 0;
        margin-bottom: 1em;
    }
}

img {
    width: 100%;
    height: auto;
}

.card {
    border: 0;
    box-shadow: var(--card-box-shadow);
    background-color: var(--card-background-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    h3 {
        font-size: 1.1rem;
        font-weight: 300;
        margin: 0;
        color: var(--brand-1);
        margin-bottom: 0.5em;

        &> span {
            vertical-align: middle;
        }
    }

    &> .image {
        height: 200px;
        object-fit: cover;
    }

    .card-content {
        margin: 0;
        padding: 1em;
        color: var(--muted-color);
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
}

/* Heading-level doc link: the heading itself is the link, with an arrow
   affordance instead of a repeated "Learn more..." text link. Used by linked
   cards and the tabbed showcase. */
.card-heading-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    color: inherit;
    text-decoration: none;

    .card-arrow {
        transition: transform 0.15s ease;
    }

    &:hover .card-arrow,
    &:focus-visible .card-arrow {
        transform: translateX(4px);
    }
}

.bx {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;

    svg {
        fill: currentColor;
    }
}

@media (max-width: 719.99px) {
    .grid-4-cols > *,
    .grid-3-cols > *,
    .grid-2-cols > * {
        margin-bottom: 1em;
    }

    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 720px) {
    section {
        padding: 3em 0;

        h2 {
            margin-bottom: 2em;
        }
    }

    .grid-4-cols {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 1em;
    }

    .grid-3-cols {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1em;
    }

    .grid-2-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1em;
    }

    .mobile-only {
        display: none !important;
    }
}