Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored and astrobot-houston committed Dec 28, 2023
1 parent d25813f commit 3834c12
Show file tree
Hide file tree
Showing 22 changed files with 565 additions and 461 deletions.
1 change: 1 addition & 0 deletions examples/starlog/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Starlog

## Release notes theme for Astro

![starlog-gh](https://github.com/doodlemarks/starlog/assets/2244813/9c5c2e46-665a-437e-a971-053db4dbff63)
Expand Down
2 changes: 1 addition & 1 deletion examples/starlog/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({
site: "https://example.com",
site: 'https://example.com',
});
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"sass": "^1.69.5",
"sharp": "^0.32.5"
}
}
}
18 changes: 8 additions & 10 deletions examples/starlog/src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ import { ViewTransitions } from 'astro:transitions';
import SEO, { type Props as SEOProps } from './SEO.astro';
import { SiteTitle, SiteDescription } from '../consts';
export type Props = Partial<SEOProps>
const {
title = SiteTitle,
name = SiteTitle,
description = SiteDescription,
...seo
} = Astro.props
export type Props = Partial<SEOProps>;
const { title = SiteTitle, name = SiteTitle, description = SiteDescription, ...seo } = Astro.props;
---

<SEO {title} {description} {name} {...seo} />

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Source+Code+Pro&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Source+Code+Pro&display=swap"
rel="stylesheet"
/>

<ViewTransitions />
12 changes: 6 additions & 6 deletions examples/starlog/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import '../styles/global.scss';
---

<footer>
<p>© 2023</p>
<div class="footer_links">
<a href="#">Discord</a>
<a href="#">X</a>
<a href="#">GitHub</a>
</div>
<p>© 2023</p>
<div class="footer_links">
<a href="#">Discord</a>
<a href="#">X</a>
<a href="#">GitHub</a>
</div>
</footer>
8 changes: 4 additions & 4 deletions examples/starlog/src/components/FormattedDate.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { HTMLAttributes } from 'astro/types';
type Props = HTMLAttributes<'time'> & {
date: Date;
}
};
const { date, ...attrs } = Astro.props;
---
Expand All @@ -19,7 +19,7 @@ const { date, ...attrs } = Astro.props;
</time>

<style>
time {
display: block;
}
time {
display: block;
}
</style>
58 changes: 44 additions & 14 deletions examples/starlog/src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,51 @@ import { SiteTitle } from '../consts';
---

<header>
<nav>
<h2 id="site_title">
<a href="/">
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="url(#a)" fill-rule="evenodd" d="M.654 3.276C0 4.56 0 6.24 0 9.6v4.8c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C4.56 24 6.24 24 9.6 24h4.8c3.36 0 5.04 0 6.324-.654a6 6 0 0 0 2.622-2.622C24 19.44 24 17.76 24 14.4V9.6c0-3.36 0-5.04-.654-6.324A6 6 0 0 0 20.724.654C19.44 0 17.76 0 14.4 0H9.6C6.24 0 4.56 0 3.276.654A6 6 0 0 0 .654 3.276Zm10.875 16.41a.5.5 0 0 0 .942 0l.628-1.754a8 8 0 0 1 4.833-4.833l1.754-.628a.5.5 0 0 0 0-.942l-1.754-.628A8 8 0 0 1 13.1 6.068l-.628-1.754a.5.5 0 0 0-.942 0l-.628 1.754A8 8 0 0 1 6.068 10.9l-1.754.628a.5.5 0 0 0 0 .942l1.754.628a8 8 0 0 1 4.833 4.833l.628 1.754Z" clip-rule="evenodd"/><path stroke="url(#b)" stroke-opacity=".5" stroke-width=".5" d="M.25 9.6c0-1.684 0-2.932.08-3.92.081-.985.24-1.69.547-2.29A5.75 5.75 0 0 1 3.39.877C3.99.57 4.695.41 5.68.33 6.668.25 7.916.25 9.6.25h4.8c1.684 0 2.932 0 3.92.08.985.081 1.69.24 2.29.547a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.08.988.081 2.236.081 3.92v4.8c0 1.684 0 2.932-.08 3.92-.081.985-.24 1.69-.547 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.08-2.236.081-3.92.081H9.6c-1.684 0-2.932 0-3.92-.08-.985-.081-1.69-.24-2.29-.547A5.75 5.75 0 0 1 .877 20.61C.57 20.01.41 19.305.33 18.32.25 17.332.25 16.084.25 14.4V9.6Zm11.044 10.17c.237.663 1.175.663 1.412 0l.628-1.753a7.75 7.75 0 0 1 4.683-4.683l1.753-.628c.663-.237.663-1.175 0-1.412l-1.753-.628a7.75 7.75 0 0 1-4.683-4.683l-.628-1.753c-.237-.663-1.175-.663-1.412 0l-.628 1.753a7.75 7.75 0 0 1-4.683 4.683l-1.753.628c-.663.237-.663 1.175 0 1.412l1.753.628a7.75 7.75 0 0 1 4.683 4.683l.628 1.753Z"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="rotate(-40.136 32.164 11.75) scale(33.3542)" gradientUnits="userSpaceOnUse"><stop offset=".639" stop-color="#9818E7"/><stop offset="1" stop-color="#DF7F4F"/></radialGradient><linearGradient id="b" x1="12" x2="12" y1="0" y2="24" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient></defs></svg>
{SiteTitle}
</a>
</h2>
<div class="links">
<a href="mailto:contactus@yourwebsite.com">Contact</a>
</div>
</nav>
<nav>
<h2 id="site_title">
<a href="/">
<svg
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
><path
fill="url(#a)"
fill-rule="evenodd"
d="M.654 3.276C0 4.56 0 6.24 0 9.6v4.8c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C4.56 24 6.24 24 9.6 24h4.8c3.36 0 5.04 0 6.324-.654a6 6 0 0 0 2.622-2.622C24 19.44 24 17.76 24 14.4V9.6c0-3.36 0-5.04-.654-6.324A6 6 0 0 0 20.724.654C19.44 0 17.76 0 14.4 0H9.6C6.24 0 4.56 0 3.276.654A6 6 0 0 0 .654 3.276Zm10.875 16.41a.5.5 0 0 0 .942 0l.628-1.754a8 8 0 0 1 4.833-4.833l1.754-.628a.5.5 0 0 0 0-.942l-1.754-.628A8 8 0 0 1 13.1 6.068l-.628-1.754a.5.5 0 0 0-.942 0l-.628 1.754A8 8 0 0 1 6.068 10.9l-1.754.628a.5.5 0 0 0 0 .942l1.754.628a8 8 0 0 1 4.833 4.833l.628 1.754Z"
clip-rule="evenodd"></path><path
stroke="url(#b)"
stroke-opacity=".5"
stroke-width=".5"
d="M.25 9.6c0-1.684 0-2.932.08-3.92.081-.985.24-1.69.547-2.29A5.75 5.75 0 0 1 3.39.877C3.99.57 4.695.41 5.68.33 6.668.25 7.916.25 9.6.25h4.8c1.684 0 2.932 0 3.92.08.985.081 1.69.24 2.29.547a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.08.988.081 2.236.081 3.92v4.8c0 1.684 0 2.932-.08 3.92-.081.985-.24 1.69-.547 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.08-2.236.081-3.92.081H9.6c-1.684 0-2.932 0-3.92-.08-.985-.081-1.69-.24-2.29-.547A5.75 5.75 0 0 1 .877 20.61C.57 20.01.41 19.305.33 18.32.25 17.332.25 16.084.25 14.4V9.6Zm11.044 10.17c.237.663 1.175.663 1.412 0l.628-1.753a7.75 7.75 0 0 1 4.683-4.683l1.753-.628c.663-.237.663-1.175 0-1.412l-1.753-.628a7.75 7.75 0 0 1-4.683-4.683l-.628-1.753c-.237-.663-1.175-.663-1.412 0l-.628 1.753a7.75 7.75 0 0 1-4.683 4.683l-1.753.628c-.663.237-.663 1.175 0 1.412l1.753.628a7.75 7.75 0 0 1 4.683 4.683l.628 1.753Z"
></path><defs
><radialGradient
id="a"
cx="0"
cy="0"
r="1"
gradientTransform="rotate(-40.136 32.164 11.75) scale(33.3542)"
gradientUnits="userSpaceOnUse"
><stop offset=".639" stop-color="#9818E7"></stop><stop offset="1" stop-color="#DF7F4F"
></stop></radialGradient
><linearGradient id="b" x1="12" x2="12" y1="0" y2="24" gradientUnits="userSpaceOnUse"
><stop stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"
></stop></linearGradient
></defs
></svg
>
{SiteTitle}
</a>
</h2>
<div class="links">
<a href="mailto:contactus@yourwebsite.com">Contact</a>
</div>
</nav>
</header>

<style>
.links a {
text-decoration: none;
}
.links a {
text-decoration: none;
}
</style>
90 changes: 45 additions & 45 deletions examples/starlog/src/components/SEO.astro
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
---
import type { ImageMetadata } from 'astro'
import type { ImageMetadata } from 'astro';
type Image = {
src: string | ImageMetadata,
alt: string
}
src: string | ImageMetadata;
alt: string;
};
type SEOMetadata = {
name: string
title: string
description: string
image?: Image | undefined
canonicalURL?: URL | string | undefined
locale?: string
}
name: string;
title: string;
description: string;
image?: Image | undefined;
canonicalURL?: URL | string | undefined;
locale?: string;
};
type OpenGraph = Partial<SEOMetadata> & {
type?: string
}
type?: string;
};
type Twitter = Partial<SEOMetadata> & {
handle?: string
card?: 'summary' | 'summary_large_image'
}
handle?: string;
card?: 'summary' | 'summary_large_image';
};
export type Props = SEOMetadata & {
og?: OpenGraph
twitter?: Twitter
}
og?: OpenGraph;
twitter?: Twitter;
};
const {
name,
title,
description,
image,
locale = 'en',
canonicalURL = new URL(Astro.url.pathname, Astro.site),
} = Astro.props
name,
title,
description,
image,
locale = 'en',
canonicalURL = new URL(Astro.url.pathname, Astro.site),
} = Astro.props;
const og = {
name,
title,
description,
canonicalURL,
image,
locale,
type: "website",
...Astro.props.og ?? {},
} satisfies OpenGraph
name,
title,
description,
canonicalURL,
image,
locale,
type: 'website',
...(Astro.props.og ?? {}),
} satisfies OpenGraph;
const twitter = {
name,
title,
description,
canonicalURL,
image,
locale,
card: "summary_large_image",
...Astro.props.twitter,
}
name,
title,
description,
canonicalURL,
image,
locale,
card: 'summary_large_image',
...Astro.props.twitter,
};
function normalizeImageUrl(image: string | ImageMetadata) {
return typeof image === 'string' ? image : image.src
return typeof image === 'string' ? image : image.src;
}
---

Expand Down
1 change: 0 additions & 1 deletion examples/starlog/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@

export const SiteTitle = 'Starlog';
export const SiteDescription = 'Welcome to my website!';

30 changes: 15 additions & 15 deletions examples/starlog/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { defineCollection, z } from "astro:content"
import { defineCollection, z } from 'astro:content';

const releases = defineCollection({
// Type-check frontmatter using a schema
schema: ({ image }) => z.object({
title: z.string(),
description: z.string(),
versionNumber: z.string(),
image: z.object({
src: image(),
alt: z.string()
}),
// Transform string to Date object
date: z.date({ coerce: true }),
})
})
// Type-check frontmatter using a schema
schema: ({ image }) =>
z.object({
title: z.string(),
description: z.string(),
versionNumber: z.string(),
image: z.object({
src: image(),
alt: z.string(),
}),
// Transform string to Date object
date: z.date({ coerce: true }),
}),
});

export const collections = { releases };

16 changes: 8 additions & 8 deletions examples/starlog/src/content/releases/1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ date: '2022-03-21'
versionNumber: '1.0'
description: 'This is the first post of my new Astro blog.'
image:
src: '../../assets/starlog-placeholder-1.jpg'
alt: 'The full Astro logo.'
src: '../../assets/starlog-placeholder-1.jpg'
alt: 'The full Astro logo.'
---

## A New World with 1.0
Expand All @@ -16,14 +16,14 @@ Hey there, Nebulous users! We're back with some exciting updates that will turbo

### 🍿 New Features & Enhancements

* __NebulaProtect Supercharged:__ Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable.
* __NebulaConnect for Teams:__ Collaboration is a breeze with integrated project management tools.
* __Speed Boost Galore:__ We've fine-tuned Nebulous for ultimate speed and responsiveness.
- **NebulaProtect Supercharged:** Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable.
- **NebulaConnect for Teams:** Collaboration is a breeze with integrated project management tools.
- **Speed Boost Galore:** We've fine-tuned Nebulous for ultimate speed and responsiveness.

### 🐞 Bug Fixes

* Kicked pesky crashes out the door for NebulaSync.
* Fixed rare data hiccups during file transfers.
* Nebulous is now even friendly with older devices.
- Kicked pesky crashes out the door for NebulaSync.
- Fixed rare data hiccups during file transfers.
- Nebulous is now even friendly with older devices.

Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level!
16 changes: 8 additions & 8 deletions examples/starlog/src/content/releases/1_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ date: '2022-04-16'
versionNumber: '1.4'
description: 'This is the first post of my new Astro blog.'
image:
src: '../../assets/starlog-placeholder-14.jpg'
alt: 'The full Astro logo.'
src: '../../assets/starlog-placeholder-14.jpg'
alt: 'The full Astro logo.'
---

## Go further with 1.4
Expand All @@ -16,14 +16,14 @@ Hello, Nebulous enthusiasts! It's that time again—time for us to unveil the la

### 🍿 New Features & Enhancements

* __NebulaSync Quantum:__ Prepare for a mind-blowing file syncing experience. It's faster, smarter, and more intuitive than ever before.
* __NebulaAI Odyssey:__ Welcome to the era of NebulaAI Odyssey—a journey into the boundless possibilities of artificial intelligence. From image manipulation to language translation, Odyssey empowers you like never before.
- **NebulaSync Quantum:** Prepare for a mind-blowing file syncing experience. It's faster, smarter, and more intuitive than ever before.
- **NebulaAI Odyssey:** Welcome to the era of NebulaAI Odyssey—a journey into the boundless possibilities of artificial intelligence. From image manipulation to language translation, Odyssey empowers you like never before.

### 🐞 Bug Fixes

* Squashed even more bugs, making NebulaSync and other features more reliable than ever.
* Streamlined data transfer processes for flawless file exchanges.
* Extended support for older devices to ensure everyone enjoys Nebulous.
* Elevating error handling to the next level, ensuring a hiccup-free experience.
- Squashed even more bugs, making NebulaSync and other features more reliable than ever.
- Streamlined data transfer processes for flawless file exchanges.
- Extended support for older devices to ensure everyone enjoys Nebulous.
- Elevating error handling to the next level, ensuring a hiccup-free experience.

Thank you for being a part of the Nebulous journey. Your feedback fuels our innovation, so don't hesitate to share your thoughts or report any hiccups with our dedicated support team. Together, we're shaping the future of tech with Nebulous!
16 changes: 8 additions & 8 deletions examples/starlog/src/content/releases/1_8.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ date: '2022-06-01'
versionNumber: '1.8'
description: 'This is the first post of my new Astro blog.'
image:
src: '../../assets/starlog-placeholder-18.jpg'
alt: 'The full Astro logo.'
src: '../../assets/starlog-placeholder-18.jpg'
alt: 'The full Astro logo.'
---

## Faster, Stronger, Betterer
Expand All @@ -16,14 +16,14 @@ Hey there, Nebulous users! We're back with some exciting updates that will turbo

### New Features & Enhancements

* __NebulaProtect Supercharged:__ Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable.
* __NebulaConnect for Teams:__ Collaboration is a breeze with integrated project management tools.
* __Speed Boost Galore:__ We've fine-tuned Nebulous for ultimate speed and responsiveness.
- **NebulaProtect Supercharged:** Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable.
- **NebulaConnect for Teams:** Collaboration is a breeze with integrated project management tools.
- **Speed Boost Galore:** We've fine-tuned Nebulous for ultimate speed and responsiveness.

### 🐞 Bug Fixes

* Kicked pesky crashes out the door for NebulaSync.
* Fixed rare data hiccups during file transfers.
* Nebulous is now even friendly with older devices.
- Kicked pesky crashes out the door for NebulaSync.
- Fixed rare data hiccups during file transfers.
- Nebulous is now even friendly with older devices.

Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level!

0 comments on commit 3834c12

Please sign in to comment.