Skip to content

Commit 88fa438

Browse files
committed
init
0 parents  commit 88fa438

30 files changed

+2577
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7+
# using the `master` branch as the default branch.
8+
push:
9+
branches: [main]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
concurrency:
21+
group: pages
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: "☁️ checkout repository"
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: "🔧 setup pnpm"
34+
uses: pnpm/action-setup@v3
35+
with:
36+
version: 9
37+
38+
- name: "🔧 setup node"
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 20
42+
cache: "pnpm"
43+
44+
- name: "🔧 setup pages"
45+
uses: actions/configure-pages@v4
46+
47+
- name: "📦 install dependencies"
48+
run: pnpm install
49+
50+
# Set up GitHub Actions caching for Wireit.
51+
- name: "🔌 setup wireit cache"
52+
uses: google/wireit@setup-github-actions-caching/v2
53+
54+
- name: "🧱 build docs"
55+
run: pnpm build:docs
56+
57+
- name: "🗄️ upload pages artifact"
58+
uses: actions/upload-pages-artifact@v3
59+
with:
60+
path: docs/.vitepress/dist
61+
62+
deploy:
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
needs: build
67+
runs-on: ubuntu-latest
68+
name: Deploy
69+
steps:
70+
- name: "🚀 deploy to github pages"
71+
id: deployment
72+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules
2+
.vitepress/cache
3+
.vitepress/dist
4+
/dist

.postcssrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"plugins": {
3+
"postcss-rtlcss": {
4+
"ltrPrefix": ":where([dir=\"ltr\"])",
5+
"rtlPrefix": ":where([dir=\"rtl\"])"
6+
}
7+
}
8+
}

.vitepress/config/fa.mts

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import { defineConfig, type DefaultTheme } from "vitepress";
2+
3+
export const fa = defineConfig({
4+
title: "قابلیت دسترسی",
5+
lang: "fa-IR",
6+
description: "نگاهی به اهمیت accessibility در فرآیند توسعه",
7+
dir: "rtl",
8+
markdown: {
9+
container: {
10+
tipLabel: "نکته",
11+
warningLabel: "هشدار",
12+
dangerLabel: "خطر",
13+
infoLabel: "اطلاعات",
14+
detailsLabel: "جزئیات",
15+
},
16+
},
17+
themeConfig: {
18+
sidebar: sidebar(),
19+
docFooter: {
20+
prev: "قبلی",
21+
next: "بعدی",
22+
},
23+
24+
outline: {
25+
label: "در این صفحه",
26+
},
27+
28+
lastUpdated: {
29+
text: "آخرین به‌روزرسانی‌",
30+
formatOptions: {
31+
dateStyle: "short",
32+
timeStyle: "medium",
33+
},
34+
},
35+
36+
langMenuLabel: "تغییر زبان",
37+
returnToTopLabel: "بازگشت به بالا",
38+
sidebarMenuLabel: "منوی جانبی",
39+
darkModeSwitchLabel: "تم تاریک",
40+
lightModeSwitchTitle: "رفتن به حالت روشن",
41+
darkModeSwitchTitle: "رفتن به حالت تاریک",
42+
notFound: {
43+
linkLabel: "بازگشت به خانه",
44+
linkText: "بازگشت به خانه",
45+
title: "صفحه مورد نظر یافت نشد",
46+
code: "۴۰۴",
47+
quote:
48+
"اما اگر جهت خود را تغییر ندهید و اگر ادامه دهید به دنبال چیزی که دنبال می‌کنید، ممکن است در نهایت به جایی که در حال رفتن به سمتش هستید، برسید.",
49+
},
50+
siteTitle: "قابلیت دسترسی (accessibility)",
51+
},
52+
});
53+
54+
function sidebar(): DefaultTheme.SidebarItem[] {
55+
return [
56+
{
57+
text: "مقدمه",
58+
base: "/topics/intro",
59+
items: [
60+
{
61+
text: "چه کسانی به accessibility نیاز دارند؟",
62+
link: "/who-is-a11y-for",
63+
},
64+
{ text: "چرا accessibility مهم است؟", link: "/why-is-a11y-important" },
65+
{ text: "راه‌اندازی کاربران Windows", link: "/windows-users" },
66+
// { text: "دموها: accessibility در محیط واقعی", link: "/examples" },
67+
],
68+
},
69+
{
70+
text: "MVP",
71+
base: "/topics/mvp",
72+
items: [
73+
{
74+
text: "MVPها چه ارتباطی با accessibility دارند؟",
75+
link: "/mvp-and-a11y",
76+
},
77+
{
78+
text: "بازگشت به عقب بخاطر accessibility",
79+
link: "/shift-left",
80+
},
81+
{
82+
text: "Personaهای مرتبط با accessibility",
83+
link: "/persona",
84+
},
85+
],
86+
},
87+
{
88+
text: "روابط کاربری accessible",
89+
base: "/topics/ui",
90+
items: [
91+
{
92+
text: "اصول پایه‌ای اعمال accessibility",
93+
link: "/intro",
94+
},
95+
{
96+
text: "چه چیزهایی باید حس خطر ما را فعال کنند؟",
97+
link: "/your-spidey-senses",
98+
},
99+
{
100+
text: "با div دکمه نسازید!",
101+
link: "/dont-be-a-div-button-creator",
102+
},
103+
{
104+
text: "متدهای Visibility",
105+
link: "/visibility-methods",
106+
},
107+
{
108+
text: "چگونه یک کامپوننت UI را از نظر accessibility تست کنیم",
109+
link: "/how-to-test-components",
110+
},
111+
],
112+
},
113+
];
114+
}

.vitepress/config/index.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'vitepress'
2+
import { shared } from './shared.mts'
3+
import { fa } from './fa.mts'
4+
5+
export default defineConfig({
6+
...shared,
7+
locales: {
8+
root: { label: 'فارسی', ...fa }
9+
}
10+
})

.vitepress/config/shared.mts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineConfig } from 'vitepress'
2+
export const shared = defineConfig({
3+
rewrites: {
4+
'en/:rest*': ':rest*'
5+
},
6+
lastUpdated: true,
7+
cleanUrls: true,
8+
metaChunk: true,
9+
base: '/a11y',
10+
11+
themeConfig: {
12+
socialLinks: [
13+
{ icon: 'github', link: 'https://github.com/amir78729' }
14+
],
15+
},
16+
})

.vitepress/theme/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
/* --vp-c-brand-1: rgb(236, 169, 0); */
3+
}

.vitepress/theme/fonts.css

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
@font-face {
2+
font-family: Vazirmatn;
3+
src:
4+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Thin.woff2")
5+
format("woff2"),
6+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Thin.ttf")
7+
format("truetype");
8+
font-weight: 100;
9+
font-style: normal;
10+
font-display: swap;
11+
}
12+
13+
@font-face {
14+
font-family: Vazirmatn;
15+
src:
16+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-ExtraLight.woff2")
17+
format("woff2"),
18+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-ExtraLight.ttf")
19+
format("truetype");
20+
font-weight: 200;
21+
font-style: normal;
22+
font-display: swap;
23+
}
24+
25+
@font-face {
26+
font-family: Vazirmatn;
27+
src:
28+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Light.woff2")
29+
format("woff2"),
30+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Light.ttf")
31+
format("truetype");
32+
font-weight: 300;
33+
font-style: normal;
34+
font-display: swap;
35+
}
36+
37+
@font-face {
38+
font-family: Vazirmatn;
39+
src:
40+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Regular.woff2")
41+
format("woff2"),
42+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Regular.ttf")
43+
format("truetype");
44+
font-weight: 400;
45+
font-style: normal;
46+
font-display: swap;
47+
}
48+
49+
@font-face {
50+
font-family: Vazirmatn;
51+
src:
52+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Medium.woff2")
53+
format("woff2"),
54+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Medium.ttf")
55+
format("truetype");
56+
font-weight: 500;
57+
font-style: normal;
58+
font-display: swap;
59+
}
60+
61+
@font-face {
62+
font-family: Vazirmatn;
63+
src:
64+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-SemiBold.woff2")
65+
format("woff2"),
66+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-SemiBold.ttf")
67+
format("truetype");
68+
font-weight: 600;
69+
font-style: normal;
70+
font-display: swap;
71+
}
72+
73+
@font-face {
74+
font-family: Vazirmatn;
75+
src:
76+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Bold.woff2")
77+
format("woff2"),
78+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Bold.ttf")
79+
format("truetype");
80+
font-weight: 700;
81+
font-style: normal;
82+
font-display: swap;
83+
}
84+
85+
@font-face {
86+
font-family: Vazirmatn;
87+
src:
88+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-ExtraBold.woff2")
89+
format("woff2"),
90+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-ExtraBold.ttf")
91+
format("truetype");
92+
font-weight: 800;
93+
font-style: normal;
94+
font-display: swap;
95+
}
96+
97+
@font-face {
98+
font-family: Vazirmatn;
99+
src:
100+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/webfonts/Vazirmatn-Black.woff2")
101+
format("woff2"),
102+
url("https://media-cdn.tapsi.cab/fonts/vazirmatn-typeface/web/farsi-digits/ttf/Vazirmatn-Black.ttf")
103+
format("truetype");
104+
font-weight: 900;
105+
font-style: normal;
106+
font-display: swap;
107+
}
108+
109+
:root:where(:lang(fa)) {
110+
--vp-font-family-base:
111+
'Vazirmatn', 'Inter', ui-sans-serif, system-ui, sans-serif,
112+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
113+
}
114+

.vitepress/theme/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './fonts.css'
3+
import './custom.css'
4+
5+
export default DefaultTheme

0 commit comments

Comments
 (0)