Skip to content

Commit

Permalink
[WIP] style english doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédérique Chambinaud committed Feb 7, 2024
1 parent 5d217b8 commit 15ae8c8
Show file tree
Hide file tree
Showing 33 changed files with 1,113 additions and 880 deletions.
25 changes: 15 additions & 10 deletions _sass/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ a h1{

h2{
font-family: $bodyFont;
font-weight: 600;
font-weight: 700;
font-size: 2rem;
display: inline;
margin: 20px 0;
Expand All @@ -252,9 +252,9 @@ h2{
.ligne-jaune-h2{
margin-bottom: 1rem;
box-shadow: inset 0rem -0.6rem 0px $yellow;
display: flex;
justify-content: start;
display: inline-block;
// display: flex;
// justify-content: start;
// display: inline-block;
}

h3{
Expand All @@ -271,7 +271,6 @@ h3{
justify-content: start;
}


h4{
font-size: 1.1rem;
margin: 1rem 0 0.5rem 0;
Expand All @@ -282,8 +281,8 @@ p{
margin-block-start: 0;
margin-block-end: 0;
font-size: 1rem;
line-height: 1.25rem;
margin-bottom: 0.3rem;
line-height: 1.4rem;
margin-bottom: 0.5rem;
}


Expand Down Expand Up @@ -470,7 +469,6 @@ margin-right: 3rem;
line-height: 1.6rem;
margin: 0rem 3rem 0.3rem 3rem;
}

button{
padding: 0.5rem 1rem;
background-color: $darkgrey;
Expand All @@ -483,13 +481,20 @@ button{
button:hover{
background-color: $yellow;
color: black;
font-weight: 500;
}
.center-button{
display: flex;
justify-content: center;
width: 100%;
margin-top: 1rem;
&.versionEN{
margin-top: -0.5rem;
margin-bottom: 1.5rem;
}
&.versionEN2{
margin-top: 2rem;
margin-bottom: 1.5rem;
}
}


Expand Down Expand Up @@ -583,7 +588,7 @@ button:hover{
box-shadow: inset 0rem -0.6rem 0px #E6B900;
}
h3{
font-family: $bodyFont;
font-family: $serifFont;
margin: 1.5rem 3rem 1rem 3rem;
box-shadow: inset 0.7rem 0px 0px $yellow;
}
Expand Down
240 changes: 145 additions & 95 deletions en/about.html

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions en/doc/guides/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Using the API
---

## Using the API

eCorpus provides a two-part API:

- webDAV on `/scenes/**` to access scene files.
- REST on `/api/v1/**` for administrative management.

### Authentication

For command-line authentication, use an `Authorization` header with the value `Basic <base64(username:password)>`.

Header encoding is handled automatically by most utilities. Example with curl:

```bash
curl -XGET -u "<username>:<password>" https://ecorpus.holusion.com/[...]
```

### API webDAV

File organization:

```
├── foo/
│ ├── scene.svx.json
│ ├── scene-image-thumb.jpg
│ ├── models/
│ │ └── foo.glb
│ └── articles/
│ └── foo-FR.html
└── bar/
├── scene.svx.json
├── scene-image-thumb.jpg
├── models/
│ └── bar.glb
└── articles/
└── bar-FR.html
```

So to retrieve a:

```bash
curl -XGET -u "<username>:<password>" https://ecorpus.holusion.com//scenes/foo/models/foo.glb
```

Les verbes `GET` `PUT` `MOVE` `COPY` `DELETE` `MKCOL` et `PROPFIND` sont supportés, avec un comportement se conformant généralement à la [spécification](http://www.webdav.org/specs/rfc4918.html){:target="_blank"}.


### API REST

The REST API can be accessed at `/api/v1/`. It uses standard HTTP verbs.

See the [route reference](/en/doc/references/api) for details.
44 changes: 40 additions & 4 deletions en/doc/guides/developpement.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Development
---

## Development

### Keeping in sync

Expand Down Expand Up @@ -29,14 +34,45 @@ Edit the `.gitmodules` to change the source URL, then run :

Then in the change module's folder (ie. `libs/ff-x`)

cd libs/ff-xx
git fetch
git checkout origin/<feature-branch>
```
cd libs/ff-xx
git fetch
git checkout origin/<feature-branch>
```

Finally, in the root folder :

git add libs/ff-x
```
git add libs/ff-x
```

Commit the changes to the submodule's URL and HEAD.

[^1]: Described here [friendly forks management](https://github.blog/2022-05-02-friend-zone-strategies-friendly-fork-management/#git-for-windows-git)


### Tests

The server part of the code is tested with [mocha](https://mochajs.org/){:target="_blank"} and [chai](https://www.chaijs.com/){:target="_blank"}. See `source/server/**/*.test.js`.

Run unit tests with :

```
npm test
```

Or to select specific tests :

```
(cd source/server && npm test -- --grep "test name")
```

> Some lines in `console.log` are disabled to make standard test output more readable. They can be reactivated by forcing the `TEST=0` variable on the command line.
### Synchronization with the original repository

This repository is synchronized with [upstream](https://github.com/Smithsonian/dpo-voyager){:target="_blank"}. Changes are made in a `master` branch and merged with the `upstream/master` branch. It's important to keep code porting as simple as possible (see for example: [friendly forks management](https://github.blog/2022-05-02-friend-zone-strategies-friendly-fork-management/#git-for-windows-git){:target="_blank"}).

```
git merge -m "merge branch 'master' on $(git rev-parse --short master)" master
```
18 changes: 9 additions & 9 deletions en/doc/guides/import_export.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
---
title: Importing and exporting data
title: Managing your data
---

# Managing your eCorpus data
## Managing your data

Data interoperability is one of the core features of eCorpus.

It's simplest expression is that one can easily download some or all data from an instance and import it into another one.

It's useful for backup purposes but can also be leveraged as a way to reuse scenes from one institution to another.

## Exporting data from your eCorpus instance
### Exporting data from your eCorpus instance

### Using the interface
#### Using the interface

Navigate to the **collection** page of your eCorpus instance. Select the scenes you wish to export and click on the **Download as Zip** button.

### Using the API
#### Using the API

```bash
curl -XGET https://${HOSTNAME}/api/v1/scenes?name=${NAME}&format=zip
```
You can add as many `name="..."` parameters as you want to the query string.
You can add as many `name="..."` parameters as you need, separated by `&` characters.

## Importing data into your eCorpus instance
### Importing data into your eCorpus instance

### Using the API
#### Using the API

```bash
curl -XPOST https://${HOSTNAME}/api/v1/scenes --data-binary "@${ZIP_FILE}" | jq .
```
The request returns a (potentially very large) JSON object describing the result. You can filter only failure by running `jq .fail` or if you don't have `jq` installed you can skip it and use the `curl -s --fail -o /dev/null -w "%{http_code}"`
The request returns a (potentially very large) JSON object describing the result. You can filter only failure by running `jq .fail` or if you don't have `jq` installed you can skip it and use the `curl -s --fail -o /dev/null -w "%{http_code}"`.
32 changes: 32 additions & 0 deletions en/doc/guides/voyager/story_interface.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Voyager Story interface
---

<section class="fer-gauche">
<h2 id="ligne-jaune-h2-doc">Voyager Story interface</h2>
<h3 id="ligne-jaune-h3-doc">Edit your scene</h3>
<div>
<ul>
<li>{% include button.html name="pose" icon="move" %} Position and resize the model.</li>
<li>{% include button.html name="capture" icon="camera" %} Take screenshots and save the state of the scene.</li>
<li>{% include button.html name="derivatives" icon="hierarchy" %} Manage derivatives (different levels of detail).</li>
<li>{% include button.html name="annotations" icon="comment" %} Create and edit annotations.</li>
<li>{% include button.html name="articles" icon="file" %} Create and edit articles.</li>
<li>{% include button.html name="visites" icon="globe" %} Create and edit guided tours.</li>
<li>{% include button.html name="audio" icon="audio" %} Add and organize audio.</li>
<li>{% include button.html name="parametres" icon="eye" %} Edit scene settings.</li>
</ul>
<h3 id="ligne-jaune-h3-doc">Explore the scene</h3>
<ul>
<li>{% include button.html icon="globe" %} Display tours.</li>
<li>{% include button.html icon="file" %} Display articles.</li>
<li>{% include button.html icon="comment" %} Display annotations.</li>
<li>{% include button.html icon="share" %} Share the scene.</li>
<li>{% include button.html icon="expand" %} Fullscreen mode.</li>
<li>{% include button.html icon="tools" %} Tools and settings.</li>
</ul>
</div>

<!-- <h3 id="ligne-jaune-h3-doc">Créer une scène pas à pas</h3> -->

</section>
Loading

0 comments on commit 15ae8c8

Please sign in to comment.