Skip to content

Commit

Permalink
docs: add site
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglun committed Sep 13, 2023
1 parent d94f654 commit ac1252e
Show file tree
Hide file tree
Showing 61 changed files with 5,812 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
package-lock.json
dist
17 changes: 17 additions & 0 deletions docs/.prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/** @type {import("prettier").Config} */
const config = {
plugins: [
"prettier-plugin-astro",
"prettier-plugin-tailwindcss", // MUST come last
],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};

export default config;
9 changes: 9 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2022-present Markus Hsi-Yang Fritz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 changes: 40 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Astro Landing Page

[![Built with Astro](https://astro.badg.es/v1/built-with-astro.svg)](https://astro.build)

> An Astro + Tailwind CSS example/template for landing pages.
![Screenshots of Astro Landing Page](screenshots.jpg)

## Features

- 💨 Tailwind CSS for styling
- 🎨 Themeable
- CSS variables are defined in `src/styles/theme.css` and mapped to Tailwind classes (`tailwind.config.cjs`)
- 🌙 Dark mode
- 📱 Responsive (layout, images, typography)
- ♿ Accessible (as measured by https://web.dev/measure/)
- 🔎 SEO-enabled (as measured by https://web.dev/measure/)
- 🔗 Open Graph tags for social media sharing
- 💅 [Prettier](https://prettier.io/) setup for both [Astro](https://github.com/withastro/prettier-plugin-astro) and [Tailwind](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)

## Commands

| Command | Action |
| :--------------------- | :------------------------------------------------ |
| `npm install` | Install dependencies |
| `npm run dev` | Start local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro --help` | Get help using the Astro CLI |
| `npm run format` | Format code with [Prettier](https://prettier.io/) |
| `npm run clean` | Remove `node_modules` and build output |

## Credits

- astronaut image
- source: https://github.com/withastro/astro-og-image; note: this repo is not available anymore
- moon image
- source: https://unsplash.com/@nasa
- other than that, a lot of material (showcase data, copy) was taken from official Astro sources, in particular https://astro.build/blog/introducing-astro/ and https://github.com/withastro/astro.build
19 changes: 19 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import image from "@astrojs/image";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
site: "https://astro-moon-landing.netlify.app/",
integrations: [
tailwind(),
image({
serviceEntryPoint: "@astrojs/image/sharp",
}),
],
vite: {
ssr: {
external: ["svgo"],
},
},
});
34 changes: 34 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "astro-landing-page",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"format": "prettier --write **/*.astro .",
"clean": "rimraf dist .astro node_modules"
},
"devDependencies": {
"@astrojs/image": "^0.17.3",
"@astrojs/tailwind": "^4.0.0",
"@types/micromodal": "^0.3.3",
"astro": "^2.10.12",
"astro-icon": "^0.8.1",
"prettier": "^3.0.2",
"prettier-plugin-astro": "^0.12.0",
"prettier-plugin-tailwindcss": "^0.5.3",
"rimraf": "^5.0.1",
"tailwindcss-fluid-type": "^2.0.3"
},
"dependencies": {
"@fontsource-variable/inter": "^5.0.8",
"micromodal": "^0.4.10",
"sharp": "^0.32.5",
"tailwindcss": "^3.3.3",
"tiny-invariant": "^1.3.1"
}
}
Loading

0 comments on commit ac1252e

Please sign in to comment.