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

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman committed Jan 24, 2024
2 parents cafb8c4 + 9b26aff commit 02da220
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 111 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "4.0.1"
"version": "4.1.0"
}
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@staticcms/app",
"version": "4.0.1",
"version": "4.1.0",
"license": "MIT",
"description": "Static CMS application.",
"repository": "https://github.com/StaticJsCMS/static-cms",
Expand Down Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@babel/eslint-parser": "7.23.3",
"@babel/runtime": "7.23.7",
"@staticcms/core": "^4.0.1",
"@staticcms/core": "^4.1.0",
"buffer": "6.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/core/dev-test/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
backend:
name: test-repo
logo_link: '/#/page/custom-page'
site_url: 'https://example.com'
media_folder: /assets/uploads
media_library:
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@staticcms/core",
"version": "4.0.1",
"version": "4.1.0",
"license": "MIT",
"description": "Static CMS core application.",
"repository": "https://github.com/StaticJsCMS/static-cms",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/common/field/Hint.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

&:not(.CMS_Hint_inline) {
@apply px-3
pt-1;
py-1;
}
}

Expand Down
21 changes: 17 additions & 4 deletions packages/core/src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,23 @@ const Navbar: FC<NavbarProps> = ({
<div className={classes.breadcrumbs}>
<div className={classes['logo-wrapper']}>
{config?.logo_url ? (
<div
className={classNames(classes.logo, classes['custom-logo'])}
style={{ backgroundImage: `url('${config.logo_url}')` }}
/>
config.logo_link ? (
<a href={config.logo_link}>
<div
className={classNames(classes.logo, classes['custom-logo'])}
style={{ backgroundImage: `url('${config.logo_url}')` }}
/>
</a>
) : (
<div
className={classNames(classes.logo, classes['custom-logo'])}
style={{ backgroundImage: `url('${config.logo_url}')` }}
/>
)
) : config?.logo_link ? (
<a href={config.logo_link}>
<StaticCmsIcon className={classes.logo} />
</a>
) : (
<StaticCmsIcon className={classes.logo} />
)}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/constants/configSchema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ function getConfigSchema() {
display_url: { type: 'string', examples: ['https://example.com'] },
base_url: { type: 'string' },
logo_url: { type: 'string', examples: ['https://example.com/images/logo.svg'] },
logo_link: { type: 'string', examples: ['https://example.com'] },
media_folder: { type: 'string', examples: ['assets/uploads'] },
public_folder: { type: 'string', examples: ['/uploads'] },
media_folder_relative: { type: 'boolean' },
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ export interface Config<EF extends BaseField = UnknownField> {
display_url?: string;
base_url?: string;
logo_url?: string;
logo_link?: string;
media_folder?: string;
public_folder?: string;
media_folder_relative?: boolean;
Expand Down
200 changes: 102 additions & 98 deletions packages/core/src/locales/cs/index.ts

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/core/src/widgets/object/ObjectControl.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}

&.CMS_WidgetObject_open {
& .CMS_WidgetObject_expand-icon {
& > .CMS_WidgetObject_expand .CMS_WidgetObject_expand-icon {
@apply rotate-90
transform;
}
Expand All @@ -65,6 +65,7 @@
@apply flex
w-full
justify-between
items-center
pl-2
pr-3
py-2
Expand Down
7 changes: 5 additions & 2 deletions packages/core/src/widgets/relation/RelationControl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

.CMS_WidgetRelation_values {
@apply flex
flex-wrap
gap-2
p-2
pr-0
min-w-0;

.CMS_Field_wrapper & {
@apply flex-wrap
p-2;
}
}

.CMS_WidgetRelation_loading {
Expand Down
3 changes: 3 additions & 0 deletions packages/docs/content/docs/configuration-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,19 @@ display_url: 'https://your-site.com',
## Custom Logo

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.
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.

**Example:**

<CodeTabs>
```yaml
logo_url: https://your-site.com/images/logo.svg
logo_link: https://your-site.com
```

```js
logo_url: 'https://your-site.com/images/logo.svg',
logo_link: 'https://your-site.com',
```

</CodeTabs>
Expand Down
8 changes: 7 additions & 1 deletion packages/docs/content/releases.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"releases": [
{
"date": "2024-01-24T10:00:00.000Z",
"version": "v4.1.0",
"type": "minor",
"description": "Add logo_link setting"
},
{
"date": "2024-01-04T10:00:00.000Z",
"version": "v4.0.1",
"type": "minor"
"type": "patch"
},
{
"date": "2024-01-03T11:00:00.000Z",
Expand Down

0 comments on commit 02da220

Please sign in to comment.