Static CMS v2.0 (#226)
- [x] Update auf Static CMS v2.0 - [x] aktualisierte Shortcodes (schließt #225) - [x] aktualisierte Previews (schließt #181) - Ordnerunterstützung - [x] vervollständigte Seiten - [x] Aufräumarbeiten Reviewed-on: https://git.cantorgymnasium.de/gcg/gcg-website/pulls/226
This commit is contained in:
3
static/admin/previews/field-previews/components/index.js
Normal file
3
static/admin/previews/field-previews/components/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
import truncate from "./truncate.js";
|
||||
|
||||
export { truncate };
|
@ -0,0 +1,9 @@
|
||||
function truncate(str, num) {
|
||||
if (str.length > num) {
|
||||
return str.slice(0, num) + "...";
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
export default truncate;
|
Reference in New Issue
Block a user