Skip to content

Commit 2a9897c

Browse files
committed
Refactor DocumentationVersionHint component and update styles
- Simplified the DocumentationVersionHint component by removing KolAlert and restructuring the JSX. - Updated the styles for version hint to improve visibility and user experience. - Modified HomepageFeatures to dynamically link to documentation based on VERSION_ID. - Created a new index page for the homepage with structured layout and buttons for navigation. - Removed unused DocItem and DocVersionBadge components to clean up the codebase. - Integrated DocumentationVersionHint into the Navbar for consistent version display. - Updated TypeScript configuration to include additional types for better type checking.
1 parent e191f93 commit 2a9897c

File tree

21 files changed

+1395
-1614
lines changed

21 files changed

+1395
-1614
lines changed

.github/actions/pnpm-setup/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
name: pnpm Setup
66
description: Install Node and pnpm, install dependencies
77
runs:
8-
using: "composite"
8+
using: 'composite'
99
steps:
1010
- uses: pnpm/action-setup@v4
1111
with:
12-
version: 9
12+
version: 10
1313
run_install: false
1414

1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: '20'
17+
node-version: '22'
1818
cache: 'pnpm'
1919

2020
- run: pnpm install

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: ./.github/actions/pnpm-setup
1717

1818
- name: Lint
19-
run: pnpm run lint:hard
19+
run: pnpm run lint
2020

2121
- name: Build
2222
run: pnpm run build

.github/workflows/dod-checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
types: [opened, edited, synchronize]
55

66
concurrency:
7-
group: pr-{{ github.event.pull_request.number }}
7+
group: 'pr-${{ github.event.pull_request.number }}'
88
cancel-in-progress: true
99

1010
jobs:
1111
check-dod:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- name: Print Pull Request ID
1515
run: |

.github/workflows/draft-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
shell: bash
2222
run: |
2323
mkdir -p dist/docs
24-
mv build dist/docs/2.2/
24+
mv build dist/v2/
2525
2626
- name: Netlify Deploy
2727
uses: netlify/actions/cli@master
@@ -47,6 +47,6 @@ jobs:
4747
issue-number: ${{ github.event.pull_request.number }}
4848
body: |
4949
Netlify Draft Deployment
50-
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}/docs/2.2
50+
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}/v2
5151
Logs: ${{ steps.netlify.outputs.NETLIFY_LOGS_URL }}
5252
edit-mode: replace

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Bump version
3737
shell: bash
38-
run: pnpm version patch --no-git-tag-version
38+
run: pnpm version prerelease --no-git-tag-version
3939

4040
- name: Commit and push changes
4141
uses: stefanzweifel/git-auto-commit-action@v5

.kolibri.config.json

Lines changed: 0 additions & 138 deletions
This file was deleted.

.npmrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"useTabs": true
5+
}

docusaurus.config.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
const { themes } = require('prism-react-renderer');
55

6-
const PUBLIC_BASE_URL = 'https://public-ui.github.io/';
6+
const PUBLIC_BASE_URL = 'https://public-ui.github.io';
77

88
/** @type {import('@docusaurus/types').Config} */
99
const config = {
1010
title: 'KoliBri - Public UI',
1111
tagline: 'The accessible Web Component Library',
12-
url: 'https://public-ui.github.io',
13-
baseUrl: '/docs/2.2/',
12+
url: PUBLIC_BASE_URL,
13+
baseUrl: '/v2/',
1414
onBrokenLinks: 'throw',
1515
trailingSlash: false,
1616
onBrokenMarkdownLinks: 'warn',
@@ -33,9 +33,9 @@ const config = {
3333
[
3434
'classic',
3535
/** @type {import('@docusaurus/preset-classic').Options} */
36-
({
36+
{
3737
docs: {
38-
routeBasePath: '/',
38+
routeBasePath: '/docs',
3939
sidebarCollapsible: true,
4040
sidebarPath: require.resolve('./sidebars.js'),
4141
// Remove this to remove the "edit this page" links.
@@ -49,7 +49,6 @@ const config = {
4949
// },
5050
},
5151
blog: false,
52-
pages: false,
5352
sitemap: {
5453
changefreq: 'daily',
5554
priority: 0.5,
@@ -59,13 +58,13 @@ const config = {
5958
theme: {
6059
customCss: require.resolve('./src/css/custom.css'),
6160
},
62-
}),
61+
},
6362
],
6463
],
6564

6665
themeConfig:
6766
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
68-
({
67+
{
6968
navbar: {
7069
title: 'KoliBri',
7170
logo: {
@@ -78,24 +77,28 @@ const config = {
7877
position: 'left',
7978
dropdownActiveClassDisabled: true,
8079
dropdownItemsAfter: [
80+
{
81+
type: 'html',
82+
className: 'dropdown-archived-versions',
83+
value: '<strong class="dropdown__link">Version 2</strong>',
84+
},
8185
{
8286
type: 'html',
8387
value: '<hr class="dropdown-separator">',
8488
},
8589
{
8690
type: 'html',
8791
className: 'dropdown-archived-versions',
88-
value: '<b>Archive</b>',
92+
value: '<span class="dropdown__link">Version 1</span>',
8993
},
90-
{ to: `${PUBLIC_BASE_URL}docs/2.2/`, label: '2.2' },
9194
],
9295
},
9396
{
9497
label: 'Dokumentation',
95-
to: '/',
98+
to: '/docs',
9699
position: 'left',
97100
},
98-
{ to: `${PUBLIC_BASE_URL}blog`, label: 'Blog', position: 'left' },
101+
{ to: `${PUBLIC_BASE_URL}/blog`, label: 'Blog', position: 'left' },
99102
{ type: 'search', position: 'right' },
100103
// {
101104
// href: 'https://public-ui.github.io/designer',
@@ -120,15 +123,15 @@ const config = {
120123
items: [
121124
{
122125
label: 'Dokumentation',
123-
to: '/',
126+
to: '/docs',
124127
},
125128
{
126129
label: 'Blog',
127-
to: `${PUBLIC_BASE_URL}blog`,
130+
to: `${PUBLIC_BASE_URL}/blog`,
128131
},
129132
{
130133
label: 'Impressum',
131-
to: `${PUBLIC_BASE_URL}docs/impressum`,
134+
to: `${PUBLIC_BASE_URL}/docs/impressum`,
132135
},
133136
],
134137
},
@@ -180,7 +183,7 @@ const config = {
180183
dark: 'forest',
181184
},
182185
},
183-
}),
186+
},
184187
markdown: {
185188
mermaid: true,
186189
},

0 commit comments

Comments
 (0)