aboutsummaryrefslogtreecommitdiff
path: root/examples/blog-multiple-authors/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blog-multiple-authors/src/components')
-rw-r--r--examples/blog-multiple-authors/src/components/MainHead.astro17
-rw-r--r--examples/blog-multiple-authors/src/components/Pagination.astro6
-rw-r--r--examples/blog-multiple-authors/src/components/PostPreview.astro2
3 files changed, 14 insertions, 11 deletions
diff --git a/examples/blog-multiple-authors/src/components/MainHead.astro b/examples/blog-multiple-authors/src/components/MainHead.astro
index ca129df8d..be3584519 100644
--- a/examples/blog-multiple-authors/src/components/MainHead.astro
+++ b/examples/blog-multiple-authors/src/components/MainHead.astro
@@ -1,5 +1,5 @@
---
-import '../styles/global.css';
+import "../styles/global.css";
export interface Props {
title: string;
@@ -19,7 +19,10 @@ const { title, description, image, type, next, prev, canonicalURL } = Astro.prop
<title>{title}</title>
<meta name="description" content={description} />
<link rel="preconnect" href="https://fonts.gstatic.com" />
-<link href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" />
+<link
+ href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap"
+ rel="stylesheet"
+/>
<!-- Sitemap -->
<link rel="sitemap" href="/sitemap.xml" />
<!-- RSS -->
@@ -30,17 +33,17 @@ const { title, description, image, type, next, prev, canonicalURL } = Astro.prop
<!-- SEO -->
<link rel="canonical" href={canonicalURL} />
-{next && <link rel="next" aria-label="Previous Page" href={new URL(next, canonicalURL).href}>}
-{prev && <link rel="prev" aria-label="Next Page" href={new URL(prev, canonicalURL).href}>}
+{next && <link rel="next" aria-label="Previous Page" href={new URL(next, canonicalURL).href} />}
+{prev && <link rel="prev" aria-label="Next Page" href={new URL(prev, canonicalURL).href} />}
<!-- OpenGraph -->
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
-{image && (<meta property="og:image" content={new URL(image, canonicalURL)}>)}
+{image && <meta property="og:image" content={new URL(image, canonicalURL)} />}
<!-- Twitter -->
-<meta name="twitter:card" content={image ? 'summary_large_image' : 'summary'} />
+<meta name="twitter:card" content={image ? "summary_large_image" : "summary"} />
<meta name="twitter:site" content="@astro" />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
-{image && (<meta name="twitter:image" content={image}>)}
+{image && <meta name="twitter:image" content={image} />}
diff --git a/examples/blog-multiple-authors/src/components/Pagination.astro b/examples/blog-multiple-authors/src/components/Pagination.astro
index 8cc3941f6..f31f00776 100644
--- a/examples/blog-multiple-authors/src/components/Pagination.astro
+++ b/examples/blog-multiple-authors/src/components/Pagination.astro
@@ -9,8 +9,8 @@ const { prevUrl, nextUrl } = Astro.props;
<div class="wrapper">
<nav class="nav">
- <a class="prev" href={prevUrl || '#'} aria-label="Previous Page">Prev</a>
- <a class="next" href={nextUrl || '#'} aria-label="Next Page">Next</a>
+ <a class="prev" href={prevUrl || "#"} aria-label="Previous Page">Prev</a>
+ <a class="next" href={nextUrl || "#"} aria-label="Next Page">Next</a>
</nav>
</div>
@@ -29,7 +29,7 @@ const { prevUrl, nextUrl } = Astro.props;
text-transform: uppercase;
font-size: 0.8em;
- &[href='#'] {
+ &[href="#"] {
display: none;
}
}
diff --git a/examples/blog-multiple-authors/src/components/PostPreview.astro b/examples/blog-multiple-authors/src/components/PostPreview.astro
index 5a9808348..cf1579203 100644
--- a/examples/blog-multiple-authors/src/components/PostPreview.astro
+++ b/examples/blog-multiple-authors/src/components/PostPreview.astro
@@ -7,7 +7,7 @@ const { post, author } = Astro.props;
const { frontmatter } = post;
function formatDate(date) {
- return new Date(date).toUTCString().replace(/(\d\d\d\d) .*/, '$1'); // remove everything after YYYY
+ return new Date(date).toUTCString().replace(/(\d\d\d\d) .*/, "$1"); // remove everything after YYYY
}
---