Skip to content

Commit 0d06236

Browse files
Update README.md
1 parent 3d41c8f commit 0d06236

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

README.md

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11

22
![img](https://upload.wikimedia.org/wikipedia/commons/0/01/CanvaScript.png "a tite")
33
# Welcome to CanvaScript
4-
CanvaScipt is a library for Java.it enabling Java as a sever-side langange.it's lighter JSP(if you are wondering)if you have issues please go to
4+
CanvaScipt is a library for Java.it run the server enabling Java as a server-side langange.it's lighter than JSP(if you are wondering Java Server Pages)if you have issues please go to
55
https://github.com/CleanCode-backup/CanvaScript/issues
66
and make a new issue.also if you can do a pull request please do that.that will make my day 😊!you can go to
77
https://github.com/CleanCode-backup/CanvaScript/pulls for that.
88
# Tutorials - Learn More
99
Welcome to the To Tutorials,for full documentation go to the <a href="Docs.md">Docs</a>(if you are wonder the folder doc is a part of the library.)
10-
in order to use the libary use the <code>import cavnascript</code>
11-
## Creating a HTML page
12-
first Let's Create a HTML page that Java can use.
13-
14-
<code>
15-
import canvascript.doc.htmldoc;
16-
class examlpe001{
17-
htmldoc page = new htmldoc();
18-
<b>htmldoc.CreateHTML(pagePath,pageName,pageTitle);</b>
19-
htmldoc.CloseHTML();
20-
}
21-
</code>
22-
the <code><b>htmldoc.CreateHTML();</b></code>it takes a few string parameters. pagePath is the folder of the page. next pagePath is the name of the page without the file extension . then pagePath is the text in the <code>&lt;title&lt;</code>the function creates the page but not fully,enable other functions to add code.this is when <code>htmldoc.CloseHTML();</code> come in. it close the file.if you want CanvaScript a Official way to add CSS to your application, add the parameter CSS,or
23-
<code>
24-
import canvascript.doc.htmldoc;
25-
class examlpe001{
26-
public css = "*{
27-
color: red;
28-
}"
29-
htmldoc page = new htmldoc();
30-
htmldoc.CreateHTML(pagePath,pageName,pageTitle,<b>css</b>);
31-
htmldoc.CloseHTML();
32-
}
33-
</code>
34-
##
10+
in order to use the libary use the
11+
```sh
12+
import cavnascript.core
13+
```
14+
15+
in this Tutorial we will make a simple blog that show the data from a file on the server.
16+
make a file call index.java.
17+
18+
```sh
19+
package com.example.index;
20+
21+
import canvascript.core;
22+
23+
class Index {
24+
25+
create("your/app/path","index.html","My CanvaScript App");
26+
render("<p>Hello CanvaScript World </p>")
27+
28+
}
29+
```

0 commit comments

Comments
 (0)