u
This commit is contained in:
@@ -37,7 +37,7 @@ import artikelAutomat, { getArticle } from '../../../automats/artikelAutomat';
|
|||||||
import { notifyError } from '../../../utils/notify';
|
import { notifyError } from '../../../utils/notify';
|
||||||
import articleIndexAutomat from '../../../automats/articleIndexAutomat';
|
import articleIndexAutomat from '../../../automats/articleIndexAutomat';
|
||||||
import {
|
import {
|
||||||
MAGENTA_PANEL,
|
GREEN_PANEL,
|
||||||
SHADOW_CARD,
|
SHADOW_CARD,
|
||||||
WHITE,
|
WHITE,
|
||||||
alpha,
|
alpha,
|
||||||
@@ -1516,7 +1516,7 @@ export default class ArticleViewLists extends PureComponent {
|
|||||||
const parentArticle = parentSku ? getArticle(parentSku) : null;
|
const parentArticle = parentSku ? getArticle(parentSku) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PanelTile wide={1} minHeight={200} color={MAGENTA_PANEL}>
|
<PanelTile wide={1} minHeight={200} color={GREEN_PANEL}>
|
||||||
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 1 }}>
|
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 1 }}>
|
||||||
{/* ── Mode 1: Parent Article ──────────────────────────────────────── */}
|
{/* ── Mode 1: Parent Article ──────────────────────────────────────── */}
|
||||||
{isParent ? (
|
{isParent ? (
|
||||||
|
|||||||
@@ -18,6 +18,68 @@ function PanelValue({ label, children }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function PanelHtmlValue({ label, html }) {
|
||||||
|
if (html == null || html === '') return null;
|
||||||
|
return (
|
||||||
|
<Box sx={{ mb: 1.5 }}>
|
||||||
|
{label ? (
|
||||||
|
<Typography
|
||||||
|
variant="caption"
|
||||||
|
color="text.secondary"
|
||||||
|
display="block"
|
||||||
|
sx={{ mb: 0.5, fontWeight: 500 }}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</Typography>
|
||||||
|
) : null}
|
||||||
|
<Box
|
||||||
|
sx={(theme) => ({
|
||||||
|
p: 1.5,
|
||||||
|
borderRadius: 1.5,
|
||||||
|
bgcolor:
|
||||||
|
theme.palette.mode === 'dark'
|
||||||
|
? 'rgba(255, 255, 255, 0.08)'
|
||||||
|
: 'rgba(255, 255, 255, 0.85)',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor:
|
||||||
|
theme.palette.mode === 'dark'
|
||||||
|
? 'rgba(255, 255, 255, 0.12)'
|
||||||
|
: 'rgba(255, 255, 255, 0.95)',
|
||||||
|
boxShadow:
|
||||||
|
theme.palette.mode === 'dark'
|
||||||
|
? 'none'
|
||||||
|
: '0 1px 3px rgba(0, 0, 0, 0.04)',
|
||||||
|
fontSize: '0.875rem',
|
||||||
|
lineHeight: 1.55,
|
||||||
|
color: 'text.primary',
|
||||||
|
wordBreak: 'break-word',
|
||||||
|
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
||||||
|
fontSize: '1rem',
|
||||||
|
fontWeight: 600,
|
||||||
|
mt: 1.25,
|
||||||
|
mb: 0.5,
|
||||||
|
'&:first-child': { mt: 0 },
|
||||||
|
},
|
||||||
|
'& p': {
|
||||||
|
my: 0.5,
|
||||||
|
'&:first-child': { mt: 0 },
|
||||||
|
'&:last-child': { mb: 0 },
|
||||||
|
},
|
||||||
|
'& ul, & ol': {
|
||||||
|
pl: 2.5,
|
||||||
|
my: 0.5,
|
||||||
|
},
|
||||||
|
'& a': {
|
||||||
|
color: 'primary.main',
|
||||||
|
textDecoration: 'underline',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
dangerouslySetInnerHTML={{ __html: html }}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default class ArticleSeoTab extends Component {
|
export default class ArticleSeoTab extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { article: articleData } = this.props;
|
const { article: articleData } = this.props;
|
||||||
@@ -27,7 +89,7 @@ export default class ArticleSeoTab extends Component {
|
|||||||
<>
|
<>
|
||||||
<PanelValue label="Slug">{articleData.slug}</PanelValue>
|
<PanelValue label="Slug">{articleData.slug}</PanelValue>
|
||||||
<PanelValue label="SEO">{seo}</PanelValue>
|
<PanelValue label="SEO">{seo}</PanelValue>
|
||||||
<PanelValue label="Beschreibung">{desc}</PanelValue>
|
<PanelHtmlValue label="Beschreibung" html={desc} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user