Author: Braulio Bhavamitra <braulio@prout.io>
stores_app: port to riot tags
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/plugins/stores_app/public/javascripts/stores_app_plugin/store.js b/plugins/stores_app/public/javascripts/stores_app_plugin/store.js new file mode 100644 index 0000000000000000000000000000000000000000..c67e3a529fbd3411a816dbf437c73a3fe6ccf8f8 --- /dev/null +++ b/plugins/stores_app/public/javascripts/stores_app_plugin/store.js @@ -0,0 +1,8 @@ + +window.store = { + + load: () => { + riot.mount('app') + }, + +} diff --git a/plugins/stores_app/views/layouts/stores_app_plugin/_head.slim b/plugins/stores_app/views/layouts/stores_app_plugin/_head.slim index 09afb93a83018f3e01af807a94fd3bb6d093ed4f..d36684c3f14f2f2b2f56748b4c430e08609fdfa0 100644 --- a/plugins/stores_app/views/layouts/stores_app_plugin/_head.slim +++ b/plugins/stores_app/views/layouts/stores_app_plugin/_head.slim @@ -1,3 +1,5 @@ +meta name='viewport' content='width=device-width, initial-scale=1.0' + = stylesheet_link_tag 'stores_app_plugin/vendor/material' = javascript_include_tag 'stores_app_plugin/vendor/material' link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons' @@ -5,5 +7,5 @@ = javascript_include_tag 'stores_app_plugin/vendor/riot' = stylesheet_link_tag 'stores_app_plugin/style' - += javascript_include_tag 'stores_app_plugin/store' diff --git a/plugins/stores_app/views/layouts/stores_app_plugin/_header.slim b/plugins/stores_app/views/layouts/stores_app_plugin/_header.slim deleted file mode 100644 index 7ddf73e6165a8f66a9b47fc6a6da16bdd8051180..0000000000000000000000000000000000000000 --- a/plugins/stores_app/views/layouts/stores_app_plugin/_header.slim +++ /dev/null @@ -1,9 +0,0 @@ -header class='mdl-layout__header mdl-layout__header--transparent' - div class='mdl-layout__header-row' - span class='mdl-layout-title' Title - div class='mdl-layout-spacer' - nav class='mdl-navigation' - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link diff --git a/plugins/stores_app/views/layouts/stores_app_plugin/_menu.slim b/plugins/stores_app/views/layouts/stores_app_plugin/_menu.slim deleted file mode 100644 index ddde8e607e7a7d31509e32e5c1f04c850f28a3a4..0000000000000000000000000000000000000000 --- a/plugins/stores_app/views/layouts/stores_app_plugin/_menu.slim +++ /dev/null @@ -1,8 +0,0 @@ -div class='mdl-layout__drawer' - span class='mdl-layout-title' Title - nav class='mdl-navigation' - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link - a class='mdl-navigation__link' href='' Link - diff --git a/plugins/stores_app/views/layouts/stores_app_plugin/_tags.slim b/plugins/stores_app/views/layouts/stores_app_plugin/_tags.slim new file mode 100644 index 0000000000000000000000000000000000000000..80884d4c69ab665ac648ea1c4c59eb924d45f381 --- /dev/null +++ b/plugins/stores_app/views/layouts/stores_app_plugin/_tags.slim @@ -0,0 +1,4 @@ += javascript_include_tag 'stores_app_plugin/tags/app' += javascript_include_tag 'stores_app_plugin/tags/app/header' += javascript_include_tag 'stores_app_plugin/tags/app/menu' += javascript_include_tag 'stores_app_plugin/tags/app/tabs' diff --git a/plugins/stores_app/views/layouts/stores_app_plugin/layout.html.slim b/plugins/stores_app/views/layouts/stores_app_plugin/layout.html.slim index c376a95d47975e0abea5c492f182fbe1e4aa3088..7145c1bc0f392282fd0ae1184b9db64bd89309fe 100644 --- a/plugins/stores_app/views/layouts/stores_app_plugin/layout.html.slim +++ b/plugins/stores_app/views/layouts/stores_app_plugin/layout.html.slim @@ -4,15 +4,13 @@ html head title = profile.name - = render 'layouts/stores_app_plugin/head' body - - div class='layout-transparent mdl-layout mdl-js-layout' + app - = render 'layouts/stores_app_plugin/header' - = render 'layouts/stores_app_plugin/menu' + = render 'layouts/stores_app_plugin/tags' + javascript: + window.profile = {name: #{profile.name.to_json}} + store.load() - main class='mdl-layout__content' - = yield diff --git a/plugins/stores_app/views/stores_app_plugin/application/index.slim b/plugins/stores_app/views/stores_app_plugin/application/index.slim index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 --- a/plugins/stores_app/views/stores_app_plugin/application/index.slim +++ b/plugins/stores_app/views/stores_app_plugin/application/index.slim @@ -0,0 +1 @@ +