93 lines
2.8 KiB
Text
93 lines
2.8 KiB
Text
---
|
|
import { ArticleData } from "@extractus/article-extractor";
|
|
import "../styles/reset.css";
|
|
import '../styles/variables.css';
|
|
|
|
import Footer from "../components/Footer.astro";
|
|
export interface Props {
|
|
article: ArticleData | null
|
|
}
|
|
|
|
const { article } = Astro.props;
|
|
const appTitle = article?.title ? `${article.title} | Cozy` : 'Cozy';
|
|
---
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{appTitle}</title>
|
|
|
|
{
|
|
/**
|
|
* if showing a post:
|
|
* - don't allow search engines to index the page
|
|
* - add cozy metadata for the app to use
|
|
*/
|
|
article && article?.url !== '/' ? (
|
|
<meta name="robots" content="noindex">
|
|
<meta name="googlebot" content="noindex">
|
|
|
|
<meta property="cozy:title" content={article.title} />
|
|
<meta property="cozy:url" content={article.url} />
|
|
<meta property="cozy:description" content={article.description} />
|
|
<meta property="cozy:image" content={article.image} />
|
|
<meta property="cozy:source" content={article.source} />
|
|
<meta property="cozy:author" content={article.author} />
|
|
<meta property="cozy:published" content={article.published} />
|
|
) : (
|
|
<meta property="og:title" content={appTitle} />
|
|
<meta property="og:url" content={Astro.url.href} />
|
|
<meta property="og:description" content="Remove distractions. Save your favorites. Get useful insights. Cozy is your modern-day reading assistant." />
|
|
<meta name="description" content="Remove distractions. Save your favorites. Get useful insights. Cozy is your modern-day reading assistant." />
|
|
<meta itemprop="description" content="Remove distractions. Save your favorites. Get useful insights. Cozy is your modern-day reading assistant." />
|
|
)
|
|
}
|
|
<link rel="shortcut icon" type="image/svg+xml" href="/favicon.svg" />
|
|
</head>
|
|
<body>
|
|
<div id="app-wrapper">
|
|
<slot />
|
|
<div id="main-content">
|
|
<div id="post-wrapper">
|
|
<slot name="post" />
|
|
</div>
|
|
<div id="library-wrapper">
|
|
<slot name="library" />
|
|
</div>
|
|
</div>
|
|
<slot name="footer">
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
<style lang="scss">
|
|
#app-wrapper {
|
|
width: 100%;
|
|
max-width: 650px;
|
|
margin: 0 auto;
|
|
padding: 0.5rem;
|
|
padding-bottom: 2rem;
|
|
}
|
|
#main-content {
|
|
* {
|
|
margin: 1rem 0 0;
|
|
}
|
|
|
|
#post-wrapper {
|
|
padding: 0 1rem;
|
|
}
|
|
}
|
|
</style>
|
|
<style is:global lang="scss">
|
|
:root {
|
|
--system-ui: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
|
|
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
html * {
|
|
font-family: var(--system-ui);
|
|
}
|
|
</style>
|