diff options
Diffstat (limited to 'template/src')
| -rw-r--r-- | template/src/index.html.rb | 12 | ||||
| -rw-r--r-- | template/src/script.js.rb | 13 | ||||
| -rw-r--r-- | template/src/style.css.rb | 13 |
3 files changed, 38 insertions, 0 deletions
diff --git a/template/src/index.html.rb b/template/src/index.html.rb new file mode 100644 index 0000000..cefcf6f --- /dev/null +++ b/template/src/index.html.rb @@ -0,0 +1,12 @@ +Paggio.html do + script type: "text/javascript", src: "script.js" + link rel: "stylesheet", href: "style.css" + h1 { "Hello world from Justicar" } + hr + h2.paggio do + 'Hello world from Paggio!' + end + p.paggio do + "This part was generated by Paggio in HTML :)" + end +end diff --git a/template/src/script.js.rb b/template/src/script.js.rb new file mode 100644 index 0000000..0be5ef5 --- /dev/null +++ b/template/src/script.js.rb @@ -0,0 +1,13 @@ +require 'opal' +require 'native' +require 'promise' +require 'browser/setup/full' + +$document.ready do + DOM do + h2.opal do + "Hello World from Opal!" + end + p.opal {"This part was generated by Opal from Javascript (:"} + end.append_to($document.body) +end diff --git a/template/src/style.css.rb b/template/src/style.css.rb new file mode 100644 index 0000000..d9684e3 --- /dev/null +++ b/template/src/style.css.rb @@ -0,0 +1,13 @@ +Paggio.css do + rule '.opal' do + color :dodgerblue + end + + rule '.paggio' do + color :goldenrod + end + + rule 'h1' do + font style: :italic + end +end |
