-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds formatting checks to the CI with using "prettier" with "prettier-plugin-astro" Locally developers can run: `nix run .#format` to format the src directory` Alternatively / Additionally: Use any LSP that has `prettier` support. or run: `npm run format` `npm run format:check` Ci executes: `nix build .\#checks.x86_64-linux.format` Which fails if the formatting is not in the required format which will ensure the format stays consistent.
- Loading branch information
Showing
246 changed files
with
4,152 additions
and
3,139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Format: run on all files | ||
690acaad552afe771806443c3c8c93efe32f71a9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** @type {import("prettier").Config} */ | ||
export default { | ||
plugins: ["prettier-plugin-astro"], | ||
overrides: [ | ||
{ | ||
files: "*.astro", | ||
options: { | ||
parser: "astro", | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
--- | ||
interface Props { | ||
lines: Array<{ shellPrompt: string, code: string }>; | ||
lines: Array<{ shellPrompt: string; code: string }>; | ||
type?: "code" | "storepath"; | ||
} | ||
const { lines, type = "code" } = Astro.props; | ||
--- | ||
|
||
<pre class:list={[ | ||
"border-1 bg-[#3a3a3a] px-4 py-4 rounded-3xl my-2 mb-4 overflow-x-auto", | ||
{ "bg-[#3a3a3a] text-white": type === "code" }, | ||
{ "font-mono font-[500] bg-nix-blue-extralight border-nix-blue-extralight text-black shadow-inner": type === "storepath" } | ||
<pre | ||
class:list={[ | ||
"border-1 bg-[#3a3a3a] px-4 py-4 rounded-3xl my-2 mb-4 overflow-x-auto", | ||
{ "bg-[#3a3a3a] text-white": type === "code" }, | ||
{ | ||
"font-mono font-[500] bg-nix-blue-extralight border-nix-blue-extralight text-black shadow-inner": | ||
type === "storepath", | ||
}, | ||
]}> | ||
{lines.map((line, idx, {length}) => { | ||
if (length - 1 === idx) { | ||
return <code class="font-bold bg-transparent border-none w-full p-0">{line.shellPrompt}</code><span>{line.code}</span> | ||
} else { | ||
return <code class="font-bold bg-transparent border-none w-full p-0">{line.shellPrompt}</code><span>{line.code}</span><br> | ||
} | ||
return <code class="font-bold bg-transparent border-none w-full p-0">{line.shellPrompt}</code><span>{line.code}</span>} else { | ||
return <code class="font-bold bg-transparent border-none w-full p-0">{line.shellPrompt}</code><span>{line.code}</span><br />} | ||
})} | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
--- | ||
--- | ||
|
||
<code class="text-nix-orange-dark bg-neutral-100 py-1 px-2 border-1 rounded-lg"><slot /></code> | ||
<code class="text-nix-orange-dark bg-neutral-100 py-1 px-2 border-1 rounded-lg" | ||
><slot /></code | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
--- | ||
import InlineSVG from '../util/InlineSVG.astro'; | ||
import InlineSVG from "../util/InlineSVG.astro"; | ||
interface Props { | ||
style?: "slope" | "landing_search_bottom", | ||
mirrorX?: boolean, | ||
mirrorY?: boolean | ||
style?: "slope" | "landing_search_bottom"; | ||
mirrorX?: boolean; | ||
mirrorY?: boolean; | ||
} | ||
const styleMap = { | ||
"slope": "/src/assets/image/divider/slope_down.svg", | ||
"landing_search_bottom": "/src/assets/image/divider/landing_search_bottom.svg", | ||
} | ||
slope: "/src/assets/image/divider/slope_down.svg", | ||
landing_search_bottom: "/src/assets/image/divider/landing_search_bottom.svg", | ||
}; | ||
const heightMap = { | ||
"slope": "h-16", | ||
"landing_search_bottom": "h-16 md:h-48" | ||
} | ||
slope: "h-16", | ||
landing_search_bottom: "h-16 md:h-48", | ||
}; | ||
const { style = "slope", mirrorX = false, mirrorY = false } = Astro.props; | ||
--- | ||
|
||
<InlineSVG role="separator" src={styleMap[style]} class:list={["block left-0 right-0 h-16 w-full", | ||
heightMap[style], | ||
mirrorY ? "translate-y-[1px]" : "translate-y-[-1px]", | ||
{ | ||
"-scale-x-100": mirrorX, | ||
"-scale-y-100": mirrorY | ||
}]} aria-hidden="true" /> | ||
<InlineSVG | ||
role="separator" | ||
src={styleMap[style]} | ||
class:list={[ | ||
"block left-0 right-0 h-16 w-full", | ||
heightMap[style], | ||
mirrorY ? "translate-y-[1px]" : "translate-y-[-1px]", | ||
{ | ||
"-scale-x-100": mirrorX, | ||
"-scale-y-100": mirrorY, | ||
}, | ||
]} | ||
aria-hidden="true" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
--- | ||
const { | ||
class: extraClasses, | ||
href: externalLink, | ||
src: imageSource, | ||
alt: altText | ||
} = Astro.props; | ||
class: extraClasses, | ||
href: externalLink, | ||
src: imageSource, | ||
alt: altText, | ||
} = Astro.props; | ||
--- | ||
<div class=`flex min-h-24 xl:min-h-20 flex-col justify-center bg-white p-4 rounded-lg ${extraClasses}`> | ||
|
||
<div | ||
class=`flex min-h-24 xl:min-h-20 flex-col justify-center bg-white p-4 rounded-lg ${extraClasses}` | ||
> | ||
<a href={externalLink}> | ||
<img class="h-full w-full" src={imageSource} alt={altText}> | ||
<img class="h-full w-full" src={imageSource} alt={altText} /> | ||
</a> | ||
</div> |
Oops, something went wrong.