Skip to content

Commit

Permalink
Merge pull request #87 from MercuryWorkshop/docs
Browse files Browse the repository at this point in the history
Docs
  • Loading branch information
markrosenbaum authored Sep 21, 2023
2 parents d4683d1 + 0608e6d commit 12c66d6
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/appdevt.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Application development

all of the below is undergoing change. see public/glxgears.app for an example
See [This Document](./templates/template.app/README.md) for instructions on how to set up a basic iFrame app.

<!-- Every application is a .app folder with an entry file called launchapp.js. In this file, a function called loadingScript is called with the path of the app -->
<!---->
Expand Down Expand Up @@ -40,4 +40,4 @@ all of the below is undergoing change. see public/glxgears.app for an example
<!-- } -->
<!-- ``` -->

you can create a C app by crying
<!-- you can create a C app by crying -->
27 changes: 27 additions & 0 deletions documentation/templates/template.app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Template Anure app for an easy HTML iFrame

## Instructions for use:

1. Start by copying and renaming the template.app folder to your desired app.
2. Add your desired html, js, and css files to their respective folders. The html file you want to be visible in the app should be named index.html.
3. Go to the manifest.json file and modify it to the correct values. You should modify the following fields:

```json
"name": "Your Desired app name"

"package": "anura.APPNAME",

"icon": "appicon.svg",

"title":"Your App Window Name",
```

4. Go to launchapp.js and modify the following line, replacing "template" with "yourappsname"

```js
let glxgears = AliceWM.create("template");
```

## Congrats

You have successfully completed building your basic iFrame app, you can either zip it and add it to a repository for the WorkStore or add it directly into your Anura instance under the apps folder.
4 changes: 4 additions & 0 deletions documentation/templates/template.app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!doctype html>
<html>
Anura App Template
</html>
10 changes: 10 additions & 0 deletions documentation/templates/template.app/launchapp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function loadingScript(currentpath) {
let glxgears = AliceWM.create("template");

let iframe = document.createElement("iframe");
iframe.style =
"top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0;";
iframe.setAttribute("src", currentpath + "/index.html");

glxgears.content.appendChild(iframe);
}
12 changes: 12 additions & 0 deletions documentation/templates/template.app/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Template",
"type": "auto",
"package": "anura.TEMPLATE",
"index": "index.html",
"icon": "terminal.svg",
"wininfo": {
"title": "TEMPLATE",
"width": "700px",
"height": "500px"
}
}
Binary file added documentation/templates/template.app/term.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions documentation/templates/template.app/terminal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 12c66d6

Please sign in to comment.