generated from lukeshay/next-tailwind-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgraded versions and fixed projects page
- Loading branch information
Showing
41 changed files
with
431 additions
and
334 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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-22.04 | ||
name: ${{ matrix.cmd }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cmd: | ||
- build | ||
- prettier | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile --no-color | ||
- run: pnpm ${{ matrix.cmd }} | ||
check: | ||
runs-on: ubuntu-22.04 | ||
name: ${{ matrix.cmd }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cmd: | ||
- build | ||
- prettier | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile --no-color | ||
- run: pnpm ${{ matrix.cmd }} |
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,6 +1,44 @@ | ||
const base = require("@lshay/prettier-config"); | ||
const config = { | ||
arrowParens: "always", | ||
bracketSameLine: false, | ||
bracketSpacing: true, | ||
embeddedLanguageFormatting: "auto", | ||
endOfLine: "lf", | ||
htmlWhitespaceSensitivity: "css", | ||
insertPragma: false, | ||
jsxSingleQuote: false, | ||
overrides: [ | ||
{ | ||
files: ["**/.{yml,yaml}"], | ||
options: { | ||
tabWidth: 4, | ||
}, | ||
}, | ||
{ | ||
files: ["**/package.json"], | ||
plugins: ["prettier-plugin-packagejson"], | ||
}, | ||
{ | ||
files: ["**/*.astro"], | ||
options: { | ||
parser: "astro", | ||
}, | ||
}, | ||
], | ||
plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-astro"], | ||
printWidth: 80, | ||
proseWrap: "preserve", | ||
quoteProps: "as-needed", | ||
rangeEnd: Number.POSITIVE_INFINITY, | ||
rangeStart: 0, | ||
requirePragma: false, | ||
semi: false, | ||
singleAttributePerLine: false, | ||
singleQuote: false, | ||
tabWidth: 2, | ||
trailingComma: "all", | ||
useTabs: true, | ||
vueIndentScriptAndStyle: false, | ||
} | ||
|
||
module.exports = { | ||
...base, | ||
plugins: [...base.plugins, require.resolve("prettier-plugin-astro")], | ||
}; | ||
module.exports = config |
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 @@ | ||
nodejs 18.18.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineConfig } from "astro/config"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import netlify from "@astrojs/netlify/functions"; | ||
import { defineConfig } from "astro/config" | ||
import tailwind from "@astrojs/tailwind" | ||
import netlify from "@astrojs/netlify/functions" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind()], | ||
output: "server", | ||
adapter: netlify(), | ||
}); | ||
}) |
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,11 +1,11 @@ | ||
import jokes from "./jokes.json"; | ||
import jokes from "./jokes.json" | ||
|
||
export const handler = async () => { | ||
const randomIndex = Math.floor(Math.random() * jokes.length); | ||
const randomJoke = jokes[randomIndex]; | ||
const randomIndex = Math.floor(Math.random() * jokes.length) | ||
const randomJoke = jokes[randomIndex] | ||
|
||
return { | ||
statusCode: 200, | ||
body: randomJoke, | ||
}; | ||
}; | ||
} | ||
} |
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
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,9 @@ | ||
--- | ||
export interface Props { | ||
class?: string; | ||
class?: string | ||
} | ||
const { class: className } = Astro.props; | ||
const { class: className } = Astro.props | ||
--- | ||
|
||
<img | ||
src="/images/gravatar.webp" | ||
alt="Gravatar" | ||
class={className} | ||
/> | ||
<img src="/images/gravatar.webp" alt="Gravatar" class={className} /> |
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,35 +1,37 @@ | ||
--- | ||
export interface Props { | ||
title: string; | ||
subtitle?: string; | ||
description?: string; | ||
class?: string; | ||
title: string | ||
subtitle?: string | ||
description?: string | ||
class?: string | ||
} | ||
const { title, subtitle, description } = Astro.props; | ||
const { title, subtitle, description } = Astro.props | ||
const hasSubtitle = Astro.slots.has("subtitle") || subtitle; | ||
const hasDescription = Astro.slots.has("description") || description; | ||
const hasSubtitle = Astro.slots.has("subtitle") || subtitle | ||
const hasDescription = Astro.slots.has("description") || description | ||
--- | ||
|
||
<section title={title} class={Astro.props.class}> | ||
<h1 class="pb-2 text-5xl font-extrabold text-black dark:text-slate-100">{title}</h1> | ||
{ | ||
hasSubtitle && ( | ||
<h2 class="pb-4 text-black dark:text-slate-100"> | ||
{Astro.slots.has("subtitle") ? <slot name="subtitle" /> : subtitle} | ||
</h2> | ||
) | ||
} | ||
{ | ||
hasDescription && ( | ||
<h3 class="text-slate-700 dark:text-slate-400"> | ||
{Astro.slots.has("description") ? ( | ||
<slot name="description" /> | ||
) : ( | ||
description | ||
)} | ||
</h3> | ||
) | ||
} | ||
<h1 class="pb-2 text-5xl font-extrabold text-black dark:text-slate-100"> | ||
{title} | ||
</h1> | ||
{ | ||
hasSubtitle && ( | ||
<h2 class="pb-4 text-black dark:text-slate-100"> | ||
{Astro.slots.has("subtitle") ? <slot name="subtitle" /> : subtitle} | ||
</h2> | ||
) | ||
} | ||
{ | ||
hasDescription && ( | ||
<h3 class="text-slate-700 dark:text-slate-400"> | ||
{Astro.slots.has("description") ? ( | ||
<slot name="description" /> | ||
) : ( | ||
description | ||
)} | ||
</h3> | ||
) | ||
} | ||
</section> |
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,3 +1,3 @@ | ||
<ul> | ||
<slot /> | ||
<slot /> | ||
</ul> |
Oops, something went wrong.
9279151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: