GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nachobh/NachetosEngine: UI Engine for web (HTML + CSS + JS) - Just a JSON parser/interpreter

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.json
app.json
 
 
example.json
example.json
 
 
image01.png
image01.png
 
 
index.html
index.html
 
 

Repository files navigation

NachetosEngine

UI Engine for web (HTML + CSS + JS) - Just a JSON parser/interpreter

UI scheme designed in JSON format

JSON format

The JSON file/template will have this main elements:

  • title
  • description
  • author
  • canvas
  • languages
  • screens
  • functions
  • scriptBlocks

The text fields have a subfield, content, and this could be just text or a literal from languages of type ${someLiteralToTranslate}.

A dummy JSON example without too much scripting:

{
  "title" : {
    "content": "Example Title"
  },
  "description" : {
    "content": "${exampleDescription}"
  },
  "author" : {
    "content": "Ignacio Benito Herrero"
  },
  "canvas": {
    "size": {
      "x": "50%",
      "y": "50%",
      "constraints": {
        "minX": "350px",
        "minY": "550px",
        "maxX": "1280px",
        "maxY": "720px"
      }
    }
  },
  "languages": [
    {
      "iso": "en",
      "exampleDescription": "Description",
      "exampleScreen": "Example screen",
      "helloWorld": "Hello world!",
      "helloWorldDialog": "This is the hello world dialog."
    },
    {
      "iso": "es",
      "exampleDescription": "Descripción",
      "exampleScreen": "Pantalla de ejemplo",
      "helloWorld": "¡Hola mundo!",
      "helloWorldDialog": "Este es el diálogo de hola mundo."
    }
  ],
  "screens": [
    {
      "id": 1,
      "first": true,
      "title": {
        "content": "${helloWorld}",
        "backgroundColor": "transparent",
        "color": "white"
      },
      "size": {
        "x": "100%",
        "y": "100%"
      },
      "border": {
        "color": "white",
        "width": "0.1%"
      },
      "background": {
        "color": "grey"
      },
      "buttons": [
        {
          "id": 1,
          "defaultFocused": true,
          "size": {
            "x": "10%",
            "y": "5%"
          },
          "position": {
            "x": "80%",
            "y": "85%",
            "type": "relative"
          },
          "text": {
            "content": "${helloWorld}",
            "backgroundColor": "transparent",
            "color": "#1A1A1A"
          },
          "background": {
            "color": "#AEAEAE"
          },
          "action": {
            "name": "loadScreen",
            "args": 2
          }
        },
        {
          "id": 2,
          "size": {
            "x": "10%",
            "y": "5%"
          },
          "position": {
            "x": "20%",
            "y": "85%"
          },
          "text": {
            "content": "Hasta la vista!",
            "backgroundColor": "transparent",
            "color": "#1A1A1A"
          },
          "border": {
            "color": "red",
            "width": "5%",
            "radius": "30%"
          },
          "background": {
            "color": "#AEAEAE"
          },
          "action": {}
        }
      ],
      "dialogs": [
        {
          "id": 1,
          "size": {
            "x": "80%",
            "y": "20%"
          },
          "position": {
            "x": "50%",
            "y": "75%"
          },
          "border": {
            "color": "red",
            "width": "1%",
            "radius": "50%"
          },
          "actionToShow": null,
          "text": {
            "content": "${helloWorldDialog}",
            "backgroundColor": "white",
            "color": "#1A1A1A"
          },
          "zIndex": 1
        }
      ],
      "pictures": [
        {
          "id": 1,
          "size": {
            "x": "10%",
            "y": "10%"
          },
          "position": {
            "x": "0%",
            "y": "0%",
            "type": "fixed"
          },
          "border": {
            "color": "red",
            "width": "0.1%",
            "radius": "10%"
          },
          "actionToShow": null,
          "image": {
            "content": "image01.png",
            "backgroundColor": "white",
            "color": "#1A1A1A"
          },
          "zIndex": -999
        }
      ]
    },
    {
      "id": 2,
      "title": {
        "content": "${helloWorld}",
        "backgroundColor": "transparent",
        "color": "white"
      },
      "size": {
        "x": "100%",
        "y": "100%"
      },
      "border": {
        "color": "white",
        "width": "0.1%"
      },
      "background": {
        "color": "white"
      },
      "buttons": [
        {
          "id": 1,
          "size": {
            "x": "10%",
            "y": "5%"
          },
          "position": {
            "x": "20%",
            "y": "85%"
          },
          "text": {
            "content": "Hasta la vista!",
            "backgroundColor": "transparent",
            "color": "#1A1A1A"
          },
          "border": {
            "color": "red",
            "width": "0.1%",
            "radius": "0.05%"
          },
          "background": {
            "color": "#AEAEAE"
          },
          "action": {}
        }
      ]
    }
  ]
}

Description of elements

  • title:
  • description:
  • content:
  • screens: This field represent the list of screens in the app.
  • blablabla

A little bit of history

Calling it an engine is a little bit over the top. It is more an HTML generator. Let me explain myself:

A current issue I've faced designing UIs, is not having a way to update the UI without publishing/updating the app in the Stores.

As an example, in Apple Store updates can take 1-2 days, making even the slightest change in the UI an enormous pain.

This project was inspired by @lordcuch from a small talk in BCN Game Fest while I was "crying" in desperation about my UI problems in Flutter.

This way, you can have all your UI elements on a JSON format, allowing you to update the UI without publishing a new version of your app.

As final goal, HTML result file should be compiled into different formats, so this "engine" serves not only as an HTML generator, but also as a multiplatform app designer.

About

UI Engine for web (HTML + CSS + JS) - Just a JSON parser/interpreter

Resources

Readme
Apache-2.0 license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.