Skip to content
Open
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
771 changes: 591 additions & 180 deletions docs-app/app/templates/index.gts

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<title>ember-primitives</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" sizes="256x256" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
Expand Down
Binary file added docs-app/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-app/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs-app/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
211 changes: 199 additions & 12 deletions packages/docs-support/src/index-page.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,208 @@
/* Home page chrome */
:root {
--home-gutter: clamp(1.25rem, 3.5vw, 2.5rem);
--home-measure: 40rem;
--home-max: 72rem;
--home-shell: 72rem;

--home-brand-1: #3451b2;
--home-brand-2: #3a5ccc;
--home-brand-3: #5672cd;
--home-brand-soft: rgba(100, 108, 255, 0.14);
--home-bg: #ffffff;
--home-bg-alt: #f6f6f7;
--home-soft: #f6f6f7;
--home-soft-hover: #ececef;
--home-border: rgba(60, 60, 67, 0.12);
--home-text-1: #3c3c43;
--home-text-2: #67676c;
--home-text-3: #929295;
}

@media (min-width: 1600px) {
:root {
--home-max: 86rem;
--home-shell: 86rem;
}
}

@media (min-width: 2000px) {
:root {
--home-max: 100rem;
--home-shell: 100rem;
--home-gutter: 3rem;
}
}

:is(html[style*="color-scheme: dark"]) {
--home-brand-1: #a8b1ff;
--home-brand-2: #5c73e7;
--home-brand-3: #3e63dd;
--home-brand-soft: rgba(100, 108, 255, 0.16);
--home-bg: #1b1b1f;
--home-bg-alt: #161618;
--home-soft: #202127;
--home-soft-hover: #27272e;
--home-border: rgba(255, 255, 255, 0.09);
--home-text-1: #dfdfd6;
--home-text-2: #98989f;
--home-text-3: #6a6a71;
}

/* Paint the document too — body is #02020e and will otherwise flash under short pages */
html:has(.index-page),
html:has(.index-page) body {
background: var(--home-bg);
}

/* Sticky home: stage fills the viewport, footer sits on the bottom edge when short */
.index-page {
box-sizing: border-box;
display: flex;
flex-direction: column;
background: var(--home-bg);
color: var(--home-text-1);
min-height: 100vh;
min-height: 100dvh;
}

.gradient-background {
background-image: linear-gradient(-45deg in oklch, #1252e3, #485de5, #7812e5, #3512c5);
background-size: 400% 400%;
animation: gradient-animation 16s ease infinite;
background-color: var(--home-bg);
background-image: radial-gradient(
ellipse min(40rem, 55vw) min(22rem, 40vh) at 50% 0%,
var(--home-brand-soft),
transparent 72%
);
background-repeat: no-repeat;
animation: none;
}

.ember-primitives__hero__wrapper.index-hero {
width: 100%;
max-width: 100%;
height: auto;
min-height: 0;
border-bottom: 1px solid var(--home-border);
}

body.dark .gradient-background {
background-image: linear-gradient(-45deg in oklch, #110043, #182d75, #280065, #350076);
.index-hero__header {
position: absolute;
inset: 0 0 auto auto;
z-index: 50;
display: flex;
align-items: center;
padding: max(0.75rem, env(safe-area-inset-top, 0px))
max(var(--home-gutter), env(safe-area-inset-right, 0px)) 0.75rem
max(var(--home-gutter), env(safe-area-inset-left, 0px));
}

@keyframes gradient-animation {
0% {
background-position: 0% 50%;
@media (min-width: 768px) {
.index-hero__header {
position: sticky;
top: 0;
inset: auto 0 auto auto;
}
50% {
background-position: 100% 50%;
}

.index-hero__body {
box-sizing: border-box;
width: min(100%, var(--home-shell));
margin-inline: auto;
display: flex;
flex-direction: column;
gap: 1.75rem;
align-items: center;
padding-block: clamp(4.5rem, 7vw, 6rem) clamp(3.5rem, 5vw, 4.75rem);
padding-inline: max(var(--home-gutter), env(safe-area-inset-left, 0px))
max(var(--home-gutter), env(safe-area-inset-right, 0px));
}

.index-hero__grid {
display: grid;
gap: 1.35rem;
width: min(100%, 42rem);
margin: 0 auto;
text-align: center;
justify-items: center;
}

.index-hero__logo {
margin: 0;
width: min(100%, 22rem);
line-height: 0;
}

@media (min-width: 768px) {
.index-hero__logo {
width: min(100%, 28rem);
}
100% {
background-position: 0% 50%;
}

@media (min-width: 1600px) {
.index-hero__logo {
width: min(100%, 32rem);
}
}

.index-hero__logo :is(svg, img) {
display: block;
width: 100%;
height: auto;
}

.index-hero__copy {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.05rem;
width: 100%;
margin: 0;
text-align: center;
}

.index-hero__text {
display: block;
margin: 0;
max-width: 22ch;
color: var(--home-text-1);
font-size: clamp(2rem, 1.65rem + 1.15vw, 3.15rem);
font-weight: 700;
line-height: 1.12;
letter-spacing: -0.035em;
}

.index-hero__lead {
display: block;
margin: 1.1rem 0 0;
max-width: 34rem;
color: var(--home-text-2);
font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
font-weight: 400;
line-height: 1.65;
letter-spacing: -0.01em;
text-wrap: pretty;
}

.index-hero__cta {
display: flex;
flex-wrap: wrap;
gap: 0.65rem;
justify-content: center;
width: min(100%, var(--home-measure));
}

.index-footer {
box-sizing: border-box;
display: block;
width: min(100%, var(--home-shell));
margin-top: auto;
margin-inline: auto;
padding-block: 0 clamp(3rem, 6vw, 4.5rem);
padding-inline: max(var(--home-gutter), env(safe-area-inset-left, 0px))
max(var(--home-gutter), env(safe-area-inset-right, 0px));
border-top: none;
}

.index-footer > * {
max-width: 100%;
}
108 changes: 24 additions & 84 deletions packages/docs-support/src/index-page.gts
Original file line number Diff line number Diff line change
Expand Up @@ -14,91 +14,31 @@ export const IndexPage: TOC<{
footer: [];
};
}> = <template>
<Hero class="index-hero gradient-background">
<header class="index-hero__header">
{{yield to="header"}}
</header>

<div class="index-hero__body">
<div
style="width: 66%; margin: 0 auto; transform: translateY(-20%);"
class="index-hero__grid"
>
<h1 style="filter: drop-shadow(3px 5px 0px rgba(0, 0, 0, 0.4));">
{{yield to="logo"}}
</h1>
<p class="index-hero__tagline">
{{yield to="tagline"}}
</p>
<div class="index-page">
<Hero class="index-hero gradient-background">
<header class="index-hero__header">
{{yield to="header"}}
</header>

<div class="index-hero__body">
<div class="index-hero__grid">
<h1 class="index-hero__logo">
{{yield to="logo"}}
</h1>
<div class="index-hero__copy">
{{yield to="tagline"}}
</div>
</div>
<div class="index-hero__cta">
{{yield to="callToAction"}}
</div>
</div>
{{yield to="callToAction"}}
</div>
</Hero>

{{yield to="content"}}

<hr />
<footer style="padding: 3rem; width: 66%;" class="index-footer">
{{yield to="footer"}}
</footer>

<style scoped>
.index-hero {
box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.05);
}

.index-hero__header {
position: absolute;
right: 0;
bottom: 0;
z-index: 50;
padding: 1rem;
display: flex;
align-items: center;
}

@media (min-width: 768px) {
.index-hero__header {
position: sticky;
top: 0;
}
}

.index-hero__body {
height: 100%;
display: flex;
flex-direction: column;
gap: 2rem;
justify-content: center;
align-items: center;
}

.index-hero__grid {
display: grid;
gap: 1rem;
}

.index-hero__tagline {
font-style: italic;
color: white;
width: 100%;
margin-left: auto;
margin-right: auto;
}
</Hero>

@media (min-width: 768px) {
.index-hero__tagline {
width: 50%;
}
}
{{yield to="content"}}

.index-footer {
margin-left: auto;
margin-right: auto;
gap: 3rem;
flex-wrap: wrap;
display: flex;
justify-content: space-between;
}
</style>
<footer class="index-footer">
{{yield to="footer"}}
</footer>
</div>
</template>;
2 changes: 1 addition & 1 deletion packages/docs-support/src/theme-toggle.gts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ThemeToggle = <template>
🎵 It's raining, it's pouring, ... 🎵
https://www.youtube.com/watch?v=ll5ykbAumD4
}}
<Moon style="fill: #38bdf8;" />
<Moon style="fill: #94a3b8;" />
<Sun style="fill: #facc15;" />
<span class="ball"></span>
</s.Label>
Expand Down