+
+
-
showContent('body');?>
+
showContent('body');?>
diff --git a/content/modules/Admin.php b/content/modules/Admin.php
index a4ab111..cb6a0a4 100644
--- a/content/modules/Admin.php
+++ b/content/modules/Admin.php
@@ -58,8 +58,8 @@
$this->register('get-panel-links',function(){
return [
["title"=>"Dashboard","link"=>"?page=admin/dashboard","icon"=>"gauge"],
- ["title"=>"Users","link"=>"?page=admin/users","icon"=>"user"],
- ["title"=>"Pages","link"=>"?page=admin/pages","icon"=>"file"],
+ ["title"=>"Usuarios","link"=>"?page=admin/users","icon"=>"user"],
+ ["title"=>"Paginas","link"=>"?page=admin/pages","icon"=>"file"],
["title"=>"Test","link"=>"?page=admin/test","icon"=>"vial-virus"],
];
});
diff --git a/content/pages/admin/dashboard.json b/content/pages/admin/dashboard.json
index d703b37..ebbdc0b 100644
--- a/content/pages/admin/dashboard.json
+++ b/content/pages/admin/dashboard.json
@@ -20,7 +20,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"content": [
{
"@": "html",
diff --git a/content/pages/admin/page-edit.json b/content/pages/admin/page-edit.json
index 2cb34ec..25cb336 100644
--- a/content/pages/admin/page-edit.json
+++ b/content/pages/admin/page-edit.json
@@ -26,7 +26,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"title":"Editando {page-id}",
"content": [
{
diff --git a/content/pages/admin/pages.json b/content/pages/admin/pages.json
index 1db6b56..767009e 100644
--- a/content/pages/admin/pages.json
+++ b/content/pages/admin/pages.json
@@ -26,7 +26,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"content": [
{
"@": "list",
diff --git a/content/pages/admin/test.json b/content/pages/admin/test.json
index cf61129..2906df6 100644
--- a/content/pages/admin/test.json
+++ b/content/pages/admin/test.json
@@ -20,7 +20,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"html": "
Welcome to
Conjuro!!"
},
{
diff --git a/content/pages/admin/user-edit.json b/content/pages/admin/user-edit.json
index 6bfd3e7..34a20e7 100644
--- a/content/pages/admin/user-edit.json
+++ b/content/pages/admin/user-edit.json
@@ -32,7 +32,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"content": [
{
"@": "list",
diff --git a/content/pages/admin/users.json b/content/pages/admin/users.json
index d49ec1f..08864dc 100644
--- a/content/pages/admin/users.json
+++ b/content/pages/admin/users.json
@@ -26,7 +26,7 @@
],
"body": [
{
- "@": "admin-tile",
+ "@": "admin-section",
"content": [
{
"@": "list",
diff --git a/media/admin/builder.js b/media/admin/builder.js
index 1013902..cca12ac 100644
--- a/media/admin/builder.js
+++ b/media/admin/builder.js
@@ -18,6 +18,21 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-var builder = new (function () {
+var builder = (function () {
+ var meta;
+ var root;
+ function init(pageMeta) {
+ meta = pageMeta;
+ root = document.body.querySelector("#page-builder");
+ refresh();
+ }
+
+ function refresh(){
+ µWeb.populate(root,meta);
+ }
+
+ return {
+ init: init,
+ }
})();
\ No newline at end of file
diff --git a/media/admin/style.css b/media/admin/style.css
index f497f6c..c42a1ce 100644
--- a/media/admin/style.css
+++ b/media/admin/style.css
@@ -77,6 +77,7 @@
background-size: 100% 130px;
overflow-y: auto;
overflow-x: hidden;
+ flex:1;
}
#content-header {
@@ -228,11 +229,11 @@
}
/* control::builder */
-.page-builder .caption{
+#page-builder .caption{
text-decoration: underline;
}
-.page-builder .info{
+#page-builder .info{
font-size: 0.7em;
/*background-color: #fefff0;*/
margin:0.2rem 0;
@@ -341,6 +342,8 @@
border: 3px solid var(--scroll-bar-bg-color);
}
+/**** Layouting ****/
+
.layout {
display: flex;
}
@@ -358,7 +361,7 @@
}
.layout.big-gap {
- gap: 1rem;
+ gap: 1.1rem;
}
.layout.horizontal.reverse {
@@ -369,10 +372,33 @@
flex-direction: column-reverse;
}
-.main {
+.layout>.main {
flex: 1;
}
+.layout.horizontal>.main {
+ min-width: 0;
+}
+.layout.vertical>.main {
+ min-height: 0;
+}
+
+.layout>.main.master {
+ flex: 0.7;
+}
+
+.layout>.main.detail {
+ flex: 1.3;
+}
+
+.layout>.main.c80-20:first-child {
+ flex: 0.8;
+}
+
+.layout>.main.c80-20:last-child {
+ flex: 0.2;
+}
+
.layout.horizontal.left {
justify-content: flex-start;
}
@@ -419,4 +445,4 @@
.layout.vertical.bottom {
justify-content: flex-end;
-}
\ No newline at end of file
+}
diff --git a/media/muWeb.js b/media/muWeb.js
index 54c33e3..6e1a864 100644
--- a/media/muWeb.js
+++ b/media/muWeb.js
@@ -1,5 +1,5 @@
-/* µWeb 1.0 Web development micro-framework
- * Copyright 2022 XWolfOverride
+/* µWeb 1.1 Web development micro-framework
+ * Copyright 2022-2023 XWolfOverride
*
* Licensed under the MIT License
*
@@ -62,7 +62,7 @@
* Generates a repetition of elements from a source of data
* @param {dom} template Template dom
* @param {function} fncreated Element created callback
- * @param {scting} idBase base id of repetition for each iteration (only for elements with id)
+ * @param {string} idBase base id of repetition for each iteration (only for elements with id)
* @returns Repeater instance API
*/
function repeater(template, fncreated, idBase) {
@@ -113,10 +113,18 @@
}
}
- function populate(dom, data, idBase, link) {
+ /**
+ * Popupate data into a page, actual page data is removed and new data is filled.
+ * @param {dom} dom Template dom to repeat
+ * @param {*} data Data source of repetition
+ * @param {string} idBase base id of repetition for each iteration (only for elements with id)
+ * @param {*} tag data to set on ._tag
+ */
+ function populate(dom, data, idBase, tag) {
if (dom.id && idBase)
dom.id = idBase + dom.id;
- dom._link = link;
+ dom._tag = tag;
+ dom._data=data;
// process dataset:
for (var k in dom.dataset) {
var d = data[dom.dataset[k]];
@@ -128,7 +136,7 @@
}
// go to childs
for (var i in dom.children)
- populate(dom.children[i], data, idBase, link);
+ populate(dom.children[i], data, idBase, tag);
}
return {