Skip to content
Draft
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
1 change: 1 addition & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export default defineConfig({
components: {
Footer: "./src/components/Footer.astro",
Head: "./src/components/Head.astro",
PageTitle: "./src/components/PageTitle.astro",
SiteTitle: "./src/components/SiteTitle.astro",
SocialIcons: "./src/components/SocialIcons.astro",
},
Expand Down
43 changes: 0 additions & 43 deletions src/components/FeatureGrid.astro

This file was deleted.

62 changes: 0 additions & 62 deletions src/components/GettingStartedGrid.astro

This file was deleted.

13 changes: 13 additions & 0 deletions src/components/PageTitle.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
/**
* PageTitle override
*
* The homepage renders its own <h1> inside its custom Hero markup, so Starlight's default
* page title (the h1#_top normally shown above the content) is suppressed there.
*/
import Default from "@astrojs/starlight/components/PageTitle.astro";

const isHomepage = Astro.url.pathname === "/";
---

{!isHomepage && <Default {...Astro.props} />}
Binary file added src/content/docs/images/hero-placeholder.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 0 additions & 75 deletions src/content/docs/index.mdx

This file was deleted.

7 changes: 6 additions & 1 deletion src/headerNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ export interface HeaderNavItem {

// Header navigation items rendered to the left of the social icons.
// Add or reorder entries here to change the header nav.
export const headerNavItems: HeaderNavItem[] = [{ label: "Blog", href: "/blog/" }];
export const headerNavItems: HeaderNavItem[] = [
{ label: "Components", href: "/components/" },
{ label: "Device List", href: "https://devices.esphome.io/" },
{ label: "Docs", href: "/guides/getting_started_hassio/" },
{ label: "Blog", href: "/blog/" },
];
51 changes: 51 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
---

<StarlightPage
frontmatter={{
title: "ESPHome",
description: "Smart Home Made Simple.",
template: "splash",
head: [{ tag: "title", content: "ESPHome - Smart Home Made Simple" }],
}}
hasSidebar={false}
>
<div class="custom-hero">
<p>HERO</p>
</div>
</StarlightPage>

<style>
html:not([data-has-sidebar]) {
--sl-content-width: 100%;
}

:global(.content-panel) {
padding: 0;
border: none;
}

:global(footer) {
--sl-content-width: 75rem;

width: 100%;
max-width: var(--sl-content-width);
margin: 0 auto;
padding: 0 var(--sl-content-pad-x);
}

.custom-hero {
text-align: center;
padding: 4rem 1rem;
}
.cta-button {
display: inline-block;
background: var(--sl-color-accent);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
text-decoration: none;
margin-top: 1rem;
}
</style>
78 changes: 0 additions & 78 deletions src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,72 +82,6 @@ dialog::backdrop {
filter: invert(1) hue-rotate(180deg);
}

/* Feature grid styles */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.feature-card {
padding: 1.5rem;
border-radius: 8px;
background-color: var(--sl-color-gray-6);
}

.feature-icon {
width: 48px;
height: 48px;
margin-bottom: 1rem;
}

.feature-icon svg {
width: 100%;
height: 100%;
fill: currentColor;
}

.feature-text {
font-weight: 600;
font-size: 1.1rem;
margin-bottom: 0.5rem;
}

/* Getting started grid */
.getting-started-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.getting-started-heading {
font-weight: 600;
font-size: 1.2rem;
margin-bottom: 0.75rem;
}

/* Button styles */
.btn {
display: inline-block;
padding: 0.5rem 1rem;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
margin-top: 1rem;
}

.btn-primary {
background-color: var(--sl-color-accent);
color: #fff;
}

.btn-primary:hover {
background-color: var(--sl-color-accent-high);
color: #fff;
}

/* Sidebar nav item spacing */
.sidebar-content ul li summary {
padding-block: 0.5em;
Expand Down Expand Up @@ -327,18 +261,6 @@ article.preview {
background: repeating-conic-gradient(#999 0% 25%, transparent 10% 50%) 50% / 10px 10px;
}

/* Better hero image */
html[data-has-hero] .hero img {
width: auto;
max-width: 100%;
}

@media (min-width: 800px) {
html[data-has-hero] .hero {
grid-template-columns: 5fr 4fr;
}
}

/* ---------- 404 page ---------- */

.error-404 {
Expand Down