From 911e3283f93a534a1bcd190a0d8f1a6b81c02c3d Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 3 Feb 2018 22:23:42 -0700 Subject: [PATCH] Upgrade to Bootstrap 4.0, FontAwesome 5.0, etc --- app.php | 246 +- index.php | 121 +- lib/gencontent.php | 45 +- lib/getlisttable.php | 6 +- lib/getpubtable.php | 6 +- nbproject/project.properties | 4 + pages.php | 10 +- pages/404.php | 5 +- pages/content.php | 32 +- pages/editlist.php | 22 +- pages/editpub.php | 46 +- pages/home.php | 34 +- pages/maillist.php | 14 +- .../content-reboot.scssc | Bin 0 -> 61428 bytes static/css/app.css | 115 +- static/css/bootstrap.min.css | 16 +- static/css/content.css | 3 +- static/css/datatables.min.css | 10 +- static/css/fa-svg-with-js.css | 343 + static/css/font-awesome.min.css | 4 - static/{fonts => css/font}/summernote.eot | Bin 16574 -> 16570 bytes static/{fonts => css/font}/summernote.ttf | Bin 16388 -> 16384 bytes static/css/font/summernote.woff | Bin 0 -> 10184 bytes static/css/index.css | 11 + static/css/material-color | 2 +- static/css/summernote-bs4.css | 1 + static/css/summernote-lite.css | 1 + static/css/summernote.css | 1 - static/css/tables.css | 112 - static/fonts/FontAwesome.otf | Bin 134808 -> 0 bytes static/fonts/fontawesome-webfont.eot | Bin 165742 -> 0 bytes static/fonts/fontawesome-webfont.svg | 2671 ------ static/fonts/fontawesome-webfont.ttf | Bin 165548 -> 0 bytes static/fonts/fontawesome-webfont.woff | Bin 98024 -> 0 bytes static/fonts/fontawesome-webfont.woff2 | Bin 77160 -> 0 bytes static/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes static/fonts/glyphicons-halflings-regular.svg | 288 - static/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes static/fonts/summernote.woff | Bin 10196 -> 0 bytes static/js/bootstrap.min.js | 12 +- static/js/datatables.min.js | 431 +- static/js/fontawesome-all.min.js | 5 + static/js/jquery-3.2.1.min.js | 4 - static/js/jquery-3.3.1.min.js | 2 + static/js/lang/summernote-ar-AR.js | 155 + static/js/lang/summernote-bg-BG.js | 155 + static/js/lang/summernote-ca-ES.js | 155 + static/js/lang/summernote-cs-CZ.js | 149 + static/js/lang/summernote-da-DK.js | 155 + static/js/lang/summernote-de-DE.js | 154 + static/js/lang/summernote-el-GR.js | 155 + static/js/lang/summernote-es-ES.js | 155 + static/js/lang/summernote-es-EU.js | 154 + static/js/lang/summernote-fa-IR.js | 155 + static/js/lang/summernote-fi-FI.js | 153 + static/js/lang/summernote-fr-FR.js | 155 + static/js/lang/summernote-gl-ES.js | 155 + static/js/lang/summernote-he-IL.js | 155 + static/js/lang/summernote-hr-HR.js | 155 + static/js/lang/summernote-hu-HU.js | 155 + static/js/lang/summernote-id-ID.js | 155 + static/js/lang/summernote-it-IT.js | 155 + static/js/lang/summernote-ja-JP.js | 155 + static/js/lang/summernote-ko-KR.js | 155 + static/js/lang/summernote-lt-LT.js | 155 + static/js/lang/summernote-lt-LV.js | 155 + static/js/lang/summernote-mn-MN.js | 157 + static/js/lang/summernote-nb-NO.js | 154 + static/js/lang/summernote-nl-NL.js | 155 + static/js/lang/summernote-pl-PL.js | 155 + static/js/lang/summernote-pt-BR.js | 155 + static/js/lang/summernote-pt-PT.js | 154 + static/js/lang/summernote-ro-RO.js | 155 + static/js/lang/summernote-ru-RU.js | 155 + static/js/lang/summernote-sk-SK.js | 153 + static/js/lang/summernote-sl-SI.js | 155 + static/js/lang/summernote-sr-RS-Latin.js | 155 + static/js/lang/summernote-sr-RS.js | 155 + static/js/lang/summernote-sv-SE.js | 155 + static/js/lang/summernote-ta-IN.js | 155 + static/js/lang/summernote-th-TH.js | 155 + static/js/lang/summernote-tr-TR.js | 155 + static/js/lang/summernote-uk-UA.js | 155 + static/js/lang/summernote-vi-VN.js | 155 + static/js/lang/summernote-zh-CN.js | 155 + static/js/lang/summernote-zh-TW.js | 155 + .../databasic/summernote-ext-databasic.css | 16 + .../databasic/summernote-ext-databasic.js | 292 + .../js/plugin/hello/summernote-ext-hello.js | 81 + .../summernote-ext-specialchars.js | 312 + static/js/summernote-bs4.min.js | 3 + static/js/summernote-lite.js | 7798 +++++++++++++++++ static/js/summernote.min.js | 6 - 95 files changed, 15901 insertions(+), 3728 deletions(-) create mode 100644 static/css/.sass-cache/1e1b6123428f29f59f5e636e7e011e95082d37f9/content-reboot.scssc create mode 100644 static/css/fa-svg-with-js.css delete mode 100644 static/css/font-awesome.min.css rename static/{fonts => css/font}/summernote.eot (71%) rename static/{fonts => css/font}/summernote.ttf (71%) create mode 100644 static/css/font/summernote.woff create mode 100644 static/css/index.css create mode 100644 static/css/summernote-bs4.css create mode 100644 static/css/summernote-lite.css delete mode 100644 static/css/summernote.css delete mode 100644 static/css/tables.css delete mode 100644 static/fonts/FontAwesome.otf delete mode 100644 static/fonts/fontawesome-webfont.eot delete mode 100644 static/fonts/fontawesome-webfont.svg delete mode 100644 static/fonts/fontawesome-webfont.ttf delete mode 100644 static/fonts/fontawesome-webfont.woff delete mode 100644 static/fonts/fontawesome-webfont.woff2 delete mode 100644 static/fonts/glyphicons-halflings-regular.eot delete mode 100644 static/fonts/glyphicons-halflings-regular.svg delete mode 100644 static/fonts/glyphicons-halflings-regular.ttf delete mode 100644 static/fonts/glyphicons-halflings-regular.woff delete mode 100644 static/fonts/glyphicons-halflings-regular.woff2 delete mode 100644 static/fonts/summernote.woff create mode 100644 static/js/fontawesome-all.min.js delete mode 100644 static/js/jquery-3.2.1.min.js create mode 100644 static/js/jquery-3.3.1.min.js create mode 100644 static/js/lang/summernote-ar-AR.js create mode 100644 static/js/lang/summernote-bg-BG.js create mode 100644 static/js/lang/summernote-ca-ES.js create mode 100644 static/js/lang/summernote-cs-CZ.js create mode 100644 static/js/lang/summernote-da-DK.js create mode 100644 static/js/lang/summernote-de-DE.js create mode 100644 static/js/lang/summernote-el-GR.js create mode 100644 static/js/lang/summernote-es-ES.js create mode 100644 static/js/lang/summernote-es-EU.js create mode 100644 static/js/lang/summernote-fa-IR.js create mode 100644 static/js/lang/summernote-fi-FI.js create mode 100644 static/js/lang/summernote-fr-FR.js create mode 100644 static/js/lang/summernote-gl-ES.js create mode 100644 static/js/lang/summernote-he-IL.js create mode 100644 static/js/lang/summernote-hr-HR.js create mode 100644 static/js/lang/summernote-hu-HU.js create mode 100644 static/js/lang/summernote-id-ID.js create mode 100644 static/js/lang/summernote-it-IT.js create mode 100644 static/js/lang/summernote-ja-JP.js create mode 100644 static/js/lang/summernote-ko-KR.js create mode 100644 static/js/lang/summernote-lt-LT.js create mode 100644 static/js/lang/summernote-lt-LV.js create mode 100644 static/js/lang/summernote-mn-MN.js create mode 100644 static/js/lang/summernote-nb-NO.js create mode 100644 static/js/lang/summernote-nl-NL.js create mode 100644 static/js/lang/summernote-pl-PL.js create mode 100644 static/js/lang/summernote-pt-BR.js create mode 100644 static/js/lang/summernote-pt-PT.js create mode 100644 static/js/lang/summernote-ro-RO.js create mode 100644 static/js/lang/summernote-ru-RU.js create mode 100644 static/js/lang/summernote-sk-SK.js create mode 100644 static/js/lang/summernote-sl-SI.js create mode 100644 static/js/lang/summernote-sr-RS-Latin.js create mode 100644 static/js/lang/summernote-sr-RS.js create mode 100644 static/js/lang/summernote-sv-SE.js create mode 100644 static/js/lang/summernote-ta-IN.js create mode 100644 static/js/lang/summernote-th-TH.js create mode 100644 static/js/lang/summernote-tr-TR.js create mode 100644 static/js/lang/summernote-uk-UA.js create mode 100644 static/js/lang/summernote-vi-VN.js create mode 100644 static/js/lang/summernote-zh-CN.js create mode 100644 static/js/lang/summernote-zh-TW.js create mode 100644 static/js/plugin/databasic/summernote-ext-databasic.css create mode 100644 static/js/plugin/databasic/summernote-ext-databasic.js create mode 100644 static/js/plugin/hello/summernote-ext-hello.js create mode 100644 static/js/plugin/specialchars/summernote-ext-specialchars.js create mode 100644 static/js/summernote-bs4.min.js create mode 100644 static/js/summernote-lite.js delete mode 100644 static/js/summernote.min.js 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) { ?> - +