https://github.com/rodesp/unityjs
A very simple single-page application framework.
https://github.com/rodesp/unityjs
Last synced: 9 days ago
JSON representation
A very simple single-page application framework.
- Host: GitHub
- URL: https://github.com/rodesp/unityjs
- Owner: RodEsp
- Created: 2013-02-24T21:00:46.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T16:32:46.000Z (about 2 years ago)
- Last Synced: 2025-02-17T08:18:21.978Z (3 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
UnityJS
=====A very simple [single-page application](https://en.wikipedia.org/wiki/Single-page_application) framework.
## Usage
1. Add [unity.css](./unity.css) as a stylesheet in your HTML's header.
1. Define each page in your HTML by encapsulating its content in a div that has `data-role="view"` as an attribute.If you plan to separate each page into its own HTML file you will need to use a build tool like [Webpack](https://webpack.js.org/) to compile all your HTML into a single HTML file.
> _Note:_ There is no support for external html templates.
### Example
See [main.html](./test/main.html) for an example of how to use UnityJS.#### How to run the example
Clone this repo and open [main.html](./test/main.html) in your web browser.