An open API service indexing awesome lists of open source software.

https://github.com/abcdesktopio/webmodules

abcdesktop.io frontend web content
https://github.com/abcdesktopio/webmodules

css html javascript less ws wss xterm

Last synced: 8 months ago
JSON representation

abcdesktop.io frontend web content

Awesome Lists containing this project

README

          

# webModules

## About this repository
webModules repository contains the HTML/JS files for the abcdesktop website.

## To get more informations
Please, read the public documentation web site:
* [https://www.abcdesktop.io/](https://www.abcdesktop.io/)

## Update and custom front end image

### Requirements
- `docker` command line to build new image
- `kubectl` to apply new yaml file

### Clone default webmodules

```bash
git clone -b 4.1 https://github.com/abcdesktopio/webModules.git
```

## Locate project and ui files

### Update ui.json file

Update your `ui.json` file. `ui.json` is located in `transpile/config` directory.

```bash
# cd webModules/transpile/config
# ls -la
total 204
drwxrwxr-x 1 root root 4096 Feb 1 15:14 .
drwxr-xr-x 1 root root 4096 Feb 1 15:14 ..
-rw-rw-r-- 1 root root 34 Feb 1 15:14 .cache.json
-rw-rw-r-- 1 root root 2215 Feb 1 15:11 modules.json
-rw-rw-r-- 1 root root 1044 Feb 1 15:11 ui.json
```

`ui.json` is a json dictionary file

The main entry is `name`, name is the project name:

| entry | default value | example |
|----------------|---------------------|------------------|
| name | abcdesktop.io | acmedesktop.io |

```json
{
"name": "abcdesktop.io",
"projectNameSplitedHTML": "abcdesktop",
"colors": [
{
"name": "@x11bgcolor",
"value": "#6EC6F0"
},
{
"name": "@primary",
"value": "#474B55"
},
{
"name": "@secondary",
"value": "#2D2D2D"
},
{
"name": "@tertiary",
"value": "#6EC6F0"
},
{
"name": "@quaternary",
"value": "#1E1E1E"
},
{
"name": "@svgColor",
"value": "#FFFFFF"
},
{
"name": "@danger",
"value": "#CD3C14"
},
{
"name": "@success",
"value": "#32C832"
},
{
"name": "@info",
"value": "#527EDB"
},
{
"name": "@warning",
"value": "#FFCC00"
},
{
"name": "@light",
"value": "#FFFFFF"
},
{
"name": "@dark",
"value": "#666666"
},
{
"name": "@blue",
"value": "#4BB4E6"
},
{
"name": "@green",
"value": "#50BE87"
},
{
"name": "@purple",
"value": "#A885D8"
},
{
"name": "@pink",
"value": "#FFB4E6"
},
{
"name": "@yellow",
"value": "#FFD200"
}
],
"urlcannotopensession": "/identification/site/",
"urlusermanual": "https://www.abcdesktop.io/",
"urlusersupport": "https://www.abcdesktop.io/",
"urlopensourceproject": "https://www.abcdesktop.io/"
}
```

##### Login progress

Login progress is from HTML `span` tags

```html
a
b
c
desktop
```

#### Colors dictionary entries

| entry | default value | example |
|----------------|----------------|-----------|
| @primary | #474B55 | #474B55 |
| @secondatry | #2D2D2D | #2D2D2D |
| @tertiary | #6EC6F0 | #6EC6F0 |

### Create a new `Dockerfile` to build changes

#### Update the ui.json with your own values

Change for example the name to

```
"name": "acmedesktop.io"
```

and the

```
@tertiary "value": "#00BCD4"
```

Example

```json
{
"name": "acmedesktop.io",
"projectNameSplitedHTML": "acmedesktop",
"colors": [
{
"name": "@x11bgcolor",
"value": "#6EC6F0"
},
{
"name": "@primary",
"value": "#474B55"
},
{
"name": "@secondary",
"value": "#2D2D2D"
},
{
"name": "@tertiary",
"value": "#00BCD4"
},
{
"name": "@quaternary",
"value": "#1E1E1E"
},
{
"name": "@svgColor",
"value": "#FFFFFF"
},
{
"name": "@danger",
"value": "#CD3C14"
},
{
"name": "@success",
"value": "#32C832"
},
{
"name": "@info",
"value": "#527EDB"
},
{
"name": "@warning",
"value": "#FFCC00"
},
{
"name": "@light",
"value": "#FFFFFF"
},
{
"name": "@dark",
"value": "#666666"
},
{
"name": "@blue",
"value": "#4BB4E6"
},
{
"name": "@green",
"value": "#50BE87"
},
{
"name": "@purple",
"value": "#A885D8"
},
{
"name": "@pink",
"value": "#FFB4E6"
},
{
"name": "@yellow",
"value": "#FFD200"
}
],
"urlcannotopensession": "/identification/site/",
"urlusermanual": "https://www.abcdesktop.io/",
"urlusersupport": "https://www.abcdesktop.io/",
"urlopensourceproject": "https://www.abcdesktop.io/"
}
```

#### docker build

Run the docker build command to build the new `oc.nginx:acme` image
The target image is `abcdesktopio/oc.nginx:acme` you shoudl change it with your own for example `myacme/oc.nginx:acme`

```bash
docker build --build-arg NODE_MAJOR=20 --build-arg BASE_IMAGE=abcdesktopio/oc.nginx.builder --build-arg BASE_IMAGE_RELEASE=3.3 --build-arg TARGET=dev -t abcdesktopio/oc.nginx:acme -f Dockerfile .
```

```bash
docker build --build-arg NODE_MAJOR=20 --build-arg BASE_IMAGE=abcdesktopio/oc.nginx.builder --build-arg BASE_IMAGE_RELEASE=3.3 --build-arg TARGET=prod -t abcdesktopio/oc.nginx:acme -f Dockerfile .
[+] Building 16.5s (19/19) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 962B 0.0s
=> [internal] load metadata for docker.io/library/nginx:latest 0.0s
=> [internal] load metadata for docker.io/abcdesktopio/oc.nginx.builder:3.3 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [stage-1 1/2] FROM docker.io/library/nginx:latest 0.0s
=> CACHED [builder 1/11] FROM docker.io/abcdesktopio/oc.nginx.builder:3.3 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 265.27kB 0.1s
=> [builder 2/11] RUN echo current branch is 0.2s
=> [builder 3/11] RUN echo NODE release is 20 0.2s
=> [builder 4/11] RUN echo current target is prod it can be 'dev' or 'prod' 0.2s
=> [builder 5/11] COPY . /var/webModules 0.4s
=> [builder 6/11] WORKDIR /var/webModules 0.1s
=> [builder 7/11] RUN make clean 0.7s
=> [builder 8/11] RUN make prod 9.7s
=> [builder 9/11] RUN ./mkversion.sh && cat version.json 0.2s
=> [builder 10/11] RUN /myenv/bin/html5validator index.html 2.0s
=> [builder 11/11] RUN make removebuildtools 0.8s
=> [stage-1 2/2] COPY --from=builder /var/webModules /usr/share/nginx/html 0.7s
=> exporting to image 0.7s
=> => exporting layers 0.7s
=> => writing image sha256:d7bdbc9f7fafe3282161551e84c5997bb12051bded6405190267863dd73a1698 0.0s
=> => naming to docker.io/abcdesktopio/oc.nginx:acme
```

#### update the `abcdesktop.yaml`

- update the `abcdesktop.yaml` to replace `abcdesktopio/oc.nginx:3.3` by your own image `myacme/oc.nginx:acme`
- apply the new `abcdesktop.yaml`

```
kubectl apply -f abcdesktop.yaml
```