try ToC
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 17:01:54 +11:00
parent d8b68f2815
commit 1bb983b4b9
3 changed files with 7 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ steps:
commands: commands:
#- pandoc --standalone --output=index.html --metadata title="SMT Readme" -t html5 README.md #- pandoc --standalone --output=index.html --metadata title="SMT Readme" -t html5 README.md
# From https://gitlab.com/vimalkvn/pandoc-mvp-css # From https://gitlab.com/vimalkvn/pandoc-mvp-css
- pandoc -s README.md --embed-resources -c www/mvp.css --template template.html -o ./www/index.html - pandoc -s README.md --embed-resources -c www/mvp.css --toc --toc-depth=2 --template template.html -o ./www/index.html
- cp ./www/index.html /shared/index.html - cp ./www/index.html /shared/index.html
- name: restore-cache-with-filesystem - name: restore-cache-with-filesystem

View File

@@ -76,10 +76,10 @@ ExecStart=/srv/smt/smt
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
## API ## API Usage
### Login ### Login
POST `/api/login` **POST** `/api/login`
Data Data
``` ```
@@ -91,7 +91,7 @@ Data
This API call will return a JWT token that must be present for any other API calls to succeed. The validity duration of this token is based on the configured TOKEN_HOUR_LIFESPAN value. JWT token is returned as value of `access_token`, and must be supplied via a HTTP header in the form `"Authorization: Bearer <JWT_TOKEN>"` for all subsequent API calls. This API call will return a JWT token that must be present for any other API calls to succeed. The validity duration of this token is based on the configured TOKEN_HOUR_LIFESPAN value. JWT token is returned as value of `access_token`, and must be supplied via a HTTP header in the form `"Authorization: Bearer <JWT_TOKEN>"` for all subsequent API calls.
### Unlock ### Unlock
POST `/api/admin/unlock` **POST** `/api/admin/unlock`
Data Data
``` ```
@@ -107,7 +107,7 @@ This API call can only be made once after the service has started. Subsequent ca
### User Operations ### User Operations
#### Register User #### Register User
POST `/api/admin/user/add` **POST** `/api/admin/user/add`
Create a new user record by specifying groupId Create a new user record by specifying groupId
Body Body
@@ -134,7 +134,7 @@ Registering a user requires specifying the group to which the user will belong.
This operation can only be performed by a user that is a member of a group with the admin flag enabled, or a user who has the admin flag enabled individually on their database record. This operation can only be performed by a user that is a member of a group with the admin flag enabled, or a user who has the admin flag enabled individually on their database record.
#### Remove User #### Remove User
POST `/api/admin/user/delete` **POST** `/api/admin/user/delete`
Data Data
``` ```

View File

@@ -45,9 +45,8 @@ $include-before$
$endfor$ $endfor$
$if(title)$ $if(title)$
<header id="title-block-header"> <header id="title-block-header">
<!--
<nav id="$idprefix$TOC"> <nav id="$idprefix$TOC">
<a href="/"><img alt="Logo" src="$logo$" height="70"></a> <!--<a href="/"><img alt="Logo" src="$logo$" height="70"></a>-->
$if(toc)$ $if(toc)$
<ul> <ul>
<li><a href="#">Menu</a> <li><a href="#">Menu</a>
@@ -56,7 +55,6 @@ $if(title)$
</ul> </ul>
$endif$ $endif$
</nav> </nav>
-->
<h1 class="title">$title$</h1> <h1 class="title">$title$</h1>
$if(subtitle)$ $if(subtitle)$
<p class="subtitle">$subtitle$</p> <p class="subtitle">$subtitle$</p>