Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 02da220

Browse files
committed
Merge branch 'main' into next
2 parents cafb8c4 + 9b26aff commit 02da220

File tree

13 files changed

+144
-111
lines changed

13 files changed

+144
-111
lines changed

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "4.0.1"
3+
"version": "4.1.0"
44
}

packages/app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@staticcms/app",
3-
"version": "4.0.1",
3+
"version": "4.1.0",
44
"license": "MIT",
55
"description": "Static CMS application.",
66
"repository": "https://github.com/StaticJsCMS/static-cms",
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@babel/eslint-parser": "7.23.3",
4141
"@babel/runtime": "7.23.7",
42-
"@staticcms/core": "^4.0.1",
42+
"@staticcms/core": "^4.1.0",
4343
"buffer": "6.0.3",
4444
"react": "18.2.0",
4545
"react-dom": "18.2.0",

packages/core/dev-test/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
backend:
22
name: test-repo
3+
logo_link: '/#/page/custom-page'
34
site_url: 'https://example.com'
45
media_folder: /assets/uploads
56
media_library:

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@staticcms/core",
3-
"version": "4.0.1",
3+
"version": "4.1.0",
44
"license": "MIT",
55
"description": "Static CMS core application.",
66
"repository": "https://github.com/StaticJsCMS/static-cms",

packages/core/src/components/common/field/Hint.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
&:not(.CMS_Hint_inline) {
66
@apply px-3
7-
pt-1;
7+
py-1;
88
}
99
}
1010

packages/core/src/components/navbar/Navbar.tsx

+17-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,23 @@ const Navbar: FC<NavbarProps> = ({
7676
<div className={classes.breadcrumbs}>
7777
<div className={classes['logo-wrapper']}>
7878
{config?.logo_url ? (
79-
<div
80-
className={classNames(classes.logo, classes['custom-logo'])}
81-
style={{ backgroundImage: `url('${config.logo_url}')` }}
82-
/>
79+
config.logo_link ? (
80+
<a href={config.logo_link}>
81+
<div
82+
className={classNames(classes.logo, classes['custom-logo'])}
83+
style={{ backgroundImage: `url('${config.logo_url}')` }}
84+
/>
85+
</a>
86+
) : (
87+
<div
88+
className={classNames(classes.logo, classes['custom-logo'])}
89+
style={{ backgroundImage: `url('${config.logo_url}')` }}
90+
/>
91+
)
92+
) : config?.logo_link ? (
93+
<a href={config.logo_link}>
94+
<StaticCmsIcon className={classes.logo} />
95+
</a>
8396
) : (
8497
<StaticCmsIcon className={classes.logo} />
8598
)}

packages/core/src/constants/configSchema.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ function getConfigSchema() {
488488
display_url: { type: 'string', examples: ['https://example.com'] },
489489
base_url: { type: 'string' },
490490
logo_url: { type: 'string', examples: ['https://example.com/images/logo.svg'] },
491+
logo_link: { type: 'string', examples: ['https://example.com'] },
491492
media_folder: { type: 'string', examples: ['assets/uploads'] },
492493
public_folder: { type: 'string', examples: ['/uploads'] },
493494
media_folder_relative: { type: 'boolean' },

packages/core/src/interface.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,7 @@ export interface Config<EF extends BaseField = UnknownField> {
10471047
display_url?: string;
10481048
base_url?: string;
10491049
logo_url?: string;
1050+
logo_link?: string;
10501051
media_folder?: string;
10511052
public_folder?: string;
10521053
media_folder_relative?: boolean;

packages/core/src/locales/cs/index.ts

+102-98
Large diffs are not rendered by default.

packages/core/src/widgets/object/ObjectControl.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
}
5555

5656
&.CMS_WidgetObject_open {
57-
& .CMS_WidgetObject_expand-icon {
57+
& > .CMS_WidgetObject_expand .CMS_WidgetObject_expand-icon {
5858
@apply rotate-90
5959
transform;
6060
}
@@ -65,6 +65,7 @@
6565
@apply flex
6666
w-full
6767
justify-between
68+
items-center
6869
pl-2
6970
pr-3
7071
py-2

packages/core/src/widgets/relation/RelationControl.css

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33

44
.CMS_WidgetRelation_values {
55
@apply flex
6-
flex-wrap
76
gap-2
8-
p-2
97
pr-0
108
min-w-0;
9+
10+
.CMS_Field_wrapper & {
11+
@apply flex-wrap
12+
p-2;
13+
}
1114
}
1215

1316
.CMS_WidgetRelation_loading {

packages/docs/content/docs/configuration-options.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,19 @@ display_url: 'https://your-site.com',
203203
## Custom Logo
204204

205205
When the `logo_url` setting is specified, the Static CMS UI will change the logo displayed at the top of the login page, allowing you to brand Static CMS with your own logo. `logo_url` is assumed to be a URL to an image file.
206+
When the `logo_link` setting is specified, the Static CMS UI will wrap the logo in a link, allowing you to make the logo clickable. `logo_link` can be a URL to an external page or an address of one of Static CMS pages giving you a quick link to your favourite page.
206207

207208
**Example:**
208209

209210
<CodeTabs>
210211
```yaml
211212
logo_url: https://your-site.com/images/logo.svg
213+
logo_link: https://your-site.com
212214
```
213215

214216
```js
215217
logo_url: 'https://your-site.com/images/logo.svg',
218+
logo_link: 'https://your-site.com',
216219
```
217220

218221
</CodeTabs>

packages/docs/content/releases.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
22
"releases": [
3+
{
4+
"date": "2024-01-24T10:00:00.000Z",
5+
"version": "v4.1.0",
6+
"type": "minor",
7+
"description": "Add logo_link setting"
8+
},
39
{
410
"date": "2024-01-04T10:00:00.000Z",
511
"version": "v4.0.1",
6-
"type": "minor"
12+
"type": "patch"
713
},
814
{
915
"date": "2024-01-03T11:00:00.000Z",

0 commit comments

Comments
 (0)