diff --git a/app.riot b/app.riot deleted file mode 100644 index 40fca6e..0000000 --- a/app.riot +++ /dev/null @@ -1,5 +0,0 @@ - -

- {props.message} -

-
\ No newline at end of file diff --git a/index.html b/index.html index 655c8f0..5927a28 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,11 @@ - - Riot App + + Riot Template - + diff --git a/index.js b/index.js index f800199..9d59cb9 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ -import * as riot from 'riot'; -import app from "./app.riot"; +import Registery from './pages/registery.js'; -riot.register('app', app); -riot.mount('app', {message: 'Hello Riot'}); \ No newline at end of file +// globally register all pages +Registery(); diff --git a/pages/hello-riot/hello-riot.riot b/pages/hello-riot/hello-riot.riot new file mode 100644 index 0000000..5dd1cab --- /dev/null +++ b/pages/hello-riot/hello-riot.riot @@ -0,0 +1,52 @@ + +
+ +

Welcome to Your Riot.js Application

+ +

+ Start your development with + Riot a component-based ui library running on the + Vite frontend tooling. +

+ +

Getting Started

+

+ This page is found at pages/hello-riot/hello-riot.riot, +
and is auto-mounted via pages/registry.js. +

+ many mounting strategies exist, this is but one! +

+

+ +

Documentation

+ + + +

Ecosystem

+ + +
+ + +
\ No newline at end of file diff --git a/pages/registery.js b/pages/registery.js new file mode 100644 index 0000000..351ed7e --- /dev/null +++ b/pages/registery.js @@ -0,0 +1,21 @@ +import {register, mount} from 'riot'; +import HelloRiot from './hello-riot/hello-riot.riot'; + +/* + Add Global Pages to registry +*/ +const Registry = { + 'hello-riot': HelloRiot +}; + +export default () => { + Object.entries(Registry).map(([name, component]) => { + register(name, component); + mount(name); + + return { + name, + component + } + }); +} diff --git a/public/assets/images/square.svg b/public/assets/images/square.svg new file mode 100644 index 0000000..f3dbef6 --- /dev/null +++ b/public/assets/images/square.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/style.css b/public/assets/style.css deleted file mode 100644 index 924d762..0000000 --- a/public/assets/style.css +++ /dev/null @@ -1,6 +0,0 @@ -body {font-size: 1.2em;margin:0;padding:0} - -.hero { - text-align: center; - margin: 30vh 0; -} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..5ac0680 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/main.css b/public/main.css new file mode 100644 index 0000000..0910479 --- /dev/null +++ b/public/main.css @@ -0,0 +1,25 @@ +body { + font-size: 1.2em; + margin:0; + padding:0; + color: #FFF; + background: #222; + +} + +a {color: #ED1} + +code {color: gray;} + +.links { + display: flex; + justify-content: space-evenly; + text-align: center; +} + +.splash { + font-size: larger; + text-align: center; + margin: 8vh auto; + width: 620px; +} \ No newline at end of file