From e808069b80ef9a507403b4b730c8f9054a6b9e8c Mon Sep 17 00:00:00 2001 From: Shaun Lawrie Date: Thu, 5 Sep 2024 23:18:13 +1200 Subject: [PATCH] Make website different --- CONTRIBUTING.md | 10 +- PwshSpectreConsole.Docs/astro.config.mjs | 4 +- .../src/components/TerminalPreview.astro | 98 +++++++------------ .../components/frames/terminal-preview-1.html | 11 +++ .../components/frames/terminal-preview-2.html | 11 +++ .../components/frames/terminal-preview-3.html | 11 +++ .../components/frames/terminal-preview-4.html | 11 +++ .../src/content/docs/guides/faqs.md | 5 +- .../src/content/docs/index.mdx | 9 +- .../src/powershell/UpdateDocs.ps1 | 1 + .../src/styles/homepage.css | 39 ++++++++ PwshSpectreConsole.Docs/src/tailwind.css | 17 ++++ .../private/completions/Transformers.psm1 | 2 +- 13 files changed, 157 insertions(+), 72 deletions(-) create mode 100644 PwshSpectreConsole.Docs/src/components/frames/terminal-preview-1.html create mode 100644 PwshSpectreConsole.Docs/src/components/frames/terminal-preview-2.html create mode 100644 PwshSpectreConsole.Docs/src/components/frames/terminal-preview-3.html create mode 100644 PwshSpectreConsole.Docs/src/components/frames/terminal-preview-4.html create mode 100644 PwshSpectreConsole.Docs/src/styles/homepage.css diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a0f4821..547ad4d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,15 +30,15 @@ These are guidelines not rules, you can do whatever you want to make things work These people are awesome and you should go follow them to keep tabs on all the other awesome stuff they're doing: -- [@patriksvensson](https://github.com/patriksvensson) +- **[@patriksvensson](https://github.com/patriksvensson)** The [Spectre Console](https://spectreconsole.net/) creator. Without the dotnet library this module wouldn't exist. -- [@dfinke](https://github.com/dfinke) +- **[@dfinke](https://github.com/dfinke)** Doug Finke helped fix some broken table logic in the earliest days of the module yet his biggest contribution has been to my growth as a developer. Thanks for helping me gather the courage to build in the open. -- [@trackd](https://github.com/trackd) +- **[@trackd](https://github.com/trackd)** The table whisperer. Most of the logic for translating between PowerShell objects and the format required by the Spectre Console table widgets has come from their big brain and it's melted mine. They're a crazy-talented PowerShell developer who has helped teach me a lot and their contributions are a big part of the v2 release. -- [@StartAutomating](https://github.com/StartAutomating) +- **[@StartAutomating](https://github.com/StartAutomating)** Thanks for the sponsorship, EZOut and HelpOut modules. HelpOut is used to generate the markdown that powers the [pwshspectreconsole.com](https://pwshspectreconsole.com/reference/formatting/format-spectrebarchart/) documentation site. -- [@futuremotiondev](https://github.com/futuremotiondev), [@ruckii](https://github.com/ruckii) and [@csillikd-messerli](https://github.com/csillikd-messerli) +- **[@futuremotiondev](https://github.com/futuremotiondev)**, **[@ruckii](https://github.com/ruckii)** and **[@csillikd-messerli](https://github.com/csillikd-messerli)** Thank you for the issues raised and the fixes you've pulled together making this module better. ## Contact Me diff --git a/PwshSpectreConsole.Docs/astro.config.mjs b/PwshSpectreConsole.Docs/astro.config.mjs index f725191e..cc457cbb 100644 --- a/PwshSpectreConsole.Docs/astro.config.mjs +++ b/PwshSpectreConsole.Docs/astro.config.mjs @@ -15,8 +15,10 @@ export default defineConfig({ favicon: "/favicon.png", customCss: ["./src/tailwind.css"], social: { + rss: "https://shaunlawrie.com/rss.xml", github: "https://github.com/ShaunLawrie/PwshSpectreConsole", - twitter: "https://twitter.com/Shaun_Lawrie", + "x.com": "https://twitter.com/Shaun_Lawrie", + youtube: "https://www.youtube.com/@shaunlawrie", }, components: { Head: './src/components/Head.astro', diff --git a/PwshSpectreConsole.Docs/src/components/TerminalPreview.astro b/PwshSpectreConsole.Docs/src/components/TerminalPreview.astro index ace468bc..4cce95c4 100644 --- a/PwshSpectreConsole.Docs/src/components/TerminalPreview.astro +++ b/PwshSpectreConsole.Docs/src/components/TerminalPreview.astro @@ -1,53 +1,38 @@ --- -const { speed } = Astro.props; ---- +import fs from 'fs'; +const framesDirectory = './src/components/frames/'; - +const frame1 = fs.readFileSync(`${framesDirectory}/terminal-preview-1.html`, 'utf8'); +const frame2 = fs.readFileSync(`${framesDirectory}/terminal-preview-2.html`, 'utf8'); +const frame3 = fs.readFileSync(`${framesDirectory}/terminal-preview-3.html`, 'utf8'); +const frame4 = fs.readFileSync(`${framesDirectory}/terminal-preview-4.html`, 'utf8'); -
-
-What's for dinner?
- 
-> Sushi
-  Pizza
-  Burgers
- 
-(Move up and down to reveal more choices)
-
- - +let frames = JSON.stringify([ + frame1, + frame2, + frame3, + frame4 +]); - +const { speed } = Astro.props; +--- -