Skip to content

Commit

Permalink
Show docs nav on landing & why; fix coloUrs ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed Nov 14, 2023
1 parent b2c3709 commit 5aa8c43
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
5 changes: 5 additions & 0 deletions app/api/index.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import navDataLoader from '../docs/nav-data.mjs'

/** @type {import('@enhance/types').EnhanceApiFn} */
export async function get({ query }) {
const { thanks } = query
Expand All @@ -7,12 +9,15 @@ export async function get({ query }) {
? 'max-age=86400'
: 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0'

const navData = navDataLoader('docs', '/index')

return {
headers: {
'cache-control': cacheControl,
},
json: {
thanks,
navData,
},
}
}
11 changes: 11 additions & 0 deletions app/api/why-enhance.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import navDataLoader from '../docs/nav-data.mjs'

export async function get() {
const navData = navDataLoader('docs', '/why-enhance')

return {
json: {
navData,
},
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function MarketingNav({ html }) {
export default function ProductNav({ html }) {
return html`
<masthead-slice>
<h2 class="semibold">
Expand All @@ -14,6 +14,7 @@ export default function MarketingNav({ html }) {
<h2 class="semibold">
<a href="/docs">Docs</a>
</h2>
<docs-nav></docs-nav>
</masthead-slice>
`
}
19 changes: 1 addition & 18 deletions app/pages/docs/$$.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,7 @@

<begin-masthead product="Enhance" active="products" breakpoint="56em">
<span slot="product-page">Docs</span>
<div slot="product-nav">
<masthead-slice>
<h2 class="semibold">
<a href="/">Home</a>
</h2>
</masthead-slice>
<masthead-slice>
<h2 class="semibold">
<a href="/docs">Why Enhance</a>
</h2>
</masthead-slice>
<masthead-slice>
<h2 class="semibold">
Docs
</h2>
<docs-nav></docs-nav>
</masthead-slice>
</div>
<product-nav slot="product-nav"></product-nav>
<div slot="product-nav-lg" class="flex align-items-center">
<masthead-product-link href="/">Home</masthead-product-link>
<masthead-product-link href="/docs" active>Docs</masthead-product-link>
Expand Down
2 changes: 1 addition & 1 deletion app/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

<begin-masthead product="Enhance" active="products" breakpoint="56em">
<span slot="product-page">Home</span>
<marketing-nav slot="product-nav"></marketing-nav>
<product-nav slot="product-nav"></product-nav>
<div slot="product-nav-lg" class="flex align-items-center">
<masthead-product-link active href="/">Home</masthead-product-link>
<masthead-product-link href="/docs">Docs</masthead-product-link>
Expand Down
2 changes: 1 addition & 1 deletion app/pages/why-enhance.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<begin-masthead product="Enhance" active="products" breakpoint="56em">
<span slot="product-page">Why Enhance?</span>
<marketing-nav slot="product-nav"></marketing-nav>
<product-nav slot="product-nav"></product-nav>
<div slot="product-nav-lg" class="flex align-items-center">
<masthead-product-link href="/">Home</masthead-product-link>
<masthead-product-link href="/docs">Docs</masthead-product-link>
Expand Down
6 changes: 3 additions & 3 deletions public/css/docs-colors.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Light Theme */
:root,
:root[data-force-theme='light'] {
--grey-greyer: var(--grey-100);
--grey-greyer: var(--gray-100);

--cloud-ateneo: var(--cloud);
--denim-white: var(--denim);
Expand All @@ -27,7 +27,7 @@

/* Dark Theme */
:root[data-force-theme='dark'] {
--grey-greyer: var(--grey-600);
--grey-greyer: var(--gray-600);

--cloud-ateneo: var(--ateneo);
--denim-white: var(--white);
Expand Down Expand Up @@ -55,7 +55,7 @@
/* This should be a copy of the above block */
@media (prefers-color-scheme: dark) {
:root {
--grey-greyer: var(--grey-600);
--grey-greyer: var(--gray-600);

--cloud-ateneo: var(--ateneo);
--denim-white: var(--white);
Expand Down

0 comments on commit 5aa8c43

Please sign in to comment.