Skip to content

Commit

Permalink
Revise header levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Jünger committed Dec 17, 2024
1 parent 2617fad commit 2707072
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
22 changes: 11 additions & 11 deletions docs/backend/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -119,20 +119,20 @@ 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.
The configuration is stored in the types table. Each typed entity has access to its type record by the type property.

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.
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions docs/frontend/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion docs/frontend/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
permalink: /
---

# Introduction

Epigraf is a research platform for collecting, annotating, linking and publishing multimodal text data.

Expand All @@ -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,
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
File renamed without changes.

0 comments on commit 2707072

Please sign in to comment.