Files
skillshare/website/src/pages/index.module.css
T
Willie 63affe976e feat(website): promote the desktop app as the primary entry point
Make the desktop app visible in the homepage, navigation, and README before CLI installation. Add localized installation guides and promotion copy across all five documentation languages, with Homebrew as the recommended macOS path.
2026-10-01 11:14:28 +08:00

1066 lines
18 KiB
CSS

/* Homepage: the string board. Hand-drawn tokens come from custom.css. */
.homePage {
--board-bg: #f6eedb;
--board-dot: #e0d4b8;
--sticker-bg: #ffffff;
--ink: var(--color-pencil);
overflow-x: hidden;
}
:global([data-theme='dark']) .homePage {
--board-bg: #26221f;
--board-dot: #3a3430;
--sticker-bg: #2e2926;
}
.hand {
font-family: 'Kalam', cursive;
}
.mark {
background: linear-gradient(transparent 58%, var(--color-postit-dark) 58%, var(--color-postit-dark) 94%, transparent 94%);
padding: 0 6px;
}
.cmd {
display: inline-block;
padding: 2px 8px;
background: var(--color-postit);
border: 1.5px solid var(--card-border);
border-radius: 0;
font-family: var(--ifm-font-family-monospace);
font-size: 0.8em;
font-weight: 600;
color: var(--color-pencil);
white-space: nowrap;
}
.h2 {
font-size: 1.9rem;
line-height: 1.15;
margin: 0 0 0.75rem;
}
.h2Big {
font-size: 2.5rem;
margin: 0;
}
.lead {
font-size: 1rem;
line-height: 1.6;
color: var(--color-pencil-light);
margin: 0 0 1.25rem;
}
.buttons {
display: flex;
gap: 0.875rem;
flex-wrap: wrap;
}
.heroActions {
margin-top: 1.25rem;
}
.heroActions a {
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.desktopPlatforms {
margin: 0.75rem 0;
color: var(--color-pencil-light);
font-size: 0.875rem;
}
.desktopCommand {
margin-bottom: 1.5rem;
}
.installCommand.desktopCommand code {
white-space: pre-wrap;
overflow-wrap: anywhere;
line-height: 1.8;
}
.cliAlternative {
margin: 1rem 0 0;
font-size: 0.875rem;
}
.onlyWide {
display: block;
}
.onlyNarrow {
display: none;
}
@media (max-width: 640px) {
.onlyWide {
display: none;
}
.onlyNarrow {
display: block;
}
.moveList {
display: flex;
}
}
/* ========================================
Hero
======================================== */
.hero {
padding: 3rem 0 3.5rem;
}
.heroHead {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 2.5rem;
margin-bottom: 1.75rem;
}
.heroTitle {
font-family: 'Kalam', cursive;
font-size: clamp(2.4rem, 5vw, 3.75rem);
line-height: 1.12;
font-weight: 700;
margin: 0 0 0.875rem;
animation: titleSlideIn 0.6s ease-out 0.2s both;
}
.heroSubtitle {
font-size: 1.15rem;
line-height: 1.6;
color: var(--color-pencil-light);
max-width: 620px;
margin: 0;
}
.heroHint {
font-size: 1.35rem;
color: var(--color-pencil-light);
text-align: right;
line-height: 1.1;
flex-shrink: 0;
padding-bottom: 6px;
}
@keyframes titleSlideIn {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: none;
}
}
/* ========================================
Boards (fixed design size, scaled to fit)
======================================== */
.scaleWrap {
width: 100%;
position: relative;
}
.board {
position: relative;
box-sizing: border-box;
transform-origin: top left;
background-color: var(--board-bg);
background-image: radial-gradient(var(--board-dot) 1.2px, transparent 1.2px);
background-size: 18px 18px;
border: 2px solid var(--card-border);
border-radius: var(--radius-wobbly);
box-shadow: var(--shadow-lg);
}
.strings {
position: absolute;
left: 0;
top: 0;
}
.str {
fill: none;
stroke: var(--color-blue);
stroke-width: 2.4;
stroke-linecap: round;
filter: drop-shadow(1px 2px 0 rgba(45, 45, 45, 0.18));
}
.strOn {
stroke-dasharray: 760;
stroke-dashoffset: 760;
animation: draw 0.9s ease-out forwards;
}
.strOff {
stroke: var(--color-muted-dark);
stroke-dasharray: 5 7;
opacity: 0.35;
}
@keyframes draw {
to {
stroke-dashoffset: 0;
}
}
.arrowCollect,
.arrowGit,
.arrowInstall {
fill: none;
stroke-width: 2.2;
stroke-linecap: round;
stroke-linejoin: round;
}
.arrowCollect {
stroke: var(--color-danger);
}
.arrowGit {
stroke: var(--color-pencil);
}
.arrowInstall {
stroke: var(--color-success);
stroke-width: 2.4;
}
.pin {
position: absolute;
width: 16px;
height: 16px;
box-sizing: border-box;
border-radius: 50%;
background: var(--color-accent);
border: 2px solid #2d2d2d;
box-shadow: 2px 3px 0 0 rgba(45, 45, 45, 0.35);
z-index: 2;
}
.pin::after {
content: '';
position: absolute;
left: 3px;
top: 2px;
width: 4px;
height: 4px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.8);
}
.pinBlue {
background: var(--color-blue);
}
.note {
position: absolute;
font-family: 'Kalam', cursive;
color: var(--color-pencil-light);
font-size: 19px;
line-height: 1.15;
}
.noteCmd {
font-family: var(--ifm-font-family-monospace);
font-size: 11px;
color: var(--color-pencil-light);
}
.tape {
position: absolute;
width: 110px;
height: 28px;
background: rgba(255, 243, 160, 0.85);
border: 1px dashed rgba(45, 45, 45, 0.35);
z-index: 3;
}
/* Tool stickers */
.tool {
position: absolute;
width: 156px;
height: 66px;
box-sizing: border-box;
padding: 12px 12px 8px 14px;
background: var(--sticker-bg);
border: 2px solid var(--card-border);
box-shadow: var(--shadow-md);
text-align: left;
cursor: pointer;
font-family: var(--ifm-font-family-base);
display: flex;
flex-direction: column;
gap: 1px;
color: var(--color-pencil);
transition: box-shadow 0.12s, opacity 0.2s, filter 0.12s;
}
.tool:hover {
box-shadow: var(--shadow-hover);
filter: brightness(0.98);
}
.tool:focus-visible {
outline: 3px solid var(--color-blue);
outline-offset: 2px;
}
.toolOff {
background: transparent;
border-style: dashed;
box-shadow: none;
opacity: 0.6;
}
.toolOff .pin {
opacity: 0.4;
}
.tool .pin {
top: -8px;
left: 70px;
}
.toolName {
font-weight: 600;
font-size: 14.5px;
line-height: 1.2;
}
.toolPath {
font-family: var(--ifm-font-family-monospace);
font-size: 10.5px;
color: var(--color-pencil-light);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sourceCaption {
position: absolute;
left: 424px;
top: 470px;
width: 320px;
text-align: center;
font-family: var(--ifm-font-family-monospace);
font-size: 11.5px;
color: var(--color-pencil-light);
white-space: nowrap;
}
.boardLink {
position: absolute;
right: 22px;
bottom: 16px;
font-family: 'Kalam', cursive;
font-size: 20px;
color: var(--color-blue);
}
.counter {
position: absolute;
left: 24px;
top: 300px;
width: 118px;
padding: 10px 12px;
background: var(--sticker-bg);
border: 2px solid var(--card-border);
box-shadow: 3px 3px 0 0 var(--card-border);
transform: rotate(-2deg);
display: flex;
flex-direction: column;
align-items: center;
}
.counterNum {
font-family: 'Kalam', cursive;
font-size: 44px;
line-height: 1;
font-weight: 700;
}
.counterLabel {
font-family: var(--ifm-font-family-monospace);
font-size: 10.5px;
color: var(--color-pencil-light);
letter-spacing: 0.06em;
text-transform: uppercase;
}
/* Source logo (same animation as before) */
.logoWrap {
position: absolute;
left: 474px;
top: 218px;
width: 220px;
height: 220px;
animation: logoEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.logoRing {
position: absolute;
inset: -18px;
border: 3px dashed var(--color-muted-dark);
border-radius: var(--radius-wobbly);
opacity: 0.6;
background: rgba(253, 251, 247, 0.7);
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
pointer-events: none;
}
:global([data-theme='dark']) .logoRing {
background: rgba(26, 24, 22, 0.7);
}
.logoShadow {
position: absolute;
inset: -18px;
border-radius: var(--radius-wobbly);
background: rgba(45, 45, 45, 0.06);
transform: translate(4px, 4px);
pointer-events: none;
transition: transform 0.3s ease;
}
.logoWrap:hover .logoRing {
inset: -24px;
opacity: 0.9;
border-color: var(--color-blue);
transform: rotate(3deg);
}
.logoWrap:hover .logoShadow {
inset: -24px;
transform: translate(3px, 3px);
}
.sparkle {
position: absolute;
font-size: 22px;
line-height: 1;
color: var(--color-muted-dark);
pointer-events: none;
opacity: 0;
animation: sparkleFadeIn 0.8s ease forwards;
}
.sparkle:nth-of-type(1) {
top: -10px;
right: -8px;
animation-delay: 0.4s;
}
.sparkle:nth-of-type(2) {
bottom: 8px;
left: -14px;
animation-delay: 0.6s;
font-size: 17px;
}
.sparkle:nth-of-type(3) {
top: 12px;
left: -10px;
animation-delay: 0.8s;
font-size: 15px;
}
.logoWrap:hover .sparkle {
animation: sparkleWiggle 0.4s ease-in-out;
opacity: 1;
}
.logoImg {
position: relative;
width: 220px;
height: 220px;
object-fit: contain;
display: block;
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
animation: logoFloat 4s ease-in-out infinite;
}
.logoWrap:hover .logoImg {
animation: none;
transform: rotate(-3deg) scale(1.06);
}
@keyframes logoEntrance {
0% {
opacity: 0;
transform: scale(0.3) rotate(-8deg);
}
100% {
opacity: 1;
transform: scale(1) rotate(0deg);
}
}
@keyframes sparkleFadeIn {
0% {
opacity: 0;
transform: scale(0) rotate(-20deg);
}
100% {
opacity: 1;
transform: scale(1) rotate(0deg);
}
}
@keyframes sparkleWiggle {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(12deg);
}
50% {
transform: rotate(-10deg);
}
75% {
transform: rotate(6deg);
}
100% {
transform: rotate(0deg);
}
}
@keyframes logoFloat {
0%,
100% {
transform: translateY(0) rotate(0deg);
}
25% {
transform: translateY(-4px) rotate(0.5deg);
}
75% {
transform: translateY(3px) rotate(-0.5deg);
}
}
/* Small screens: pin list instead of the board */
.pinList {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
}
.pinChip {
position: relative;
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.55rem 0.9rem 0.55rem 1.6rem;
background: transparent;
border: 2px dashed var(--color-muted-dark);
border-radius: var(--radius-wobbly-sm);
color: var(--color-pencil-light);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
}
.pinChip .pin {
left: 6px;
top: 50%;
margin-top: -8px;
width: 14px;
height: 14px;
opacity: 0.35;
}
.pinChipOn {
background: var(--sticker-bg);
border: 2px solid var(--card-border);
box-shadow: var(--shadow-hover);
color: var(--color-pencil);
font-weight: 600;
}
.pinChipOn .pin {
opacity: 1;
}
/* Terminal + install */
.heroBottom {
display: grid;
grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
gap: 3rem;
align-items: start;
margin-top: 2.75rem;
}
.termWrap {
position: relative;
transform: rotate(0.6deg);
}
.term {
background: var(--install-bg);
border: 2px solid #101827;
box-shadow: 6px 6px 0 0 #101827;
display: flex;
flex-direction: column;
}
:global([data-theme='dark']) .term {
border-color: var(--install-border);
box-shadow: var(--shadow-lg);
}
.termBar {
height: 36px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 14px;
border-bottom: 1px dashed #334155;
}
.termBar > span:not(.termBarText) {
width: 11px;
height: 11px;
border-radius: 50%;
border: 1px solid #2d2d2d;
}
.termBarText {
font-family: var(--ifm-font-family-monospace);
font-size: 12px;
color: #94a3b8;
margin-left: 6px;
}
.termBody {
min-width: 0;
margin: 0;
padding: 18px 22px 20px;
background: none;
border: none;
box-shadow: none;
border-radius: 0;
font-size: 13px;
line-height: 1.75;
min-height: 214px;
color: #e2e8f0;
white-space: pre-wrap;
}
.termHead {
color: #ffffff;
font-weight: 600;
}
.ok {
color: #7bd88f;
}
.dim {
color: #94a3b8;
}
.installCol {
padding-top: 6px;
}
.installCommand {
display: flex;
align-items: center;
gap: 1rem;
background: var(--install-bg);
border: 2px solid #101827;
border-radius: var(--radius-wobbly-sm);
padding: 0.75rem 0.875rem 0.75rem 1.25rem;
font-family: var(--ifm-font-family-monospace);
font-size: 0.8rem;
max-width: 100%;
box-shadow: 4px 4px 0 0 #101827;
}
:global([data-theme='dark']) .installCommand {
border-color: var(--install-border);
box-shadow: var(--shadow-md);
}
.installCommand code {
background: none;
padding: 0;
color: #e2e8f0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border: none;
box-shadow: none;
flex-grow: 1;
min-width: 0;
}
.copyButton {
flex-shrink: 0;
width: 44px;
height: 44px;
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.06);
border: 1px solid #334155;
border-radius: 8px;
color: #e2e8f0;
cursor: pointer;
transition: all 0.2s ease;
}
.copyButton:hover {
background: rgba(232, 168, 76, 0.2);
border-color: rgba(232, 168, 76, 0.5);
}
/* ========================================
Sections
======================================== */
.section {
padding: 3rem 0 3.5rem;
border-top: 2px dashed var(--card-border);
}
.sectionHead {
display: flex;
align-items: baseline;
gap: 1.25rem;
flex-wrap: wrap;
margin-bottom: 1.75rem;
}
.aside {
font-size: 1.45rem;
color: var(--color-pencil-light);
}
/* Four moves: diagram cards */
.card {
position: absolute;
box-sizing: border-box;
padding: 10px 14px;
background: var(--sticker-bg);
border: 2px solid var(--card-border);
border-radius: var(--radius-wobbly-sm);
box-shadow: 5px 5px 0 0 var(--card-border);
display: flex;
flex-direction: column;
gap: 2px;
color: var(--color-pencil);
}
:global([data-theme='dark']) .card {
box-shadow: var(--shadow-md);
}
.cardTitle {
font-weight: 600;
font-size: 14px;
}
.cardSub {
font-family: var(--ifm-font-family-monospace);
font-size: 10.5px;
color: var(--color-pencil-light);
white-space: nowrap;
}
.cardKicker {
font-family: var(--ifm-font-family-monospace);
font-size: 10.5px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--color-pencil-light);
}
.cardCode {
white-space: nowrap;
font-family: var(--ifm-font-family-monospace);
font-size: 12.5px;
font-weight: 600;
color: var(--color-pencil);
}
.cardText {
font-size: 13.5px;
line-height: 1.45;
color: var(--color-pencil-light);
}
.stamp {
position: absolute;
left: 296px;
top: 258px;
width: 96px;
height: 84px;
box-sizing: border-box;
border: 2.5px solid var(--color-success);
border-radius: 50% 48% 52% 50% / 52% 50% 50% 48%;
transform: rotate(-8deg);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--color-success);
background: rgba(255, 255, 255, 0.6);
}
:global([data-theme='dark']) .stamp {
background: rgba(26, 24, 22, 0.6);
}
.stamp span {
font-family: var(--ifm-font-family-monospace);
font-size: 9.5px;
letter-spacing: 0.1em;
font-weight: 600;
}
.moveList {
list-style: none;
padding: 0;
margin: 0;
flex-direction: column;
gap: 0.875rem;
}
.moveItem {
display: flex;
flex-direction: column;
gap: 0.35rem;
padding: 0.875rem 1rem;
background: var(--card-bg);
border: 2px solid var(--card-border);
border-radius: var(--radius-wobbly-sm);
box-shadow: var(--shadow-md);
font-size: 0.95rem;
color: var(--color-pencil-light);
}
.moveItem .cmd {
align-self: flex-start;
border-width: 2px;
}
/* Feature map teaser */
.teaser {
display: grid;
grid-template-columns: 460px minmax(0, 1fr);
gap: 2.5rem;
align-items: center;
}
.teaserText {
display: flex;
flex-direction: column;
gap: 0.6rem;
align-items: flex-start;
}
.bigNum {
font-size: clamp(7rem, 14vw, 11.5rem);
line-height: 0.9;
font-weight: 700;
letter-spacing: -0.03em;
}
.teaserTitle {
font-family: var(--ifm-heading-font-family);
font-size: 1.6rem;
font-weight: 700;
line-height: 1.2;
}
.teaserBoard {
display: block;
height: 400px;
text-decoration: none;
color: var(--color-pencil);
}
.teaserBoard:hover {
text-decoration: none;
color: var(--color-pencil);
}
.idx {
position: absolute;
width: 150px;
height: 96px;
box-sizing: border-box;
padding: 12px 14px;
background: var(--sticker-bg);
border: 2px solid var(--card-border);
border-radius: var(--radius-wobbly-sm);
box-shadow: var(--shadow-md);
display: flex;
flex-direction: column;
gap: 4px;
transition: box-shadow 0.12s;
}
.teaserBoard:hover .idx {
box-shadow: var(--shadow-hover);
}
.idxTitle {
font-family: var(--ifm-heading-font-family);
font-weight: 600;
font-size: 14px;
}
.idxCmds {
font-family: var(--ifm-font-family-monospace);
font-size: 10.5px;
color: var(--color-pencil-light);
}
.teaserNote {
right: 24px;
bottom: 18px;
color: var(--color-blue);
}
/* CTA */
.ctaSection {
padding: 0.5rem 0 3rem;
}
.cta {
position: relative;
padding: 2.75rem 3.5rem;
background: var(--color-postit);
border: 2px solid var(--card-border);
border-radius: var(--radius-wobbly);
box-shadow: var(--shadow-lg);
display: flex;
align-items: center;
justify-content: space-between;
gap: 2.5rem;
transform: rotate(-0.3deg);
}
.cta .lead {
margin-bottom: 0;
}
.ctaTitle {
font-size: 2.6rem;
font-weight: 700;
line-height: 1.05;
margin: 0 0 0.5rem;
}
/* ========================================
Responsive
======================================== */
@media (max-width: 996px) {
.heroBottom,
.teaser {
grid-template-columns: minmax(0, 1fr);
}
.teaserBoard {
height: auto;
padding: 1.25rem;
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.idx {
position: static;
transform: none !important;
width: calc(50% - 0.5rem);
height: auto;
}
.idx .pin {
display: none;
}
.teaserNote {
position: static;
width: 100%;
text-align: right;
}
.cta {
flex-direction: column;
align-items: flex-start;
padding: 2rem 1.5rem;
}
}
@media (max-width: 640px) {
.hero {
padding-top: 2rem;
}
.heroHead {
flex-direction: column;
align-items: flex-start;
gap: 0.75rem;
}
.heroHint {
text-align: left;
}
.heroBottom {
margin-top: 2rem;
}
.termWrap {
transform: none;
}
.termBody {
min-height: 0;
font-size: 12px;
}
.h2Big {
font-size: 1.9rem;
}
.ctaTitle {
font-size: 2rem;
}
}
@media (prefers-reduced-motion: reduce) {
.strOn {
animation: none;
stroke-dashoffset: 0;
}
.logoWrap,
.logoImg,
.sparkle,
.heroTitle {
animation: none;
opacity: 1;
}
.logoWrap:hover .logoImg,
.logoWrap:hover .logoRing {
transform: none;
}
}