From 2707072c0dc67e0e8180dcf2943e7d2070d4a7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20J=C3=BCnger?= Date: Tue, 17 Dec 2024 21:49:06 +0100 Subject: [PATCH] Revise header levels --- docs/backend/model.md | 22 +++++++++++----------- docs/frontend/i18n.md | 7 ++++--- docs/frontend/themes.md | 4 +++- docs/index.md | 7 +++---- docs/tast/{backendx.md => backend.md} | 0 5 files changed, 21 insertions(+), 19 deletions(-) rename docs/tast/{backendx.md => backend.md} (100%) diff --git a/docs/backend/model.md b/docs/backend/model.md index b0a18ed..4d760e3 100644 --- a/docs/backend/model.md +++ b/docs/backend/model.md @@ -21,9 +21,9 @@ The model always combines a table class and an entity class: In summary, query results retrieved by table classes are a collection of entities. Fields are available in entity properties. -# Table and Entity Classes +## Table and Entity Classes -## Application Level Models +### Application Level Models Application level data is managed by models in the `src/Model` folder. All Tables are derived from `src/Model/Table/BaseTable.php` and all Entities from `src/Model/Entity/BaseEntity.php`. @@ -57,7 +57,7 @@ to understand the full picture: The type entity is loaded along with the entities from the database and is available in the entity's `type` property. On the application level, the `type` property accesses an instance of the DefaultType entity class . -## Project Level Models +### Project Level Models Project databases are managed by models in the `plugins/Epi/src/Model` folder. Tables classes are usually derived from `plugins/Epi/src/Model/Table/BaseTable.php` @@ -88,7 +88,7 @@ Some special cases have to be considered: Single entities are loaded into the default CakePHP Entity class. -## Common Behaviours +### Common Behaviours The table and entity classes share functionality by inheritance as described above. Other mechanisms for shared functionality include: @@ -103,7 +103,7 @@ Other mechanisms for shared functionality include: TODO: Explain pagination and the TotalPaginator class. -### Behaviors +#### Behaviors - **ImportBehavior**: Import csv or xml files and transfer data between databases. Records are mapped using identifiers, allowing patch operations in addition to adding and deleting data. Links between the records are resolved. @@ -119,12 +119,12 @@ TODO: Explain pagination and the TotalPaginator class. - **XmlStylesBehavior**: Parse XML fields and render them to different output formats such as XML, HTML, Markdown or plain text, based on the types configuration. -### Interfaces +#### Interfaces - **ExportEntityInterface, ExportTableInterface**: Functions for data export. - **MutateEntityInterface, MutateTableInterface**: Functions for batch operations. - **ScopedTableInterface**: Scope function, which allow a database table to be used for different entities. -# Types Configuration +## Types Configuration The Epigraf user interface is highly configurable to support domains such as letter editions or social media corpora. The configuration defines which fields from a database record are used with which labels in the specific domain. @@ -132,7 +132,7 @@ The configuration is stored in the types table. Each typed entity has access to TODO: Add example. Add better explanation. -# Retrieving Field Values +## Retrieving Field Values Once you have retrieved entities from the database, you can use extraction keys to access the data. @@ -145,7 +145,7 @@ Placeholder strings are handled by `BaseEntity::getValuePlaceholder()`, which calls `BaseEntity::getValueNested()` to extract target fields, which in turn calls `BaseEntity::getValueFormatted()` to format the field value. -## Placeholder Strings +### Placeholder Strings Placeholder strings are the most versatile extraction method as they combine literal strings and placholders. They are used for triple generation. @@ -163,7 +163,7 @@ optionally followed by processing steps, each seperated by a pipe. See `BaseEntity::getValuePlaceholder()` and `Objects::processValues()` for more information. -## Extraction Paths +### Extraction Paths Extraction paths consist of dot separated path elements. For example, if you want to extract the lemmata of all properties used in article items @@ -183,7 +183,7 @@ The last path element is the target field, handled by `BaseEntity::getValueForma See `BaseEntity::getValueNested()` for more information. -## Rendered Field Values +### Rendered Field Values Once a target field has been extracted, the value can be formatted according to the field configuration and the output format. diff --git a/docs/frontend/i18n.md b/docs/frontend/i18n.md index 0861e5c..9a4d572 100644 --- a/docs/frontend/i18n.md +++ b/docs/frontend/i18n.md @@ -3,10 +3,11 @@ title: Translation permalink: '/frontend/translation/' --- -## Translation Functions - In the frontend (JavaScript) and the backend (CakePHP backend) we use English as base language -and wrap strings in translation functions. +and wrap strings in translation functions. Those strings are extracted from the code +and translated to other languages. + +## Translation Functions ### Backend diff --git a/docs/frontend/themes.md b/docs/frontend/themes.md index b907d06..8b756c1 100644 --- a/docs/frontend/themes.md +++ b/docs/frontend/themes.md @@ -3,6 +3,8 @@ title: Themes permalink: '/frontend/themes/' --- +## Color schemes + The visual appearance of the frontend is defined using themes. The primary color palette, accent colors, neutral colors, and functional colors as well as the font face are defined in the file `src/htdocs/app.css`. Those variables are used in the CSS files of the frontend to style the HTML elements. Theme files in the `src/htdocs` folder overwrite the default values. @@ -52,7 +54,7 @@ Themes can be switched by the `theme` query parameter or in the user settings. A Additional styles are provided by the Widget plugin in the `plugins/Widget/webroot/css/widget.css` file. Each widget may contribute a css file in `plugins/Widget/webroot/css` which is imported into the `widget.css` file. -# Toolbar +## Toolbar icons The XML editor toolbar buttons make use of icons as SVG files. The icons are dynamically imported to Epigraf from the file `htdocs/img/icons.min.js`. This file is created with webpack from the `resource/icons` folder. diff --git a/docs/index.md b/docs/index.md index 4ec846c..7c7d5f3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,7 +10,6 @@ permalink: / --- -# Introduction Epigraf is a research platform for collecting, annotating, linking and publishing multimodal text data. @@ -30,7 +29,7 @@ Look out for the flowers that are in bloom and help nurture the garden. ![Epigraf use cases](assets/img/epigraf-use-cases.png) -# Getting Started +## Getting Started Epigraf is a classical web application. The [server infrastructure](/docs/servers) to run Epigraf consists of an Apache web server, @@ -69,7 +68,7 @@ You can use the prepared docker compose setup to run the application: What's next? Get familiar with the [Epigraf configuration](https://epigraf.inschriften.net/help) to adapt it to your use case. -# Architecture +## Architecture The [frontend](/docs/frontend) is rendered in the browser using HTML, CSS, and JavaScript. Frontend logic is based on the EpiWidJs framework. The [backend](/docs/backend) is implemented using the CakePHP framework and contains the application logic. @@ -79,7 +78,7 @@ Frontend and database content is cached using Redis. If no Redis server is avail ![Epigraf architecture](../assets/img/epigraf-architecture.png){:width="90%"} -# Directory structure +## Directory structure The source code folder contains the standard directories of a CakePHP application. diff --git a/docs/tast/backendx.md b/docs/tast/backend.md similarity index 100% rename from docs/tast/backendx.md rename to docs/tast/backend.md