mirror of
https://github.com/TxtDot/dalet.git
synced 2024-11-21 12:26:23 +03:00
doc: add ol, row, link, navlink, btn, navbtn, img tags
This commit is contained in:
parent
1b5b0c342f
commit
fe7ea77e9e
3 changed files with 199 additions and 13 deletions
|
@ -31,10 +31,10 @@ This is one paragraph
|
|||
|
||||
This is another paragraph
|
||||
|
||||
# [ ] for arguments
|
||||
# [ ] for argument
|
||||
row[center]: {
|
||||
link[https://github.com/txtdot/txtdot]: Homepage
|
||||
button[https://example.com/donate]: {
|
||||
btn[https://example.com/donate]: {
|
||||
# tag without body
|
||||
img[https://example.com/donate.png]
|
||||
Donate
|
||||
|
|
|
@ -21,7 +21,7 @@ All tags specification is in [Tags](./tags.md).
|
|||
Each tag is array of 1-3 elements.
|
||||
|
||||
1. Tag id
|
||||
2. Tag body (optional)
|
||||
2. Tag body (optional if argument not specified, if argument specified it must be null)
|
||||
3. Tag argument (optional)
|
||||
|
||||
Tag id is integer number.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Tags specification for Dalet v1.0-preview
|
||||
|
||||
## Element
|
||||
## 0. Element
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
|
@ -25,7 +25,7 @@ Element also used if no tag is specified.
|
|||
[0, "Dalet"]
|
||||
```
|
||||
|
||||
## Heading
|
||||
## 1. Heading
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ------------------- |
|
||||
|
@ -52,7 +52,7 @@ h[1]: Dalet
|
|||
[1, "Dalet", 1]
|
||||
```
|
||||
|
||||
## Paragraph
|
||||
## 2. Paragraph
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
|
@ -75,7 +75,7 @@ p: This is a paragraph
|
|||
[2, "This is a paragraph"]
|
||||
```
|
||||
|
||||
## Line break
|
||||
## 3. Line break
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
|
@ -98,7 +98,7 @@ br
|
|||
[3]
|
||||
```
|
||||
|
||||
## Unordered list
|
||||
## 4. Unordered list
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
|
@ -107,15 +107,15 @@ br
|
|||
| argument | no |
|
||||
| body | tags |
|
||||
|
||||
Unordered list is used to create a list. Each list item is a tag.
|
||||
Unordered list is used to create a list.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
```txt
|
||||
ul: {
|
||||
Item 1
|
||||
Item 2,
|
||||
}
|
||||
Item 1
|
||||
Item 2
|
||||
}
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
@ -129,3 +129,189 @@ ul: {
|
|||
],
|
||||
]
|
||||
```
|
||||
|
||||
## 5. Ordered list
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 5 |
|
||||
| name | ol |
|
||||
| argument | no |
|
||||
| body | tags |
|
||||
|
||||
Ordered list is used to create a list with increasing numbers.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```txt
|
||||
ol: {
|
||||
Item
|
||||
Item
|
||||
Item
|
||||
}
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[
|
||||
5,
|
||||
[
|
||||
[0, "Item"],
|
||||
[0, "Item"],
|
||||
[0, "Item"],
|
||||
],
|
||||
]
|
||||
```
|
||||
|
||||
## 6. Row
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ------------------------------ |
|
||||
| id | 6 |
|
||||
| name | row |
|
||||
| argument | string (optional); center, end |
|
||||
| body | tags |
|
||||
|
||||
Splits the text into rows.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```txt
|
||||
row: {
|
||||
Left
|
||||
Right
|
||||
}
|
||||
|
||||
row[center]: {
|
||||
Left
|
||||
Right
|
||||
}
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[
|
||||
6,
|
||||
[
|
||||
[0, "Left"],
|
||||
[0, "Right"],
|
||||
],
|
||||
]
|
||||
```
|
||||
|
||||
## 7. Link
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 7 |
|
||||
| name | link |
|
||||
| argument | string |
|
||||
| body | text, tags |
|
||||
|
||||
Link to other sites. On click the link opens in new tab.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
link[https://example.com]: I am Link
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[7, "I am Link", "https://example.com"]
|
||||
```
|
||||
|
||||
## 8. Navlink
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 8 |
|
||||
| name | navlink |
|
||||
| argument | string |
|
||||
| body | text, tags |
|
||||
|
||||
Link to the same site. On click the link opens in current tab.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
navlink[/specification]: I am Navlink
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[8, "I am Navlink", "/specification"]
|
||||
```
|
||||
|
||||
## 9. Button
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 9 |
|
||||
| name | btn |
|
||||
| argument | string |
|
||||
| body | text,tags |
|
||||
|
||||
Same as link, but with button style.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
btn[https://example.com]: I am Button
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[9, "I am Button", "https://example.com"]
|
||||
```
|
||||
|
||||
## 10. NavButton
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 9 |
|
||||
| name | navbtn |
|
||||
| argument | string |
|
||||
| body | text,tags |
|
||||
|
||||
Same as navlink, but with button style.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
navbtn[https://example.com]: I am NavButton
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[10, "I am NavButton", "https://example.com"]
|
||||
```
|
||||
|
||||
## 11. Image
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| id | 11 |
|
||||
| name | img |
|
||||
| argument | string |
|
||||
| body | no |
|
||||
|
||||
Displays an image.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
img[/dalet.png]
|
||||
```
|
||||
|
||||
**Daletl example (json5 representation)**:
|
||||
|
||||
```json5
|
||||
[11, null, "/dalet.png"]
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue