generated from markteekman/accessible-astro-starter
-
-
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.
- Loading branch information
0 parents
commit d0d8c39
Showing
58 changed files
with
12,225 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
es2022: true, | ||
browser: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:astro/recommended', 'plugin:astro/jsx-a11y-strict'], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
rules: {}, | ||
overrides: [ | ||
{ | ||
files: ['*.js'], | ||
rules: { | ||
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], | ||
}, | ||
}, | ||
{ | ||
files: ['*.astro'], | ||
parser: 'astro-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
extraFileExtensions: ['.astro'], | ||
}, | ||
rules: { | ||
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], | ||
}, | ||
}, | ||
{ | ||
files: ['*.ts'], | ||
parser: '@typescript-eslint/parser', | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }, | ||
], | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.astro/*.js', '*.astro/*.js'], | ||
parser: '@typescript-eslint/parser', | ||
}, | ||
], | ||
} |
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 @@ | ||
custom: https://www.buymeacoffee.com/markteekman |
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,20 @@ | ||
--- | ||
name: "prepare-release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
pre-release: | ||
name: "Prepare Release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Next Release" |
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,27 @@ | ||
# build output | ||
dist | ||
|
||
# dependencies | ||
node_modules/ | ||
.snowpack/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
# vscode settings and dictionaries | ||
.vscode | ||
|
||
# webstorm settings and dictionaries | ||
.idea | ||
|
||
# package lock | ||
package-lock.json |
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 @@ | ||
# Expose Astro dependencies for `pnpm` users | ||
shamefully-hoist = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.5.1 |
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,8 @@ | ||
{ | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], | ||
"pluginSearchDirs": false | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Mark Teekman | ||
|
||
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. |
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,65 @@ | ||
# Accessible Astro Starter | ||
|
||
![social-preview-image](https://user-images.githubusercontent.com/3909046/219942674-9894853e-def8-4180-84b8-6b577dacfcaa.png) | ||
|
||
Accessible Astro Starter is a ready to use, SEO and a11y friendly blogging theme. It contains plenty of accessible components to build several page types, Tailwind CSS to help you build faster and example pages such as a dynamic Blog, 404, Markdown and MDX. This theme is designed to help you build your project faster and provide a solid base for accessibility! | ||
|
||
🚀 [Live Preview](https://accessible-astro.netlify.app/) | ||
|
||
## ♿ (Accessibility) Features | ||
|
||
- Astro 4.0 | ||
- Tailwind CSS support | ||
- Prettier integration with `prettier-plugin-astro` and `prettier-plugin-tailwind` | ||
- ESLint integration with strict accessibility settings for `eslint-plugin-jsx-a11y` | ||
- Markdown and MDX support with examples included in the theme | ||
- Uses the awesome `astro-icon` package for the icons | ||
- Excellent Lighthouse/PageSpeed scores | ||
- Accessible landmarks such as `header`, `main`, `footer`, `section` and `nav` | ||
- Outline focus indicator which works on dark and light backgrounds | ||
- Several `aria` attributes which provide a better experience for screen reader users | ||
- `[...page].astro` and `[post].astro` demonstrate the use of dynamic routes and provide a basic blog with breadcrumbs and pagination | ||
- `404.astro` provides a custom 404 error page which you can adjust to your needs | ||
- `Header.astro` component included in the `DefaultLayout.astro` layout | ||
- `Footer.astro` component included in the `DefaultLayout.astro` layout | ||
- `SkipLinks.astro` component to skip to either the main menu or the main content | ||
- `Navigation.astro` component with keyboard accessible (dropdown) navigation (arrow keys, escape key) | ||
- `ResponsiveToggle.astro` component with an accessible responsive toggle button for the mobile navigation | ||
- `DarkMode.astro` component toggle with accessible button and a user system preferred color scheme setting | ||
- `SiteMeta.astro` SEO component for setting custom meta data on different pages | ||
- `.sr-only` utility class for screen reader only text content (hides text visually) | ||
- `prefers-reduced-motion` disables animations for users that have this preference turned on | ||
- Ships with many components such as Accordions, Breadcrumbs, Modals, Pagination [and many more](https://accessible-astro.dev/accessible-components) | ||
- A collection of utility classes such as breakpoints, button classes, font settings, resets and outlines in `src/assets/scss/base` | ||
- View Transitions (⚠️ see [astro-docs](https://docs.astro.build/en/guides/view-transitions/#accessibility) for accessibility considerations) | ||
|
||
## 🚀 Getting started | ||
|
||
Clone this theme locally and run any of the following commands in your terminal: | ||
|
||
| Command | Action | | ||
| :---------------- | :------------------------------------------- | | ||
| `npm install` | Installs dependencies | | ||
| `npm run dev` | Starts local dev server at `localhost:4321` | | ||
| `npm run build` | Build your production site to `./dist/` | | ||
| `npm run preview` | Preview your build locally, before deploying | | ||
|
||
## 📦 Other Accessible Astro projects | ||
|
||
- [Accessible Astro Dashboard](https://github.com/markteekman/accessible-astro-dashboard/) | ||
- [Accessible Astro Components](https://github.com/markteekman/accessible-astro-components/) | ||
|
||
## ❤️ Helping out | ||
|
||
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: | ||
|
||
1. [Filing an issue](https://github.com/markteekman/accessible-astro-starter/issues) | ||
2. [Submitting a pull request](https://github.com/markteekman/accessible-astro-starter/pulls) | ||
3. [Starting a discussion](https://github.com/markteekman/accessible-astro-starter/discussions) | ||
4. [Buying me a coffee!](https://www.buymeacoffee.com/markteekman) | ||
|
||
## ☕ Thank you! | ||
|
||
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 :) | ||
|
||
[![buymeacoffee-button](https://user-images.githubusercontent.com/3909046/150683481-be070424-7bb0-4dd7-a3cb-43b5605163f5.png)](https://www.buymeacoffee.com/markteekman) |
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,13 @@ | ||
import { defineConfig } from 'astro/config' | ||
import mdx from '@astrojs/mdx' | ||
import tailwind from '@astrojs/tailwind' | ||
import compress from 'astro-compress' | ||
import icon from "astro-icon" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
compressHTML: true, | ||
integrations: [mdx(), icon(), tailwind({ | ||
applyBaseStyles: false, | ||
}), compress()], | ||
}) |
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,35 @@ | ||
{ | ||
"name": "accessible-astro-starter", | ||
"description": "An Accessible Starter Theme for Astro including several accessibility features and tools to help you build faster.", | ||
"version": "3.1.2", | ||
"author": "Mark Teekman", | ||
"homepage": "https://accessible-astro.netlify.app/", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/mdx": "^2.0.2", | ||
"@astrojs/partytown": "^2.0.2", | ||
"@astrojs/tailwind": "^5.0.4", | ||
"@iconify-json/ion": "^1.1.15", | ||
"@iconify-json/mdi": "^1.1.64", | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"accessible-astro-components": "^2.3.5", | ||
"astro": "^4.0.7", | ||
"astro-compress": "^2.0.6", | ||
"astro-icon": "^1.0.2", | ||
"eslint": "^8.33.0", | ||
"eslint-plugin-astro": "^0.23.0", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"prettier": "^2.8.3", | ||
"prettier-plugin-astro": "^0.8.0", | ||
"prettier-plugin-tailwindcss": "^0.2.2", | ||
"sass": "^1.49.9", | ||
"svgo": "^3.2.0", | ||
"tailwindcss": "^3.2.7" | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,25 @@ | ||
// | ------------------------------------------------------------- | ||
// | Breakpoint | ||
// | ------------------------------------------------------------- | ||
|
||
$breakpoints: ( | ||
"default": 0, | ||
"small": 24em, | ||
"medium": 48em, | ||
"large": 75em | ||
) !default; | ||
|
||
@mixin breakpoint($breakpoint) { | ||
@if map-has-key($breakpoints, $breakpoint) { | ||
@media (min-width: map-get($breakpoints, $breakpoint)) { | ||
@content; | ||
} | ||
} @else if (type_of($breakpoint) == number) { | ||
@media (min-width: $breakpoint+"px") { | ||
@content; | ||
} | ||
} | ||
@else { | ||
@error "Not a correct value, check _base-breakpoints for available values."; | ||
} | ||
} |
Oops, something went wrong.