diff --git a/app.php b/app.php index 3855d7c..3cd4b4b 100644 --- a/app.php +++ b/app.php @@ -1,8 +1,4 @@ - + + + -
-
-
- - - -
-
- - -
- - strip_tags($_GET['arg'])], false); - } - $alerttype = MESSAGES[$_GET['msg']]['type']; - $alerticon = "square-o"; - switch (MESSAGES[$_GET['msg']]['type']) { - case "danger": - $alerticon = "times"; - break; - case "warning": - $alerticon = "exclamation-triangle"; - break; - case "info": - $alerticon = "info-circle"; - break; - case "success": - $alerticon = "check"; - break; - } - echo << -
+ if (!is_empty($_GET['msg']) && array_key_exists($_GET['msg'], MESSAGES)) { + // optional string generation argument + if (is_empty($_GET['arg'])) { + $alertmsg = lang(MESSAGES[$_GET['msg']]['string'], false); + } else { + $alertmsg = lang2(MESSAGES[$_GET['msg']]['string'], ["arg" => strip_tags($_GET['arg'])], false); + } + $alerttype = MESSAGES[$_GET['msg']]['type']; + $alerticon = "square-o"; + switch (MESSAGES[$_GET['msg']]['type']) { + case "danger": + $alerticon = "times"; + break; + case "warning": + $alerticon = "exclamation-triangle"; + break; + case "info": + $alerticon = "info-circle"; + break; + case "success": + $alerticon = "check"; + break; + } + echo << +
- $alertmsg + $alertmsg
END; - } - ?> + } + ?> + + var navbar_breakpoint = \"$navbar_breakpoint\";" + ?> + + +
- + \n"; diff --git a/index.php b/index.php index 0a629ff..0072492 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,4 @@ - - + -
-
-
-
- - - -
-
-
-

-
-
-
- -
- -
- - " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
- -
-
- - - -
- -
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- - - - -
-
-
-
-
- + + + \ No newline at end of file diff --git a/lib/gencontent.php b/lib/gencontent.php index 4a16725..75c8e6f 100644 --- a/lib/gencontent.php +++ b/lib/gencontent.php @@ -1,5 +1,4 @@ <?php echo htmlspecialchars($pubdata["pubname"] . " | " . date("Y-m-d", strtotime($pubdata["pubdate"]))); ?> -
-
-
-
-
- -
-
+
+
+ +
+
- +
" />
- @@ -101,26 +97,26 @@ foreach ($pubvars as $name => $val) { .pub-content { } - + - + .pub-content { background-image: url('data:image/png;base64,'); } - + get("page_sizes", ["sizewidth (width)", "sizeheight (height)"], ["sizeid" => $pubdata["page_size"]]); ?> .pub-content { max-width: ; height: ; } - + @media (max-width: 900px) { .pub-content { height: auto; min-height: ; } } - + .page-safe-line .bottom { top: calc( - 5mm); } @@ -131,7 +127,7 @@ foreach ($pubvars as $name => $val) { $styles = $database->select("tile_styles", ["styleid", "css"]); $tiles = $database->select("tiles", ["tileid", "page", "styleid", "content", "width", "order"], ["pubid" => $pub, "ORDER" => ["page", "order"]]); foreach ($styles as $style) { - ?> + ?> .tile-style- { } @@ -142,7 +138,7 @@ foreach ($tiles as $tile) { if ($tile["width"] > $pubdata["columns"]) { $tile["width"] = $pubdata["columns"]; } - ?> + ?> #tile- { order: ; width: %; @@ -163,6 +159,8 @@ foreach ($tiles as $tile) { } } +echo '
'; + foreach ($pages as $page) { ?>
@@ -178,9 +176,9 @@ foreach ($pages as $page) {
- + - +
-content" class="tile-style-"> @@ -196,16 +194,19 @@ foreach ($pages as $page) { "; + $content = ob_get_clean(); if (defined("HTML_ME") || !defined("IN_NEWSPEN")) { $contentcss = file_get_contents(__DIR__ . "/../static/css/content.css"); + $bootstrapcss = file_get_contents(__DIR__ . "/../static/css/bootstrap.min.css"); $title = htmlspecialchars($pubdata["pubname"] . " | " . date("Y-m-d", strtotime($pubdata["pubdate"]))); $content = "\n" . "\n" . "\n" . "$title\n" - . "\n" + . "\n" . "$content"; // Credit: https://stackoverflow.com/a/709684 $content = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $content); diff --git a/lib/getlisttable.php b/lib/getlisttable.php index f3fcea2..4faf024 100644 --- a/lib/getlisttable.php +++ b/lib/getlisttable.php @@ -75,11 +75,11 @@ $out['recordsFiltered'] = $recordsFiltered; $usercache = []; for ($i = 0; $i < count($lists); $i++) { if ($lists[$i]["uid"] == $_SESSION['uid']) { - $lists[$i]["editbtn"] = ' ' . lang("edit", false) . ''; + $lists[$i]["editbtn"] = ' ' . lang("edit", false) . ''; } else { - $lists[$i]["editbtn"] = ' ' . lang("view", false) . ''; + $lists[$i]["editbtn"] = ' ' . lang("view", false) . ''; } - $lists[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; + $lists[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; if (is_null($lists[$i]['uid'])) { $lists[$i]["username"] = ""; } else { diff --git a/lib/getpubtable.php b/lib/getpubtable.php index f668abf..ad1740f 100644 --- a/lib/getpubtable.php +++ b/lib/getpubtable.php @@ -109,11 +109,11 @@ $out['recordsFiltered'] = $recordsFiltered; $usercache = []; for ($i = 0; $i < count($pubs); $i++) { if ($pubs[$i]["uid"] == $_SESSION['uid']) { - $pubs[$i]["editbtn"] = ' ' . lang("edit", false) . ''; + $pubs[$i]["editbtn"] = ' ' . lang("edit", false) . ''; } else { - $pubs[$i]["editbtn"] = ' ' . lang("view", false) . ''; + $pubs[$i]["editbtn"] = ' ' . lang("view", false) . ''; } - $pubs[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; + $pubs[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; $pubs[$i]["pubdate"] = date(DATETIME_FORMAT, strtotime($pubs[$i]["pubdate"])); if (is_null($pubs[$i]['uid'])) { $pubs[$i]["username"] = ""; diff --git a/nbproject/project.properties b/nbproject/project.properties index 044602b..b7341d2 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,3 +1,7 @@ +auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options= +auxiliary.org-netbeans-modules-css-prep.sass_2e_configured=true +auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=true +auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css auxiliary.org-netbeans-modules-html-editor-lib.default-html-public-id=-//W3C//DTD HTML 4.01 Transitional//EN include.path=${php.global.include.path} php.version=PHP_70 diff --git a/pages.php b/pages.php index c9bfc44..4951373 100644 --- a/pages.php +++ b/pages.php @@ -10,7 +10,7 @@ define("PAGES", [ "home" => [ "title" => "home", "navbar" => true, - "icon" => "home", + "icon" => "fas fa-home", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -30,20 +30,20 @@ define("PAGES", [ "content" => [ "title" => "content", "navbar" => true, - "icon" => "paragraph", + "icon" => "fas fa-paragraph", "styles" => [ - "static/css/summernote.css", + "static/css/summernote-lite.css", "static/css/content.css", ], "scripts" => [ - "static/js/summernote.min.js", + "static/js/summernote-lite.js", "static/js/content.js" ] ], "maillist" => [ "title" => "mailing lists", "navbar" => true, - "icon" => "envelope", + "icon" => "fas fa-envelope", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" diff --git a/pages/404.php b/pages/404.php index 751ccba..21110a2 100644 --- a/pages/404.php +++ b/pages/404.php @@ -3,9 +3,10 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + ?> -
-
+
+

\ No newline at end of file diff --git a/pages/content.php b/pages/content.php index fb8d46e..b39b405 100644 --- a/pages/content.php +++ b/pages/content.php @@ -48,7 +48,7 @@ if ($pub === false) { ?> - +