Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(enhanced-readabilities): added new options to allow users to customize their desired width of the layout #11

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/preview-docs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ jobs:
timeout-minutes: 10
working-directory: docs/
run: |
echo "NETLIFY_URL=$(netlify deploy --dir .vitepress/dist --json | jq -r .deploy_url)" >> $GITHUB_ENV
NETLIFY_JSON_OUTPUT=$(netlify deploy --dir .vitepress/dist --json)
echo $NETLIFY_JSON_OUTPUT
echo "NETLIFY_JSON_OUTPUT=$(echo $NETLIFY_JSON_OUTPUT)" >> $GITHUB_ENV
echo "NETLIFY_URL=$(echo $NETLIFY_JSON_OUTPUT | jq -r .deploy_url)" >> $GITHUB_ENV
cat $GITHUB_ENV
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,20 +357,21 @@ export interface Options {
* 'en': {
* title: {
* title: 'Reading Mode',
* titleAriaLabel: 'Reading Mode',
* },
* titleAriaLabel: 'Reading Mode',
* },
* 'zh-CN': {
* title: {
* title: '阅读模式',
* titleAriaLabel: '阅读模式',
* },
* },
* }
* }
* ```
*/
locales?: Record<string, Locale>
/**
* Layout switch configuration
*/
layoutSwitch?: {
/**
* Disable layout switch help tooltip
Expand All @@ -381,10 +382,47 @@ export interface Options {
/**
* Default mode for layout switch
*
* @default LayoutMode.FitContentWidth (3) Fit content width
* @default LayoutMode.FitContentWidth (3)
*/
defaultMode?: LayoutMode
/**
* Content layout max width slider configuration
*/
contentLayoutMaxWidth?: {
/**
* Disable content layout max width help tooltip
*
* @default false
*/
disableHelp?: boolean
/**
* Default percentage of content layout max width
*
* @default 100 (100%)
*/
defaultMaxWidth?: number
}
/**
* Page layout max width slider configuration
*/
pageLayoutMaxWidth?: {
/**
* Disable page layout max width help tooltip
*
* @default false
*/
disableHelp?: boolean
/**
* Default percentage of page layout max width
*
* @default 800 (80%)
*/
defaultMaxWidth?: number
}
}
/**
* Spotlight configuration
*/
spotlight?: {
/**
* Disable spotlight help tooltip
Expand All @@ -393,7 +431,7 @@ export interface Options {
*/
disableHelp?: boolean
/**
* Spotlight block color
* Spotlight hover block color
*
* @default 'rgb(240 197 52 / 10%)'
*/
Expand Down Expand Up @@ -504,41 +542,102 @@ export interface Locale {
*/
titleScreenNavWarningMessage?: string
/**
* Option: Expand all text
* Expand all option text
*/
optionFullWidth?: string
/**
* Option: Expand all aria-label
* Expand all option aria-label
*/
optionFullWidthAriaLabel?: string
/**
* Option: Expand all help message
* Expand all option help message
*/
optionFullWidthHelpMessage?: string
/**
* Option: Expand only sidebar text
* Sidebar adjustable only option text
*/
optionOnlySidebarFullWidth?: string
optionSidebarWidthAdjustableOnly?: string
/**
* Option: Expand only sidebar aria-label
* Sidebar adjustable only option aria-label
*/
optionOnlySidebarFullWidthAriaLabel?: string
optionSidebarWidthAdjustableOnlyAriaLabel?: string
/**
* Option: Expand only sidebar help message
* Sidebar adjustable only option help message
*/
optionOnlySidebarFullWidthHelpMessage?: string
optionSidebarWidthAdjustableOnlyHelpMessage?: string
/**
* Option: Fit content width text
* Both width adjustable option text
*/
optionFitContentWidth?: string
optionBothWidthAdjustable?: string
/**
* Both width adjustable option aria-label
*/
optionBothWidthAdjustableAriaLabel?: string
/**
* Both width adjustable option help message
*/
optionBothWidthAdjustableHelpMessage?: string
/**
* Original option
*/
optionOriginalWidth?: string
/**
* Original option aria-label
*/
optionOriginalWidthAriaLabel?: string
/**
* Original option help message
*/
optionOriginalWidthHelpMessage?: string

/**
* Option: Fit content width aria-label
* Content layout max width slider configuration
*/
optionFitContentWidthAriaLabel?: string
contentLayoutMaxWidth?: {
/**
* Title text
*/
title?: string
/**
* Title aria-label
*/
titleAriaLabel?: string
/**
* Title help message
*/
titleHelpMessage?: string
/**
* Title warning message for navigation menu in small screen
*/
titleScreenNavWarningMessage?: string
slider?: string
sliderAriaLabel?: string
sliderHelpMessage?: string
}
/**
* Option: Fit content width help message
* Page layout max width slider configuration
*/
optionFitContentWidthHelpMessage?: string
pageLayoutMaxWidth?: {
/**
* Title text
*/
title?: string
/**
* Title aria-label
*/
titleAriaLabel?: string
/**
* Title help message
*/
titleHelpMessage?: string
/**
* Title warning message for navigation menu in small screen
*/
titleScreenNavWarningMessage?: string
slider?: string
sliderAriaLabel?: string
sliderHelpMessage?: string
}
}
/**
* Spotlight configuration
Expand Down
Loading