Skip to content

Commit 7c65822

Browse files
committed
Basics for template
0 parents  commit 7c65822

25 files changed

+4230
-0
lines changed

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# build output
2+
dist/
3+
.output/
4+
5+
# dependencies
6+
node_modules/
7+
8+
# logs
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
pnpm-debug.log*
13+
14+
15+
# environment variables
16+
.env
17+
.env.production
18+
19+
# macOS-specific files
20+
.DS_Store

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Astro documentation template using Tailwind CSS
2+
3+
An Astro documentation site theme, built with Tailwind CSS.
4+
5+
6+
<img src="https://user-images.githubusercontent.com/988051/183708900-d2945c3b-8ff5-4aff-a3c1-98335cc90277.jpg" alt="preview of the Astro documentation theme, built with Tailwind CSS" />
7+
8+
9+
## Sponsored By [Spinal](https://spinalcms.com/)
10+
11+
<a href="https://spinalcms.com/" target="_blank">
12+
<img src="https://user-images.githubusercontent.com/988051/183079316-af747ef2-42a9-47d8-9a0c-488ed4b6a689.jpg" alt="Spinal CMS logo" width="200"/>
13+
</a>
14+
15+
16+
## Getting started
17+
18+
1. Clone this repository
19+
20+
```shell
21+
git clone https://github.com/spinalcms/astro-docs-template.git documentation
22+
```
23+
24+
2. Go into this new folder
25+
26+
```shell
27+
cd documentation
28+
```
29+
30+
3. Install dependencies
31+
32+
```shell
33+
yarn install
34+
```
35+
36+
37+
### Development
38+
39+
```shell
40+
npm run dev
41+
```
42+
43+
44+
### Production
45+
46+
```shell
47+
TBD
48+
```
49+
50+
51+
### Configuring
52+
53+
TBD
54+
55+
56+
## Related repo's
57+
- [Documentation theme built with Tailwind CSS](https://github.com/SpinalCMS/docs-template)
58+
- [Bridgetown documentation template using Tailwind CSS](https://github.com/SpinalCMS/bridgetown-docs-template)
59+
- [Eleventy documentation template using Tailwind CSS](https://github.com/SpinalCMS/11ty-docs-template)
60+
61+
62+
## Contributing
63+
64+
1. Fork it (https://github.com/spinalcms/astro-docs-template/fork)
65+
2. Clone the fork using `git clone` to your local development machine.
66+
3. Create your feature branch (`git checkout -b my-new-feature`)
67+
4. Commit your changes (`git commit -am 'Add some feature'`)
68+
5. Push to the branch (`git push origin my-new-feature`)
69+
6. Create a new Pull Request

astro.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
// https://astro.build/config
4+
import tailwind from "@astrojs/tailwind";
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
integrations: [tailwind()]
9+
});

package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@example/basics",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"private": true,
6+
"scripts": {
7+
"dev": "astro dev",
8+
"start": "astro dev",
9+
"build": "astro build",
10+
"preview": "astro preview",
11+
"astro": "astro"
12+
},
13+
"dependencies": {
14+
"@astrojs/tailwind": "^2.1.1",
15+
"astro": "^1.5.2",
16+
"tailwindcss": "^3.0.24"
17+
}
18+
}

public/favicon.svg

Lines changed: 13 additions & 0 deletions
Loading

src/components/ContentFooter.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<h3 class="mt-8 text-base font-bold tracking-tight text-slate-900">
2+
Have questions?
3+
</h3>
4+
5+
<p class="text-slate-900">
6+
Still have questions? <a href="mailto:[email protected]" class="underline hover:no-underline">Talk to support</a>.
7+
</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<dl class="flex pt-6 mt-6 border-t border-slate-200">
2+
<!-- <div class="mr-auto text-left"> -->
3+
<!-- <dt class="text-sm font-normal tracking-tight text-slate-600"> -->
4+
<!-- Previous -->
5+
<!-- </dt> -->
6+
7+
<!-- <dd class="mt-1"> -->
8+
<!-- <a href="#" class="text-base font-semibold text-slate-900 hover:underline"> -->
9+
<!-- Blah -->
10+
<!-- </a> -->
11+
<!-- </dd> -->
12+
<!-- </div> -->
13+
14+
<div class="ml-auto text-right">
15+
<dt class="text-sm font-normal tracking-tight text-slate-600">
16+
Next
17+
</dt>
18+
19+
<dd class="mt-1">
20+
<a href="#" class="text-base font-semibold text-slate-900 hover:underline">
21+
How does Spinal work?
22+
</a>
23+
</dd>
24+
</div>
25+
</dl>

src/components/Header.astro

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<header class="sticky top-0 z-50 flex items-center justify-between px-3 py-2 border-b shadow-lg bg-white/90 backdrop-blur-sm border-slate-400/40">
2+
<div class="flex items-center flex-grow basis-0">
3+
<a href="" class="text-lg font-semibold tracking-tight text-slate-900">
4+
Spinal docs
5+
</a>
6+
</div>
7+
8+
<form action="https://duckduckgo.com/" class="md:w-80 lg:w-96">
9+
<span class="relative flex items-center group">
10+
<svg aria-hidden="true" viewBox="0 0 20 20" class="absolute w-4 h-4 ml-3 fill-slate-400 group-hover:fill-slate-500 group-focus:fill-slate-500"><path d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z"></path></svg>
11+
<input type="text" name="q" placeholder="Search docs…" class="w-full py-2 pl-10 pr-2 border rounded bg-slate-100 placeholder-slate-400 text-slate-800 border-slate-100 outline outline-offset-2 outline-2 outline-transparent hover:border-slate-200 focus:border-slate-200 focus:outline-slate-600" />
12+
</span>
13+
<input type="hidden" name="sites" value="spinalcms.com">
14+
<input type="submit" value="Search" class="sr-only" />
15+
</form>
16+
17+
<div class="items-center justify-end flex-grow hidden basis-0 md:flex">
18+
<a href="https://spinalcms.com/" class="px-4 py-2 text-sm font-semibold rounded bg-slate-900 text-slate-50 transition ease-in-out delay-75 hover:scale-105 duration-200">
19+
Go to homepage
20+
</a>
21+
</div>
22+
</header>

0 commit comments

Comments
 (0)