You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Responsive UI framework for building content management systems with simple authoring api. Designed to run as a browser application connected to json:api powered backend.',
6
+
description: 'Responsive UI framework for building content management systems with simple authoring API. Designed to run as a browser application connected to JSON:API powered backend.',
Copy file name to clipboardExpand all lines: documentation/about.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ Trikoder Trim is user interface framework for building headless content manageme
3
3
Craft responsive single page applications that work on all devices.
4
4
5
5
Content management systems built on top of Trikoder Trim are decoupled from server side technology stack.
6
-
UI framework works nicely with any server side technology that can process and render json api dataset compliant with [json:api specification](http://jsonapi.org/).
6
+
UI framework works nicely with any server side technology that can process and render JSON dataset compliant with [JSON:API specification](http://jsonapi.org/).
7
7
8
-
Trim enables you to quickly build administration CRUD (create, read, update, delete) interface for your application resources. Resulting CMS is responsive and fast - all styles and behavior for standard use cases come included - programmers job is only to define how each application resource is listed and edited.
8
+
Trim enables you to quickly build administration CRUD (create, read, update, delete) interface for your application resources. Resulting CMS is responsive and fast - all styles and behavior for standard use cases come included - developers job is only to define how each application resource is listed and edited.
9
9
10
-
Sensible dependency on standardized backend api enables us to create CMS domain specific language or api in javascript that is pretty much decoupled from JS libraries and frameworks that are used underneath. Any capable programmer should be able to define complete interface for resource in need of administration.
10
+
Sensible dependency on standardized backend API enables us to create CMS domain specific language or API in JS that is pretty much decoupled from JS libraries and frameworks that are used underneath. Any capable developer should be able to define complete interface for resource in need of administration.
11
11
12
12
13
13
## Technology and tooling
@@ -19,7 +19,7 @@ Trikoder Trim is built on following open source stack:
19
19
*[Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/) is used for module bundling and code splitting
20
20
21
21
## Code sneek peek
22
-
Lets assume your application has a simple "tag" resource and backend api for this resource is ready.
22
+
Let’s assume your application has a simple `tag` resource and backend API for this resource is ready.
23
23
You want to show list of tags that can be filtered by title.
24
24
Additionally you want to setup create and edit interface with input for setting tag title.
25
25
Your code should end up looking something like this:
@@ -66,6 +66,6 @@ export default {
66
66
```
67
67
68
68
## Demo application
69
-
Visit [demo application](https://trikoder.github.io/trim/demo/index.html) to get a feeling how CMS built with Trikoder CMF looks and behaves. Is is completely safe to browse, edit and delete items - backend api on demo pages is running on client json api server that stores data in browser memory - so no harm can be done. Dataset can be reset by clicking "reset demo data" control in lower left corner of administration UI. Examine how everything is composed in [demo codebase](https://github.com/trikoder/trim/tree/master/demo).
69
+
Visit [demo application](https://trikoder.github.io/trim/demo/index.html) to get a feeling how CMS built with Trikoder CMF looks and behaves. Is is completely safe to browse, edit and delete items - backend API on demo pages is running on client JSON:API server that stores data in browser memory - so no harm can be done. Dataset can be reset by clicking "reset demo data" control in lower left corner of administration UI. Examine how everything is composed in [demo codebase](https://github.com/trikoder/trim/tree/master/demo).
70
70
71
71
Feel free to browse, cut and paste from demo codebase for your CMS needs and use it as reference.
Copy file name to clipboardExpand all lines: documentation/adding-resource.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
# Adding resource
2
-
We will examine typical scenario where new resource is ready on backend api and admin user interface has to be created.
2
+
We will examine typical scenario where new resource is ready on backend API and admin user interface has to be created.
3
3
Steps needed to complete UI for this new resource:
4
-
- examine resource api
4
+
- examine resource API
5
5
- create resource controller
6
6
- add resource route
7
7
- add navigation link
8
8
- register controller as service
9
9
10
10
For simple resources this can be completed in less then 5 minutes.
11
11
12
-
## Examine resource api
13
-
Make sure that resource backend api is ready to handle get, post, and put requests.
12
+
## Examine resource API
13
+
Make sure that resource backend API is ready to handle get, post, and put requests.
14
14
Check that backend properly outputs relation includes, make sure that filtering and validation rules are respected.
15
15
Examine new resource attributes and relations and decide what list and form elements have to be used.
16
16
17
17
Everything works? Then lets build resource UI controller.
18
18
19
19
## Create resource controller
20
-
Lets say new resource in need of UI is "tag" entity.
20
+
Let’s say new resource in need of UI is `tag` entity.
21
21
We will need a component to describe how resource is browsed, filtered and sorted in list, what form fields are rendered when resource is created or updated.
22
22
23
23
For this purpose we will build a tag resource controller in 'src/controllers/tag.js' file:
Copy file name to clipboardExpand all lines: documentation/base-controllers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ export default {
24
24
```
25
25
26
26
Sometimes empty resource is required for meaningful create admin interface.
27
-
In this case draft resource is created on api (with id but no attributes and relation data) and edited in UI immediately.
27
+
In this case draft resource is created on API (with id but no attributes and relation data) and edited in UI immediately.
28
28
29
29
```js
30
30
exportdefault {
@@ -98,7 +98,7 @@ Used for hierarchal resources that can be presented in nested tree view form.
98
98
Categories as resources usually have parent and child categories.
99
99
Example [demo controller](https://trikoder.github.io/trim/demo/index.html#category) and [codebase](https://github.com/trikoder/trim/tree/master/demo/controllers/category.js).
100
100
101
-
Lets examine category api response:
101
+
Let’s examine category API response:
102
102
```js
103
103
{
104
104
type:'category',
@@ -161,7 +161,7 @@ Properties mapChildrenTo, mapLevelTo, mapIsLeafTo can be defined as strings or f
161
161
Used for browse, create (upload) and edit media resources sush as images or files.
162
162
Example [demo controller](https://trikoder.github.io/trim/demo/index.html#media) and [codebase](https://github.com/trikoder/trim/tree/master/demo/controllers/media.js).
Copy file name to clipboardExpand all lines: documentation/core-concepts-and-api.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Core concepts and api
1
+
# Core concepts and API
2
2
Understanding of how core components work is essential for building applications with Trikoder Trim.
3
3
This chapter provides insight into resource controller, resource list, resource edit, router, navigation, service container and application object.
4
4
@@ -8,7 +8,7 @@ Here we define how resource is browsed, filtered and sorted in list, what form f
8
8
9
9
In most use cases controller looks like a simple configuration file.
10
10
This configuration based architecture delegates most of the work to components that are composed out of our sight.
11
-
Resource controller is a container component which calls service components for listing and editing resources who build their own component subtrees - all that is abstracted from user via simple and easy to use api.
11
+
Resource controller is a container component which calls service components for listing and editing resources who build their own component subtrees - all that is abstracted from user via simple and easy to use API.
12
12
13
13
All resource controllers share same basic skeleton. We define what resource type controller is handling (resourceName) and implement methods for resource listing (setupList) and resource editing (setupEdit):
Copy file name to clipboardExpand all lines: documentation/getting-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Getting started
2
-
Before digging into UI code make sure you have a basic understanding of core json api concepts (how relations, attributes, getting, creating and updating resources work). A functional backend api compliant with json api standard is prerequisite for building UI.
3
-
Browse [json:api webpage](http://jsonapi.org/) and [examples](http://jsonapi.org/examples/) to familiarize yourself with standard.
2
+
Before digging into UI code make sure you have a basic understanding of core JSON:APIconcepts (how relations, attributes, getting, creating and updating resources work). A functional backend API compliant with JSON:API standard is prerequisite for building UI.
3
+
Browse [JSON:API webpage](http://jsonapi.org/) and [examples](http://jsonapi.org/examples/) to familiarize yourself with standard.
4
4
5
5
Everything explained in this chapter has concrete implementation details in demo application codebase.
6
6
Feel free to [browse demo codebase](https://github.com/trikoder/trim/tree/master/demo) and take what you need.
Copy file name to clipboardExpand all lines: documentation/list-elements.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ All list elements are Vue components found in [listElement folder](https://githu
10
10
All list elements accept following set of options:
11
11
12
12
***caption**: used to define cell heading content.
13
-
***mapTo**: used for mapping list item content to resource attribute or relationship data. Can be string of function. When defined as string it will fetch model value under that key. Learn how to use [JSON api resource](https://dbrekalo.github.io/json-api-resource/) api to query and transform data.
13
+
***mapTo**: used for mapping list item content to resource attribute or relationship data. Can be string of function. When defined as string it will fetch model value under that key. Learn how to use [JSON:APIresource](https://dbrekalo.github.io/json-api-resource/) to query and transform data.
14
14
***attributes**: List of DOM element attributes.
15
15
16
16
---
@@ -227,7 +227,7 @@ list.addItem('ContextMenu', {
227
227
228
228
## Media
229
229
List element used for presenting media items (image, video, audio, file).
0 commit comments