mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Support maxBookmarkGroupColumns too
This commit is contained in:
parent
708c4e64d1
commit
a3b693e2b6
@ -264,13 +264,19 @@ fullWidth: true
|
||||
|
||||
### Maximum Group Columns
|
||||
|
||||
You can set the maximum number of columns of service groups on larger screen sizes (groups with `style: columns` which is default) by adding:
|
||||
You can set the maximum number of columns of groups on larger screen sizes (note this is only for groups with the default `style: columns`, not groups with `stle: row`) by adding:
|
||||
|
||||
```yaml
|
||||
maxGroupColumns: 8 # default is 4, max 8
|
||||
maxGroupColumns: 8 # default is 4 for services, 6 for bookmarks, max 8
|
||||
```
|
||||
|
||||
By default homepage will max out at 4 columns (thus the minimum for this setting is _5_). Of course, if you're setting this to higher numbers, you may want to consider enabling the [fullWidth](#full-width) option as well.
|
||||
By default homepage will max out at 4 columns for services and 6 for bookmarks, thus the minimum for this setting is _5_. Of course, if you're setting this to higher numbers, you may want to consider enabling the [fullWidth](#full-width) option as well.
|
||||
|
||||
If you want to set the maximum columns for bookmark groups separately, you can do so by adding:
|
||||
|
||||
```yaml
|
||||
maxBookmarkGroupColumns: 6 # default is 6, max 8
|
||||
```
|
||||
|
||||
### Collapsible sections
|
||||
|
||||
|
@ -12,6 +12,7 @@ export default function BookmarksGroup({
|
||||
disableCollapse,
|
||||
groupsInitiallyCollapsed,
|
||||
bookmarksStyle,
|
||||
maxGroupColumns,
|
||||
}) {
|
||||
const panel = useRef();
|
||||
|
||||
@ -25,6 +26,9 @@ export default function BookmarksGroup({
|
||||
className={classNames(
|
||||
"bookmark-group flex-1 overflow-hidden",
|
||||
layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/4 lg:basis-1/5 xl:basis-1/6",
|
||||
layout?.style !== "row" && maxGroupColumns && parseInt(maxGroupColumns, 10) > 6
|
||||
? `3xl:basis-1/${maxGroupColumns}`
|
||||
: "",
|
||||
layout?.header === false ? "px-1" : "p-1 pb-0",
|
||||
)}
|
||||
>
|
||||
|
@ -334,6 +334,7 @@ function Home({ initialSettings }) {
|
||||
bookmarks={group}
|
||||
layout={settings.layout?.[group.name]}
|
||||
disableCollapse={settings.disableCollapse}
|
||||
maxGroupColumns={settings.maxBookmarkGroupColumns ?? settings.maxGroupColumns}
|
||||
groupsInitiallyCollapsed={settings.groupsInitiallyCollapsed}
|
||||
/>
|
||||
),
|
||||
@ -362,6 +363,7 @@ function Home({ initialSettings }) {
|
||||
bookmarks={group}
|
||||
layout={settings.layout?.[group.name]}
|
||||
disableCollapse={settings.disableCollapse}
|
||||
maxGroupColumns={settings.maxBookmarkGroupColumns ?? settings.maxGroupColumns}
|
||||
groupsInitiallyCollapsed={settings.groupsInitiallyCollapsed}
|
||||
bookmarksStyle={settings.bookmarksStyle}
|
||||
/>
|
||||
@ -378,6 +380,7 @@ function Home({ initialSettings }) {
|
||||
settings.layout,
|
||||
settings.fiveColumns,
|
||||
settings.maxGroupColumns,
|
||||
settings.maxBookmarkGroupColumns,
|
||||
settings.disableCollapse,
|
||||
settings.useEqualHeights,
|
||||
settings.cardBlur,
|
||||
|
Loading…
x
Reference in New Issue
Block a user