my-notes-viewer/api/collections/articles.yml

108 lines
2.7 KiB
YAML
Raw Normal View History

########################################################################
# Articles
########################################################################
name: articles
uploadPath: ../media/articles
meta:
# Navigationseintrag in der Admin-UI
label: { de: "Artikel", en: "Articles" }
# Icon (Material UI) für den Navigationseintrag
muiIcon: file-document-edit-outline
# Standardsortierung der Liste
defaultSort: { field: "article.general.sort", order: "ASC" }
# Admin-Backend Ansichten
defaultImageFilter: s
views:
# Mobile Darstellung
- type: simpleList
mediaQuery: "(max-width:599px)"
primaryText: path
columns:
- article.general.public
- article.content.title
- article.general.sort
- source: article.general.locale
type: flag
# Desktop
- type: table
mediaQuery: "(min-width:600px)"
columns:
- article.general.public
- label: { de: "Titel", en: "Title" }
source: article.content.title
filter: true
- article.general.sort
- source: article.general.locale
type: flag
imageFilter:
xs:
- fit: true
height: 90
width: 90
resampling: "lancos"
quality: 60
s:
- fit: true
height: 300
width: 300
resampling: "lancos"
quality: 60
m:
- fit: true
height: 600
width: 600
resampling: "lancos"
quality: 60
l:
- fit: true
height: 1200
width: 1200
resampling: "lancos"
quality: 60
xl:
- fit: true
height: 2000
width: 2000
resampling: "lancos"
quality: 60
permissions:
public:
methods:
get: true
post: false
put: false
delete: false
user:
methods:
get: true
post: true
put: true
delete: true
# token als Zusatzsicherung gegen Spam, mehr siehe Hook
"token:${PUBLIC_TOKEN}":
methods:
get: false
post: false
put: false
delete: false
# hooks:
# post:
# create:
# type: javascript
# file: hooks/article/post_create.js
# put:
# update:
# type: javascript
# file: hooks/article/put_return.js
# delete:
# return:
# type: javascript
# file: hooks/article/delete_return.js
fields:
- !include fields/_article.yml