15 lines
536 B
JavaScript
15 lines
536 B
JavaScript
|
|
/** Inline-Medium im Fließtext §11 — Darstellung (CSS + data-shinkan-exercise-media-size). */
|
||
|
|
export const INLINE_MEDIA_SIZES = [
|
||
|
|
{ value: 'small', label: 'Klein (~33 %)' },
|
||
|
|
{ value: 'medium', label: 'Mittel (~66 %)', default: true },
|
||
|
|
{ value: 'full', label: 'Volle Breite' },
|
||
|
|
]
|
||
|
|
|
||
|
|
export const DEFAULT_INLINE_MEDIA_SIZE = 'medium'
|
||
|
|
|
||
|
|
export function sanitizeInlineMediaSize(v) {
|
||
|
|
const s = String(v || '').toLowerCase().trim()
|
||
|
|
if (s === 'small' || s === 'medium' || s === 'full') return s
|
||
|
|
return DEFAULT_INLINE_MEDIA_SIZE
|
||
|
|
}
|