Skip to content

Commit d919d37

Browse files
authored
Update README.md
1 parent 8084ea8 commit d919d37

File tree

1 file changed

+50
-223
lines changed

1 file changed

+50
-223
lines changed

README.md

Lines changed: 50 additions & 223 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Accessible Astro Dashboard
22

3-
This Dashboard theme is build upon the (awesome) [Astro Static Site Builder](https://astro.build/). To help you build your project *faster*, this theme includes some dedicated accessible components (such as a keyboard accessible and responsive navigation) and several components coming from the [Accessible Astro Components](https://github.com/markteekman/accessible-astro-components) npm package. This theme also includes example pages, admin pages, a custom 404 page and many **Design System** utility classes, patterns and primatives (such as grids, buttons, lists, spacings, sizes and more).
3+
[![Built with Astro](https://astro.badg.es/v2/built-with-astro/small.svg)](https://astro.build)
44

5-
[Live demo](https://accessible-astro-dashboard.netlify.app)
5+
![accessible-astro-dashboard](https://github.com/user-attachments/assets/1c0eaf50-148d-4986-8211-a835a65eb2e3)
66

7-
## Getting started
8-
Run the following commands in your project folder to get started:
9-
```console
10-
npm install && npm start
11-
```
7+
A modern, accessibility-focused dashboard template built with [Astro](https://astro.build/). Designed with WCAG guidelines in mind, this theme provides a comprehensive admin interface with built-in accessibility features. It includes a responsive, keyboard-accessible navigation system, authentication flows, and integrates seamlessly with [Accessible Astro Components](https://github.com/incluud/accessible-astro-components). Complete with example pages, authentication flows, and a custom 404 page, this template offers everything you need to kickstart your accessible admin dashboard.
8+
9+
[![LIVE DEMO](https://img.shields.io/badge/LIVE_DEMO-4ECCA3?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro-dashboard.netlify.app//)  
10+
[![DOCUMENTATION](https://img.shields.io/badge/DOCUMENTATION-A682FF?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro.incluud.dev/themes/accessible-astro-dashboard)  
11+
[![Follow on X](https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/incluud)  
12+
[![Follow on BlueSky](https://img.shields.io/badge/BlueSky-0285FF?style=for-the-badge&logo=bluesky&logoColor=white)](https://bsky.app/profile/incluud.dev)  
13+
[![Sponsor on Open Collective](https://img.shields.io/badge/Open%20Collective-7FADF2?style=for-the-badge&logo=opencollective&logoColor=white)](https://opencollective.com/incluud)  
14+
[![Sponsor on GitHub](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=EA4AAA)](https://github.com/sponsors/incluud)
15+
16+
## Our mission
17+
18+
> Provide developers with accessible, easy-to-use components that make building inclusive web applications simpler and faster, without compromising on customization or performance.
1219
1320
## (Accessibility) features
1421

@@ -35,239 +42,59 @@ npm install && npm start
3542
- [Accessible Astro Components](https://github.com/markteekman/accessible-astro-components) package comes preinstalled with extra components such as Accordions, Modals and Notifications
3643
- Nate Moore's awesome [Astro Icon](https://github.com/natemoo-re/astro-icon) package is also preinstalled which can be applied to different use cases
3744

38-
**Provided by the Accessible Astro Components package*
39-
40-
## Login & Authentication
41-
42-
This starter contains a basic example of authentication and redirecting based on a users logged in status. However, this is done using SSG, which is not ideal, but serves the purpose of this demo. For better authentication and redirecting you should use [Astro's (experimental) SSR](https://docs.astro.build/en/guides/server-side-rendering/).
43-
44-
### Enabling SSR
45-
46-
For the purpose of the demo I have not enabled SSR, simply due to the fact how I've setup the demo websites of all [accessible-astro.dev](https://accessible-astro.dev) subdomains. However, I might add it in the future. It is the preferred way to handle your login and redirect cases.
47-
48-
### LoginForm.astro
49-
50-
This theme contains an example login flow, using a fake email address and password and by utilizing the `localStorage`. All pages redirect to `/login.astro` if you haven't logged in. After logging in the value `isLoggedIn` is set to `true` and your authenticated to view the admin pages. When building this using SSR you should use `cookies` instead of the `localStorage`.
51-
52-
⚠️ **Note: this is just an example, make sure you build your own secure authentication. Checkout this [official Astro Blog post](https://astro.build/blog/experimental-server-side-rendering/) for more information about authentication and login.**
53-
54-
```js
55-
<script>
56-
// fetch your data from an API
57-
// and replace that with an actual user object for example
58-
59-
submitButton.addEventListener('click', event => {
60-
event.preventDefault()
61-
62-
if (emailInput.value === 'admin@astro.build' && passwordInput.value === 'Astronaut570') {
63-
localStorage.setItem('isLoggedIn', 'true')
64-
window.location.href = '/'
65-
}
66-
})
67-
</script>
68-
```
69-
70-
### DefaultLayout.astro
71-
72-
```js
73-
---
74-
import { getUser } from '../api/index.js'
75-
76-
const user = await getUser(Astro.request)
77-
78-
if (!user) {
79-
return Astro.redirect('/login')
80-
}
81-
---
82-
```
83-
84-
## Utilities
85-
86-
This theme contains some extra **Design System** like utility classes to aid in the global layout of your project. All of this can be found in the `public/scss/base` directory, and compiles in the `globals.scss` file. Using these primitives is totally optional, use or remove at your own preference :) What it contains:
87-
88-
- Reset file to reset browser defaults and ensure everything looks good
89-
- Some basic font settings, such as responsive heading sizes
90-
- Color shades for your color pallet, rendered to the `:root` of your website as custom properties
91-
- Simple auto-grid setting using `display: grid` and a `data-attribute`
92-
- A bit more advanced grid settings using `display` grid to easily setup a 12-column layout
93-
- Utilities set in `_utility.scss` for things such as spacing, sizes, colors, and box-shadows
94-
95-
### 12 Column Grid
96-
97-
12 Column Grid enables you to build custom column based layouts. Using `display: grid;` you can define the amount of columns that elements should take up in your `.grid`, and for which breakpoint they should do so. You can also use offset on a grid to create an extra column of offset. The grid offers different utilities for the individual grid items such `equal-height`, `x-start`, `x-center`, `x-end`, `y-start`, `y-center` and `y-end`. Grid comes with default gutters, to disable them you can use the utility class `no-gutters`.
98-
99-
```html
100-
<div class="container">
101-
<div class="grid">
102-
<div class="small-12 medium-3">
103-
<h3>Sidebar</h3>
104-
<!-- ... -->
105-
</div>
106-
<div class="small-12 medium-8 offset-medium-4">
107-
<h3>Main</h3>
108-
<!-- ... -->
109-
</div>
110-
</div>
111-
</div>
112-
```
113-
114-
### Alignment
115-
116-
Alignment classes can be used to align elements in your HTML. There's `align-center`, `align-horizontal` and `align-vertical`.
117-
118-
```html
119-
<div class="align-center w-screen h-screen">
120-
<h1>Center me on the screen!</h1>
121-
</div>
122-
```
45+
## Getting started
12346

124-
### Animations
47+
Clone this theme locally and run any of the following commands in your terminal:
12548

126-
There are a couple of basic animations which you can throw on your HTML elements like `blink`, `fade-in`, `pop-up` and `spin`. You can also use some animation delays to create different effects.
49+
| Command | Action |
50+
| :---------------- | :------------------------------------------- |
51+
| `npm install` | Installs dependencies |
52+
| `npm run dev` | Starts local dev server at `localhost:4321` |
53+
| `npm run build` | Build your production site to `./dist/` |
54+
| `npm run preview` | Preview your build locally, before deploying |
12755

128-
```html
129-
<div data-animation="fade-in">
130-
<p>I've got a fancy fade-in animation that starts right away.</p>
131-
</div>
132-
<div data-animation="fade-in" data-animation-delay="0.25s">
133-
<p>I've got a fancy fade-in animation after 0.25s.</p>
134-
</div>
135-
<div data-animation="fade-in" data-animation-delay="0.5s">>
136-
<p>I've got a fancy fade-in animation after 0.5s.</p>
137-
</div>
138-
```
56+
## Accessible Astro projects
13957

140-
### Auto Grid
58+
- [Accessible Astro Starter](https://github.com/incluud/accessible-astro-starter): Fully accessible starter for kickstarting Astro projects, with Tailwind.
59+
- [Accessible Astro Components](https://github.com/incluud/accessible-astro-components/): Library of reusable, accessible components build for Astro.
60+
- [Accessible Astro Dashboard](https://github.com/incluud/accessible-astro-dashboard/): User-friendly dashboard interface with a login screen and widgets.
61+
- [Accessible Astro Docs](https://github.com/incluud/accessible-astro-docs): Comprehensive documentation for all Accessible Astro projects.
14162

142-
Simply apply the `data-auto-grid` attribute on your parent `div` with a number from 2-6 (if you need more columns just tweak the for loop in `_auto-grid.scss`). The grid automatically creates new rows (this is how `display: grid` works by default).
63+
Check out our [roadmap](https://github.com/orgs/incluud/projects/4/views/1) to see what's coming next!
14364

144-
```html
145-
<div class="container" data-auto-grid="3">
146-
<p>First column</p>
147-
<p>Second column</p>
148-
<p>Third column</p>
149-
</div>
150-
```
65+
## Contributing
15166

152-
You can also center the contents of the cell using the `data-grid-center` attribute. Use it together with `data-auto-grid`.
67+
We welcome contributions to improve the documentation! You can help by:
15368

154-
```html
155-
<div class="container" data-auto-grid="3" data-grid-center>
156-
<!-- ... -->
157-
</div>
158-
```
69+
1. [Filing an issue](https://github.com/incluud/accessible-astro-dashboard/issues)
70+
2. [Submitting a pull request](https://github.com/incluud/accessible-astro-dashboard/pulls)
71+
3. [Starting a discussion](https://github.com/incluud/accessible-astro-dashboard/discussions)
72+
4. [Supporting on Open Collective](https://opencollective.com/incluud)
15973

160-
### Borders
74+
## Support this project
16175

162-
With two border radius utility classes (`radius-small` and `radius-large`) you can change the border radius of your HTML elements on the fly.
76+
Your support helps us cover basic costs and continue building accessible solutions for the Astro ecosystem. By becoming a sponsor, you're not just supporting code – you're helping create a more inclusive web for everyone. Every contribution, big or small, helps maintain and improve these accessibility-focused tools.
16377

164-
```html
165-
<div class="bg-neutral-900 space-32 radius-large">
166-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
167-
</div>
168-
```
78+
[![Sponsor on Open Collective](https://img.shields.io/badge/Open%20Collective-7FADF2?style=for-the-badge&logo=opencollective&logoColor=white)](https://opencollective.com/incluud)
16979

170-
### Buttons
80+
## Together we make a difference
17181

172-
A Button primitive to easily apply button styles to your `<button>` and `<a>` tags. Simply apply the class `button` to your element. There are different variations in colors (`color-secondary`, `color-info`, `color-success`, `color-warning`, `color-error`) which is primary by default, sizing (`size-tiny`, `size-large`, `size-huge`) which is medium by default and behavior (`behavior-full`) which stretches the button to 100% width.
82+
We want to express our heartfelt gratitude to everyone who contributes to making the web more accessible:
17383

174-
```html
175-
<a href="/" class="button color-success size-huge behavior-full">
176-
Click me to go to space!
84+
<a href="https://github.com/incluud/accessible-astro-starter/graphs/contributors">
85+
<img src="https://contrib.rocks/image?repo=incluud/accessible-astro-dashboard" />
17786
</a>
178-
```
179-
180-
### Colors
181-
182-
You can setup your own color schemes in the `_colors.scss` file. You'll find a SCSS map, which gets printed inside `_root.scss` as custom properties. There are also several color utilities such as `text-primary-#` and `bg-neutral-#` based on all colors you've defined. `text-primary-#` should be used on a parent element to give the child's the respective color.
183-
184-
```scss
185-
$colors: (
186-
primary: (
187-
100: hsl(262, 90%, 95%),
188-
200: hsl(262, 100%, 88%),
189-
300: hsl(262, 100%, 78%),
190-
400: hsl(268, 82%, 60%),
191-
500: hsl(273, 79%, 48%),
192-
),
193-
// ...
194-
);
195-
```
196-
197-
```html
198-
<div class="text-neutral-100 bg-neutral-900 space-32">
199-
<p>Dark background with white text on it!</p>
200-
</div>
201-
```
202-
203-
### Elevations
204-
205-
Use elevations on your HTML elements to add a box shadow of different intensities. Use either `elevation-100`, `elevation-200`, `elevation-300`, `elevation-400` or `elevation-500`.
206-
207-
```html
208-
<div class="space-32 radius-large elevation-400">
209-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
210-
</div>
211-
```
212-
213-
### Height / Width
214-
215-
You can set the height and width of your elements to either 100 view port units or percentages using `h-screen`, `h-full`, `w-screen` and `w-full` respectfully.
216-
217-
```html
218-
<div class="h-screen w-screen align-center">
219-
<p>I'm centered in the middle of the screen!</p>
220-
</div>
221-
```
222-
223-
### Margins, Paddings and Spaces
224-
225-
To prevent spacing each element in your website individually and to prevent inconsistencies, you can use the `.margin-#` and `.padding-#` utility classes. A good practice is to set in on your `<section>` elements, for starters. To space out content you can use a special `.space-content` class on your parent div (for example an element of your `.grid`). By default, margin/padding top and bottom are set with these utilities. You can also set it explicitly using either `.top` of `.bottom` class tokens. Find or tweak all spacing options in `_space.scss`. `space-#` tokens however add padding all around an element, which is great of you need to make card like blocks on the fly by combining `space` with the other utilities.
226-
227-
```html
228-
<section class="padding-32">
229-
<div class="container">
230-
<h2 class="margin-16 bottom">Grid example</h2>
231-
</div>
232-
</section>
233-
```
234-
235-
```html
236-
<div class="box space-32 bg-primary-200 radius-small elevation-100">
237-
<div class="space-content">
238-
<h3>I look like a card!</h3>
239-
<p>And space-content adds space between us for readability.</p>
240-
</div>
241-
</div>
242-
```
243-
244-
### Sizes
245-
246-
If you need an exception on your font-size for a specific reason you can use size utility classes to accomplish that. Using it is easy. Find or tweak all spacing options in `_size.scss`.
247-
248-
```html
249-
<div class="container">
250-
<p class="size-20">I'm a bigger font size!</p>
251-
</div>
252-
```
253-
254-
## Other Accessible Astro projects
255-
256-
- [Accessible Astro Starter](https://github.com/markteekman/accessible-astro-starter/)
257-
- [Accessible Astro Components](https://github.com/markteekman/accessible-astro-components/)
258-
- [Accessible Astro Documentation](https://accessible-astro.dev)
259-
260-
## Helping out
26187

262-
If you find that something isn't working right then I'm always happy to hear it to improve this starter! You can contribute in many ways and forms. Let me know by either:
88+
- **The Astro team** for creating an amazing static site generator and the wonderful Starlight theme
89+
- **Our contributors** who dedicate their time and expertise to improve these tools
90+
- **Our sponsors** who help make this project sustainable
91+
- **The web community** for embracing and promoting web accessibility
92+
- **You, the developer** for choosing to make your projects more accessible
26393

264-
1. [Filing an issue](https://github.com/markteekman/accessible-astro-dashboard/issues)
265-
2. [Submitting a pull request](https://github.com/markteekman/accessible-astro-dashboard/pulls)
266-
3. [Starting a discussion](https://github.com/markteekman/accessible-astro-dashboard/discussions)
267-
4. [Buying me a coffee!](https://www.buymeacoffee.com/markteekman)
94+
Together, we're not just building documentation or components – we're creating a more inclusive and accessible web for everyone. Every contribution, whether it's code, documentation, bug reports, or feedback, helps move us closer to this goal. ✨
26895

269-
## Thank you!
96+
Remember: Accessibility is not a feature, it's a fundamental right. Thank you for being part of this journey!
27097

271-
A big thank you to the creators of the awesome Astro static site generator and to all using this starter to make the web a bit more accessible for all people around the world :)
98+
## The story behind Accessible Astro
27299

273-
[![buymeacoffee-button](https://user-images.githubusercontent.com/3909046/150683481-be070424-7bb0-4dd7-a3cb-43b5605163f5.png)](https://www.buymeacoffee.com/markteekman)
100+
Accessible Astro started as a personal project by [Mark Teekman](https://github.com/markteekman) in 2021 when Astro was in its early stages, born from a passion for web accessibility and the Astro framework. What began as a single starter template grew into a family of accessible solutions, leading to the creation of [Incluud](https://github.com/incluud), an initiative with [Peter Padberg](https://github.com/peterpadberg) to make the web more inclusive. Today, these projects continue to grow and evolve with the help of our amazing community, staying true to their original purpose: making web accessibility easier for developers and better for everyone.

0 commit comments

Comments
 (0)