From 76589c7604fe9312011f8af4238f55d727b66670 Mon Sep 17 00:00:00 2001 From: oldkid Date: Wed, 26 Mar 2025 13:49:40 +0100 Subject: [PATCH] Initial commit --- postbox/README.md | 108 +++++++++++++++ postbox/postbox.css | 120 +++++++++++++++++ postbox/postbox.min.css | 1 + postbox/postbox.php | 21 +++ usernotice/css/usernotice.css | 72 ++++++++++ usernotice/templates/admin.tpl | 5 + usernotice/usernotice.php | 105 +++++++++++++++ zen-postbox/README.md | 79 +++++++++++ zen-postbox/view/.gitkeep | 0 zen-postbox/view/default.min.css | 1 + zen-postbox/view/default.png | Bin 0 -> 2994 bytes zen-postbox/view/default.svg | 1 + zen-postbox/view/duepuntozero.min.css | 1 + zen-postbox/view/frio.min.css | 1 + zen-postbox/view/postbox.min.css | 1 + zen-postbox/view/quattro.min.css | 1 + zen-postbox/view/smoothly.min.css | 1 + zen-postbox/view/src/.gitkeep | 0 zen-postbox/view/src/default.css | 37 ++++++ zen-postbox/view/src/duepuntozero.css | 68 ++++++++++ zen-postbox/view/src/frio.css | 69 ++++++++++ zen-postbox/view/src/postbox.css | 120 +++++++++++++++++ zen-postbox/view/src/quattro.css | 54 ++++++++ zen-postbox/view/src/smoothly.css | 63 +++++++++ zen-postbox/view/src/vier.css | 60 +++++++++ zen-postbox/view/vier.min.css | 1 + zen-postbox/zen_postbox.php | 184 ++++++++++++++++++++++++++ 27 files changed, 1174 insertions(+) create mode 100644 postbox/README.md create mode 100644 postbox/postbox.css create mode 100644 postbox/postbox.min.css create mode 100644 postbox/postbox.php create mode 100644 usernotice/css/usernotice.css create mode 100644 usernotice/templates/admin.tpl create mode 100644 usernotice/usernotice.php create mode 100644 zen-postbox/README.md create mode 100644 zen-postbox/view/.gitkeep create mode 100644 zen-postbox/view/default.min.css create mode 100644 zen-postbox/view/default.png create mode 100644 zen-postbox/view/default.svg create mode 100644 zen-postbox/view/duepuntozero.min.css create mode 100644 zen-postbox/view/frio.min.css create mode 100644 zen-postbox/view/postbox.min.css create mode 100644 zen-postbox/view/quattro.min.css create mode 100644 zen-postbox/view/smoothly.min.css create mode 100644 zen-postbox/view/src/.gitkeep create mode 100644 zen-postbox/view/src/default.css create mode 100644 zen-postbox/view/src/duepuntozero.css create mode 100644 zen-postbox/view/src/frio.css create mode 100644 zen-postbox/view/src/postbox.css create mode 100644 zen-postbox/view/src/quattro.css create mode 100644 zen-postbox/view/src/smoothly.css create mode 100644 zen-postbox/view/src/vier.css create mode 100644 zen-postbox/view/vier.min.css create mode 100644 zen-postbox/zen_postbox.php diff --git a/postbox/README.md b/postbox/README.md new file mode 100644 index 0000000..73282f2 --- /dev/null +++ b/postbox/README.md @@ -0,0 +1,108 @@ +# Postbox + +This is a Friendica add-on that adds a stylesheet to the HEAD element to support showing Postbox styling. + +It does not add any interface for creating Postboxes, but users can still create them with BBcode. + +_**NOTE:** Support for Postbox is built into Bookface 1.6+. This adddon adds support to Friendica regardless of what theme/scheme is being used._ + +## Getting started + +1. Place the "postbox" folder in your _friendica/addons_ subfolder. +2. Go to the Main _Menu > Admin > Addons_ and enable "Postbox" +3. Any posts using Postbox will now display the colorful backgrounds. + +## Using Zen Postbox + +1. Open the message Compose modal or Page +2. Type `[class=postbox-red]Wrapped text goes here[/class]` (substitute "-red" with any of the available styles) +3. Press the "Preview" tab to see what it will look like. + +While Postbox allows more content than the Facebook version (which is text only), there are limitations due to how Friendica parses BBcode. + +**It is STRONGLY recommended you only use Postboxes with text and emoji.** + +BBcodes you CANNOT put inside a Postbox: + +* [class] (which means you can’t nest Postboxes) +* [hr] +* [h1],[h2],[h3], etc… +* [table],[tr],[th],[td] +* [list],[ul],[ol] +* [abstract] +* [spoiler] +* [map] +* [code] + +BBcodes that do not work as intended inside a Postbox: + +* [pre] +* [noparse] +* [nobb] + +The text will show but will be styled and centered. + +BBcodes that **CAN BE INSIDE** a Postbox: +* [i], [b], [u], [o], [s] _(bold has no visible effect)_ +* [url] +* [img] +* [audio] +* [video] + +And any plain text, including emoji + +If you are using Markdown formatting what you can and can’t put in a Postbox is similar, with the exception that (because of how Markdown is parsed into BBcode) you can’t have both a URL and an image in the same Postbox. You *can* however put inline `code` in a Postbox with Markdown where BBcode cannot. + + + +### Available Postbox styles + +**Solid Color Backgrounds:** + +- .postbox-black +- .postbox-red +- .postbox-green +- .postbox-blue +- .postbox-orange +- .postbox-purple +- .postbox-forest +- .postbox-ocean +- .postbox-pink +- .postbox-salmon + + +**Gradient Backgrounds:** + +- .postbox-darkgray +- .postbox-minty +- .postbox-mintgray +- .postbox-redblue +- .postbox-violets +- .postbox-grayblack +- .postbox-tealblue +- .postbox-greengray +- .postbox-tealgray +- .postbox-bluegray +- .postbox-lavendergray +- .postbox-sunset +- .postbox-sherbert + + + +## Known Issues + +- Postboxes are not shown on other platforms when your post is shared. +- Postboxes are not shown in third-party apps (at least none do yet) + +## Changelog +1.0 (25 March 2025) +* Initial Release for Friendica 'Interrupted Fern' 2024.12 + +## Authors and acknowledgment +Random Penguin + +## License +AGPL + +## Project status +Unsupported by Friendica devs. \ No newline at end of file diff --git a/postbox/postbox.css b/postbox/postbox.css new file mode 100644 index 0000000..7e7fb87 --- /dev/null +++ b/postbox/postbox.css @@ -0,0 +1,120 @@ + /* Post Backgrounds + ================ + Solid and Gradient backgrounds with larger text + to grab reader attention + */ + [class^="postbox-"]{ + display: table-cell; + height: 350px; + width: 1000px; + max-width: 100%; + vertical-align: middle; + font-family: Arial, sans-serif; + font-size: 30px; + font-weight: 700; + line-height: 35px; + text-align: center; + padding: 50px 30px; + box-sizing: border-box; + } + [class^="postbox-"] a { + color: inherit !important; + } + [class^="postbox-"]:hover a, + [class^="postbox-"]:focus a { + text-decoration: underline; + } + /* Solid Color Backgrounds */ + .postbox-black { + background-color: black; + color: white; + } + .postbox-red { + background-color: rgb(226, 1, 59); + color: white; + } + .postbox-green { + background-color: rgb(38, 146, 127); + color: white; + } + .postbox-blue { + background-color: rgb(32, 136, 175); + color: black; + } + .postbox-orange { + background-color: rgb(255, 99, 35); + color: black; + } + .postbox-purple { + background-color: rgb(115, 33, 173); + color: white; + } + .postbox-forest { + background-color: rgb(22, 83, 72); + color: white; + } + .postbox-ocean { + background-color: rgb(36, 55, 98); + color: white; + } + .postbox-pink { + background-color: rgb(243, 83, 105); + color: black; + } + .postbox-salmon { + background-color: rgb(250, 128, 114); + color: black; + } + /* Gradient Backgrounds */ + .postbox-darkgray { + background-image: linear-gradient(135deg, rgb(119, 125, 136), rgb(79, 87, 102)); + color: white; + } + .postbox-minty { + background-image: linear-gradient(135deg, rgb(143, 199, 173), rgb(72, 229, 169)); + color: black; + } + .postbox-mintgray { + background-image: linear-gradient(135deg, rgb(143, 199, 173), rgb(72, 229, 169)); + color: black; + } + .postbox-redblue { + background-image: linear-gradient(45deg, rgb(255, 0, 71), rgb(44, 52, 199)); + color: white; + } + .postbox-violets { + background-image: linear-gradient(45deg, rgb(93, 63, 218), rgb(252, 54, 253)); + color: white; + } + .postbox-grayblack { + background-image: linear-gradient(45deg, rgb(93, 99, 116), rgb(22, 24, 29)); + color: white; + } + .postbox-tealblue { + background-image: linear-gradient(to bottom, #4bdfdf 0%,#207cca 50%,#19094a 100%); + color: white; + } + .postbox-greengray { + background-image: linear-gradient(to right, #c8dbbd 0%,#dedede 100%); + color: black; + } + .postbox-tealgray { + background-image: linear-gradient(to right, #8dcad0 0%,#dedede 100%); + color: black; + } + .postbox-bluegray { + background-image: linear-gradient(to right, #94bbeb 0%,#dedede 100%); + color: black; + } + .postbox-lavendergray { + background-image: linear-gradient(to right, #cfbfda 0%,#dedede 100%); + color: black; + } + .postbox-sunset { + background-image: linear-gradient(to bottom, #fecf41 0%,#fd7440 50%,#b623b1 100%); + color: white; + } + .postbox-sherbert { + background-image: linear-gradient(45deg, #fcd6cd 6%,#f8bc44 25%,#fb7d88 44%,#fb7d88 64%,#fb7d88 64%,#fed640 100%); + color: black; + } \ No newline at end of file diff --git a/postbox/postbox.min.css b/postbox/postbox.min.css new file mode 100644 index 0000000..64e1a32 --- /dev/null +++ b/postbox/postbox.min.css @@ -0,0 +1 @@ +[class^=postbox-]{display:table-cell;height:350px;width:1000px;max-width:100%;vertical-align:middle;font-family:Arial,sans-serif;font-size:30px;font-weight:700;line-height:35px;text-align:center;padding:50px 30px;box-sizing:border-box}[class^=postbox-] a{color:inherit!important}[class^=postbox-]:focus a,[class^=postbox-]:hover a{text-decoration:underline}.postbox-black{background-color:#000;color:#fff}.postbox-red{background-color:#e2013b;color:#fff}.postbox-green{background-color:#26927f;color:#fff}.postbox-blue{background-color:#2088af;color:#000}.postbox-orange{background-color:#ff6323;color:#000}.postbox-purple{background-color:#7321ad;color:#fff}.postbox-forest{background-color:#165348;color:#fff}.postbox-ocean{background-color:#243762;color:#fff}.postbox-pink{background-color:#f35369;color:#000}.postbox-salmon{background-color:salmon;color:#000}.postbox-darkgray{background-image:linear-gradient(135deg,#777d88,#4f5766);color:#fff}.postbox-mintgray,.postbox-minty{background-image:linear-gradient(135deg,#8fc7ad,#48e5a9);color:#000}.postbox-redblue{background-image:linear-gradient(45deg,#ff0047,#2c34c7);color:#fff}.postbox-violets{background-image:linear-gradient(45deg,#5d3fda,#fc36fd);color:#fff}.postbox-grayblack{background-image:linear-gradient(45deg,#5d6374,#16181d);color:#fff}.postbox-tealblue{background-image:linear-gradient(to bottom,#4bdfdf 0,#207cca 50%,#19094a 100%);color:#fff}.postbox-greengray{background-image:linear-gradient(to right,#c8dbbd 0,#dedede 100%);color:#000}.postbox-tealgray{background-image:linear-gradient(to right,#8dcad0 0,#dedede 100%);color:#000}.postbox-bluegray{background-image:linear-gradient(to right,#94bbeb 0,#dedede 100%);color:#000}.postbox-lavendergray{background-image:linear-gradient(to right,#cfbfda 0,#dedede 100%);color:#000}.postbox-sunset{background-image:linear-gradient(to bottom,#fecf41 0,#fd7440 50%,#b623b1 100%);color:#fff}.postbox-sherbert{background-image:linear-gradient(45deg,#fcd6cd 6%,#f8bc44 25%,#fb7d88 44%,#fb7d88 64%,#fb7d88 64%,#fed640 100%);color:#000} \ No newline at end of file diff --git a/postbox/postbox.php b/postbox/postbox.php new file mode 100644 index 0000000..0ff09ae --- /dev/null +++ b/postbox/postbox.php @@ -0,0 +1,21 @@ + + */ + +use Friendica\Core\Hook; +use Friendica\DI; + +function postbox_install() +{ + Hook::register('head', __FILE__, 'postbox_head'); +} +function postbox_head(string &$b) +{ + // Add Postbox Styling to Header + $box_styles = __DIR__ . '/postbox.min.css'; + DI::page()->registerStylesheet($box_styles); +} \ No newline at end of file diff --git a/usernotice/css/usernotice.css b/usernotice/css/usernotice.css new file mode 100644 index 0000000..9f5e925 --- /dev/null +++ b/usernotice/css/usernotice.css @@ -0,0 +1,72 @@ +/* Modal Container */ +.usernotice-modal { + display: none; /* Modal standardmäßig verstecken */ + position: fixed; /* Fest positioniert */ + z-index: 1000; /* Über anderen Elementen angezeigt */ + left: 52.5%; /* Horizontale Zentrierung */ + top: 10%; /* Abstand von der oberen Seite */ + transform: translateX(-50%); /* Modal horizontal zentrieren */ + width: 90%; /* Breite für Mobilgeräte anpassen */ + max-width: 650px; /* Maximale Breite des Modals */ + max-height: 80%; /* Maximale Höhe des Modals */ + overflow-y: auto; /* Scrollen, wenn der Inhalt zu groß ist */ +} + +/* Modal Inhalt */ +.usernotice-modal-content { + background-color: #2196f3; /* Hintergrundfarbe */ + color: white; /* Textfarbe */ + padding: 20px; /* Innenabstand */ + border-radius: 8px; /* Abgerundete Ecken */ + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Schatteneffekt */ + margin: 0 auto; /* Zentrieren des Modalinhalts */ + width: 100%; /* 100% Breite des Containers */ + max-width: 650px; /* Maximale Breite */ +} + +/* Schließen-Button */ +.usernotice-close { + color: white; /* Farbe des Schließen-Buttons */ + float: right; /* Button nach rechts ausrichten */ + font-size: 28px; /* Größe des Schließen-Buttons */ + font-weight: bold; /* Gewicht des Schließen-Buttons */ + cursor: pointer; /* Zeiger-Style beim Hover */ +} + +.usernotice-close:hover { + color: darkred; /* Farbe beim Hover über den Schließen-Button */ +} + +/* Modal Header */ +.usernotice-modal-content h3 { + font-size: 2rem; /* Entspricht der typischen Größe von

*/ + margin: 0 0 10px 0; /* Abstand nach unten */ + color: white; /* Schriftfarbe */ +} + +/* Responsive Design für kleinere Bildschirme */ +@media (max-width: 600px) { + .usernotice-modal { + top: 15%; /* Etwas weiter unten auf Mobilgeräten */ + left: 50%; + transform: translateX(-50%); + width: 95%; /* Breitere Darstellung auf kleineren Bildschirmen */ + } + + .usernotice-modal-content { + padding: 15px; /* Weniger Padding auf Mobilgeräten */ + max-width: 100%; /* Keine feste Breite auf Mobilgeräten */ + } + + .usernotice-close { + font-size: 24px; /* Kleinere Schließen-Schaltfläche */ + } + + /* Dezenter Trennstrich */ + .usernotice-divider { + border: none; + border-top: 1px solid rgba(244, 244, 244, 0.98); + margin: 10px 0; + width: 100%; + } +} diff --git a/usernotice/templates/admin.tpl b/usernotice/templates/admin.tpl new file mode 100644 index 0000000..141a2ba --- /dev/null +++ b/usernotice/templates/admin.tpl @@ -0,0 +1,5 @@ +{{include file="field_textarea.tpl" field=$noticeText}} + +
+ +
diff --git a/usernotice/usernotice.php b/usernotice/usernotice.php new file mode 100644 index 0000000..1e43f0d --- /dev/null +++ b/usernotice/usernotice.php @@ -0,0 +1,105 @@ + + */ + +use Friendica\App; +use Friendica\Core\Hook; +use Friendica\Core\Renderer; +use Friendica\DI; + +function usernotice_install() { + // Registriere das Hook, um das Modal in den Seiteninhalt einzufügen + Hook::register('page_content_top', __FILE__, 'usernotice_fetch'); +} + +function usernotice_addon_admin(string &$s) +{ + // Überprüfe, ob der Benutzer ein Administrator ist + if (!DI::userSession()->isSiteAdmin()) { + return; + } + + // Lade das Stylesheet für die Admin-Seite + DI::page()->registerStylesheet(__DIR__ . '/css/usernotice.css'); + + // Hole den aktuellen Text aus der Konfiguration + $noticeText = DI::config()->get('usernotice', 'text', ''); + + // Lade das Admin-Template + $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/usernotice'); + if (!$t) { + throw new \Exception('Template admin.tpl could not be loaded.'); + } + + // Admin-Seite rendern + $s .= Renderer::replaceMacros($t, [ + '$title' => DI::l10n()->t('"usernotice" Settings'), + '$noticeText' => ['usernotice-text', DI::l10n()->t('Message'), $noticeText, DI::l10n()->t('Notification message to display in a modal')], + '$submit' => DI::l10n()->t('Save Settings') + ]); +} + +function usernotice_addon_admin_post() +{ + // Nur Administratoren dürfen die Einstellungen ändern + if (!DI::userSession()->isSiteAdmin()) { + return; + } + + // Speichere den neuen Text, wenn das Formular abgeschickt wurde + if (!empty($_POST['usernotice-submit']) && isset($_POST['usernotice-text'])) { + DI::config()->set('usernotice', 'text', trim(strip_tags($_POST['usernotice-text']))); + } +} + +function usernotice_fetch(string &$b) +{ + // Überprüfe, ob der Benutzer eingeloggt ist + if (!DI::userSession()->getLocalUserId()) { + return; // Modal wird nur für angemeldete Benutzer angezeigt + } + + // Hole den Benachrichtigungstext aus der Konfiguration + $noticeText = DI::config()->get('usernotice', 'text'); + + // Wenn ein Text vorhanden ist, zeige das Modal an + if ($noticeText) { + // Lade das Stylesheet + DI::page()->registerStylesheet(__DIR__ . '/css/usernotice.css'); + + // HTML und JavaScript für das Modal hinzufügen + $b .= ' +
+
+ × +

' . DI::l10n()->t('User-Notice') . '

+
+

' . htmlspecialchars($noticeText) . '

+
+
+ + '; + } +} diff --git a/zen-postbox/README.md b/zen-postbox/README.md new file mode 100644 index 0000000..399889f --- /dev/null +++ b/zen-postbox/README.md @@ -0,0 +1,79 @@ +# Zen Postbox + +This is a Friendica add-on that adds a Jot Plugin tool button to the Compose editor allowing users to easily select any of the "Postbox" color backgrounds. + +Postbox color backgrounds are similar to a Facebook feature for text-only posts, except Friendica's allows any arbitrary content and users may have more than on Postbox per post. Support for Postbox is built into the Bookface 1.6+ scheme for Frio, but this addon will enable it regardless of what theme/scheme is being used. + +This add-on also adds support for displaying Postbox content in all feeds no matter what theeme is in use. + +_**Note**: It has "zen" on the beginning of the name just to make the add-on load AFTER other Jot Plugins. In particular the "Smileybutton" add-on which has a typo that clears any Jot Plugins that load before it._ + +## Getting started + +1. Place the "zen_postbox" folder in your _friendica/addons_ subfolder. +2. Go to the Main _Menu > Admin > Addons_ and enable "Zen Postbox" +3. On the Compose Modal or Compose Page you should see a rainbox button that opens a background selector. + +## Using Zen Postbox + +1. Open the message Compose modal or Page +2. To wrap text, etc., in a Postbox select it in the message editor. +3. Press the rainbow button at the bottom of the editor. +4. Select which Postbox background you'd like to wrap the text in. +5. Press the "Preview" tab to see what it will look like. + +If no text is selected in the editor a Postbox will be appeneded to the text area with "..." for content. Replace the "..." with your text, etc. + +While Postbox allows more content than the Facebook version (which is text only), there are limitations due to how Friendica parses BBcode. + +**It is STRONGLY recommended you only use Postboxes with text and emoji.** + +BBcodes you CANNOT put inside a Postbox: + +* [class] (which means you can’t nest Postboxes) +* [hr] +* [h1],[h2],[h3], etc… +* [table],[tr],[th],[td] +* [list],[ul],[ol] +* [quote] +* [abstract] +* [spoiler] +* [map] +* [code] + +BBcodes that do not work as intended inside a Postbox: + +* [pre] +* [noparse] +* [nobb] + +The text will show but will be styled and centered. + +BBcodes that **CAN BE INSIDE** a Postbox: +* [i], [b], [u], [o], [s] _(bold has no visible effect)_ +* [url] +* [img] +* [audio] +* [video] + +And any plain text, including emoji + +If you are using Markdown formatting what you can and can’t put in a Postbox is similar, with the exception that (because of how Markdown is parsed into BBcode) you can’t have both a URL and an image in the same Postbox. You *can* however put inline `code` in a Postbox with Markdown where BBcode cannot. + +## Known Issues + +- Postboxes are not shown on other platforms when your post is shared. +- Postboxes are not shown in third-party apps (at least none do yet) + +## Changelog +1.0 (25 March 2025) +* Initial Release for Friendica 'Interrupted Fern' 2024.12 + +## Authors and acknowledgment +Random Penguin + +## License +Assuming AGPL for add-ons since that's the license Friendica is under + +## Project status +Unsupported by Friendica devs. \ No newline at end of file diff --git a/zen-postbox/view/.gitkeep b/zen-postbox/view/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/zen-postbox/view/default.min.css b/zen-postbox/view/default.min.css new file mode 100644 index 0000000..51d9c49 --- /dev/null +++ b/zen-postbox/view/default.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{display:block}#postboxbutton{display:none}.postbox_button>img{height:32px;width:32px;cursor:pointer}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden} \ No newline at end of file diff --git a/zen-postbox/view/default.png b/zen-postbox/view/default.png new file mode 100644 index 0000000000000000000000000000000000000000..757f59296f3a512abbcb1aef5a6f8a706bbcbb60 GIT binary patch literal 2994 zcmai0cR&;Q5{^=gC{h$uKnx3r3Mm9>F#!Xi3K#{>pgA!lo3N&A$ZjAIpA-QVMenQ! z77*bC@lepG$HNLI#d<0Vf~c{ASP(3DdiXX$QBHmDk4-YaZ|0lwo0-iTc0`b|k(Ch+ zhcgZdW-Y+J3EBs5h>iyeN}QEUksvz zI8X%17{K$IlK=q{Fo1>b;goQ>KNt@MrzpV4l!z#PikR;$0DOIn=qegUAO%q#K_!*Q z5Soes=y++^Z|yM|Am~(3F$3U)vkCsN0wlPT+({I`$A~~z2!yl+tiX@Pn8X0$QB+PN zlarE?NJ(xaSRo?2dV715DO56*O2jmXNU{v&sfaSfUQ02^!2%J!0+OQ;EF)++d2z53 zWdHz%6F!m)_(R-sr9z@(7VycS1eAg@6d}8kT*+VRgDU8AG&1C4xv;{KwFst88K#ax z!tbbSk+0O{@h}P_@vwX-s9`RK;I9m^a(~-I#gl(aIXwJ-t4pQB(m>FFM67ThFJV|r zpBx}j$#Rgq07PJ=f)55HV%4+P6;4|h8XHo95)KQ(ii%*j!2sN-{{UmY1Ny@fSP_Xe zA;tWI>Q0Atb=x!`0ivgGeO}dcZD?hS@^G zWEKy_w5SxSJCWi>q`F4A&Z4<{(Pm+yJB>ooG3&Ik*%9zi-v86rP5^-};L}hDm4G^F za3YuzbWj=;C6IOuXcC@G!~j%80Vw1tB`Dw{hY>UmR>j6CQ52TZ$=czOKp%N@(kCK1 zd6*YE7G-!iEf_*jSdsjN<47=JxMST65(v7^qVf3Ji(vqA1uRhVL4ht|EQLW7frV%i zPXRJTSW__orcelBSC~w|#v2mJKm~zHpklkjbGTJfJcu!Vzoz6b)A@Gi*g+yN*1x>@Z64WcZy+fb`@C->yY?cx^sci*L%Nl=!J?`~e?CV@E+lX3TL&*Qt@pInyEj0|3^)t51!HR5s|$OM zmj#8sU#2Mf!*`l^_Z@xC;;fx(X0DH_+}M1jwpYRJii((VyJ2|<;^OA(RJr)rn4N?b z%f0f18%JkPTFQE8_gBvqvh%Y0>YTT3`$H;#L!q|0(dG_KcP-tWuJO(96*UNo8@K=c zp?x94r;`{Bzh?fumbd)noVsxnju_v2*Ge&RTB^=24|7a?iqG~9xLpxn;V+leo>2y@ zeRBGNCF)bgBXT!O?p{~f+`3c^LMPn7eGS6N?ty|i-F+H*bqn`DX0UgaLTTNBx!v@Kko zB^sGl-_BiPV8DG(E?V8E>3D^wj3n8V;^cQU91Z8rInmVzO*K88iJpB9-sepAj?*~Z zS-f;XvFD}IKYh#$^v&2xi9Vh3LX)={e}@P3>|8aqVBR*8by~0Yt_@X3LvM6&n=B8Q zuVa@zBqz7xxxo}5y)*%idQrLR67FWNJSFp9w?w${(K<=@{>fJir$qIOCLC*v?gZ7x z%|2Wx@9J&TRBsS%Jnj)%E{BOT8l7eUtQxkCIPGr_gHZ!{R z>Rj8TQ`O~X9PCs2p6&a^1gt%!Dosh43C`KO05U2Lp9k`kg-4aq=r^m zJs;7$&E?=gMM*_wnPKa?=OGS<1IJD%d>QL#%04gX3Nt(*jP3v5RGQ) zySTO8g8a?z{T8V5ws0c)G{?v5~vm;nF z0J!O&x95Di|GIGpGJ<;AY^D|2Ey<}(t;=Y!wLImgY1;X)@4c^4{`mOE0^bhpU+s{9 L2v&vP(v1HCp#_)( literal 0 HcmV?d00001 diff --git a/zen-postbox/view/default.svg b/zen-postbox/view/default.svg new file mode 100644 index 0000000..d249969 --- /dev/null +++ b/zen-postbox/view/default.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/zen-postbox/view/duepuntozero.min.css b/zen-postbox/view/duepuntozero.min.css new file mode 100644 index 0000000..1ac9a1c --- /dev/null +++ b/zen-postbox/view/duepuntozero.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{display:block}#postboxbutton{display:none}.postbox_button{height:18px;width:18px;position:relative;left:285px;top:-62px;padding:0;border:0;background:0 0}.postbox_button>img{height:100%;width:100%}div.preview-postbox{border:1px solid #aaa;-moz-border-radius:3px;border-radius:3px;position:relative;left:285px;top:-62px;padding:5px;width:fit-content}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden}#profile-jot-plugin-wrapper>div,.jotplugins>div{float:left}#profile-jot-plugin-wrapper::after,.jotplugins::after{content:'';display:block;clear:both} \ No newline at end of file diff --git a/zen-postbox/view/frio.min.css b/zen-postbox/view/frio.min.css new file mode 100644 index 0000000..3ebab90 --- /dev/null +++ b/zen-postbox/view/frio.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{display:block}#postboxbutton{display:none;position:fixed;background-color:#eee;width:auto;border-radius:8px;padding:10px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.jotplugins #postboxbutton{position:absolute}.postbox_button{border:none!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.postbox_button>img{height:18px;width:18px;cursor:pointer}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden}div.preview-postbox>button:focus>div,div.preview-postbox>button:hover>div{box-shadow:inset 0 0 100px rgba(255,255,255,.2)}#profile-jot-plugin-wrapper>div,.jotplugins>div{float:left}#profile-jot-plugin-wrapper::after,.jotplugins::after{content:'';display:block;clear:both} \ No newline at end of file diff --git a/zen-postbox/view/postbox.min.css b/zen-postbox/view/postbox.min.css new file mode 100644 index 0000000..64e1a32 --- /dev/null +++ b/zen-postbox/view/postbox.min.css @@ -0,0 +1 @@ +[class^=postbox-]{display:table-cell;height:350px;width:1000px;max-width:100%;vertical-align:middle;font-family:Arial,sans-serif;font-size:30px;font-weight:700;line-height:35px;text-align:center;padding:50px 30px;box-sizing:border-box}[class^=postbox-] a{color:inherit!important}[class^=postbox-]:focus a,[class^=postbox-]:hover a{text-decoration:underline}.postbox-black{background-color:#000;color:#fff}.postbox-red{background-color:#e2013b;color:#fff}.postbox-green{background-color:#26927f;color:#fff}.postbox-blue{background-color:#2088af;color:#000}.postbox-orange{background-color:#ff6323;color:#000}.postbox-purple{background-color:#7321ad;color:#fff}.postbox-forest{background-color:#165348;color:#fff}.postbox-ocean{background-color:#243762;color:#fff}.postbox-pink{background-color:#f35369;color:#000}.postbox-salmon{background-color:salmon;color:#000}.postbox-darkgray{background-image:linear-gradient(135deg,#777d88,#4f5766);color:#fff}.postbox-mintgray,.postbox-minty{background-image:linear-gradient(135deg,#8fc7ad,#48e5a9);color:#000}.postbox-redblue{background-image:linear-gradient(45deg,#ff0047,#2c34c7);color:#fff}.postbox-violets{background-image:linear-gradient(45deg,#5d3fda,#fc36fd);color:#fff}.postbox-grayblack{background-image:linear-gradient(45deg,#5d6374,#16181d);color:#fff}.postbox-tealblue{background-image:linear-gradient(to bottom,#4bdfdf 0,#207cca 50%,#19094a 100%);color:#fff}.postbox-greengray{background-image:linear-gradient(to right,#c8dbbd 0,#dedede 100%);color:#000}.postbox-tealgray{background-image:linear-gradient(to right,#8dcad0 0,#dedede 100%);color:#000}.postbox-bluegray{background-image:linear-gradient(to right,#94bbeb 0,#dedede 100%);color:#000}.postbox-lavendergray{background-image:linear-gradient(to right,#cfbfda 0,#dedede 100%);color:#000}.postbox-sunset{background-image:linear-gradient(to bottom,#fecf41 0,#fd7440 50%,#b623b1 100%);color:#fff}.postbox-sherbert{background-image:linear-gradient(45deg,#fcd6cd 6%,#f8bc44 25%,#fb7d88 44%,#fb7d88 64%,#fb7d88 64%,#fed640 100%);color:#000} \ No newline at end of file diff --git a/zen-postbox/view/quattro.min.css b/zen-postbox/view/quattro.min.css new file mode 100644 index 0000000..32eb78f --- /dev/null +++ b/zen-postbox/view/quattro.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{display:block;margin-bottom:-50px}#postboxbutton{position:absolute;margin-top:12px;z-index:99;display:none;padding:10px;background-color:#fff;box-shadow:0 5px 10px rgba(0,0,0,.7)}.postbox_button{border:none;background:0 0;height:24px;width:24px;box-shadow:none;padding:0;position:relative;top:8px}.postbox_button>img{height:24px;width:24px}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden} \ No newline at end of file diff --git a/zen-postbox/view/smoothly.min.css b/zen-postbox/view/smoothly.min.css new file mode 100644 index 0000000..9b31dfa --- /dev/null +++ b/zen-postbox/view/smoothly.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{display:block}#postboxbutton{display:none;position:fixed;background-color:#eee;width:auto;width:fit-content;border-radius:8px;padding:10px;z-index:99;box-shadow:0 0 5px rgba(0,0,0,.7)}.postbox_button>img{height:22px;width:22px;position:relative;margin:4px;-moz-border-radius:0;border-radius:0}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden}#profile-jot-plugin-wrapper{padding:10px 1px}#profile-jot-plugin-wrapper>div,.jotplugins>div{float:left}#profile-jot-plugin-wrapper::after,.jotplugins::after{content:'';display:block;clear:both} \ No newline at end of file diff --git a/zen-postbox/view/src/.gitkeep b/zen-postbox/view/src/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/zen-postbox/view/src/default.css b/zen-postbox/view/src/default.css new file mode 100644 index 0000000..6a392a2 --- /dev/null +++ b/zen-postbox/view/src/default.css @@ -0,0 +1,37 @@ +#profile-postbox-wrapper { + display: block; +} + +#postboxbutton { + display: none; +} + +.postbox_button > img { + height: 32px; + width: 32px; + cursor: pointer; +} + +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} \ No newline at end of file diff --git a/zen-postbox/view/src/duepuntozero.css b/zen-postbox/view/src/duepuntozero.css new file mode 100644 index 0000000..28f40b1 --- /dev/null +++ b/zen-postbox/view/src/duepuntozero.css @@ -0,0 +1,68 @@ +#profile-postbox-wrapper { + display: block; +} + +#postboxbutton { + display: none; +} + +.postbox_button { + height: 18px; + width: 18px; + position: relative; + left: 285px; + top: -62px; + padding: 0; + border: 0; + background: none; +} + .postbox_button > img { + height: 100%; + width: 100%; + } + +div.preview-postbox { + border: 1px solid #AAA; + -moz-border-radius: 3px; + border-radius: 3px; + position: relative; + left: 285px; + top: -62px; + padding: 5px; + width: fit-content; +} + +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} +/* fix positioning if more than one jot tool */ +.jotplugins > div, +#profile-jot-plugin-wrapper > div { + float: left; +} + .jotplugins::after, + #profile-jot-plugin-wrapper::after { + content: ''; + display: block; + clear: both; + } \ No newline at end of file diff --git a/zen-postbox/view/src/frio.css b/zen-postbox/view/src/frio.css new file mode 100644 index 0000000..0971047 --- /dev/null +++ b/zen-postbox/view/src/frio.css @@ -0,0 +1,69 @@ +#profile-postbox-wrapper { + display: block; +} + +#postboxbutton { + display: none; + position: fixed; + background-color: #eee; + width: auto; + border-radius: 8px; + padding: 10px; + -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); + box-shadow: 0 6px 12px rgba(0,0,0,.175); +} + .jotplugins #postboxbutton { + position: absolute; + } + +.postbox_button { + border: none !important; + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important; +} + +.postbox_button > img { + height: 18px; + width: 18px; + cursor: pointer; +} + +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} + div.preview-postbox > button:hover > div, + div.preview-postbox > button:focus > div { + box-shadow: inset 0 0 100px rgba(255,255,255,.2); + } +/* fix positioning if more than one jot tool */ +.jotplugins > div, +#profile-jot-plugin-wrapper > div { + float: left; +} + .jotplugins::after, + #profile-jot-plugin-wrapper::after { + content: ''; + display: block; + clear: both; + } \ No newline at end of file diff --git a/zen-postbox/view/src/postbox.css b/zen-postbox/view/src/postbox.css new file mode 100644 index 0000000..7e7fb87 --- /dev/null +++ b/zen-postbox/view/src/postbox.css @@ -0,0 +1,120 @@ + /* Post Backgrounds + ================ + Solid and Gradient backgrounds with larger text + to grab reader attention + */ + [class^="postbox-"]{ + display: table-cell; + height: 350px; + width: 1000px; + max-width: 100%; + vertical-align: middle; + font-family: Arial, sans-serif; + font-size: 30px; + font-weight: 700; + line-height: 35px; + text-align: center; + padding: 50px 30px; + box-sizing: border-box; + } + [class^="postbox-"] a { + color: inherit !important; + } + [class^="postbox-"]:hover a, + [class^="postbox-"]:focus a { + text-decoration: underline; + } + /* Solid Color Backgrounds */ + .postbox-black { + background-color: black; + color: white; + } + .postbox-red { + background-color: rgb(226, 1, 59); + color: white; + } + .postbox-green { + background-color: rgb(38, 146, 127); + color: white; + } + .postbox-blue { + background-color: rgb(32, 136, 175); + color: black; + } + .postbox-orange { + background-color: rgb(255, 99, 35); + color: black; + } + .postbox-purple { + background-color: rgb(115, 33, 173); + color: white; + } + .postbox-forest { + background-color: rgb(22, 83, 72); + color: white; + } + .postbox-ocean { + background-color: rgb(36, 55, 98); + color: white; + } + .postbox-pink { + background-color: rgb(243, 83, 105); + color: black; + } + .postbox-salmon { + background-color: rgb(250, 128, 114); + color: black; + } + /* Gradient Backgrounds */ + .postbox-darkgray { + background-image: linear-gradient(135deg, rgb(119, 125, 136), rgb(79, 87, 102)); + color: white; + } + .postbox-minty { + background-image: linear-gradient(135deg, rgb(143, 199, 173), rgb(72, 229, 169)); + color: black; + } + .postbox-mintgray { + background-image: linear-gradient(135deg, rgb(143, 199, 173), rgb(72, 229, 169)); + color: black; + } + .postbox-redblue { + background-image: linear-gradient(45deg, rgb(255, 0, 71), rgb(44, 52, 199)); + color: white; + } + .postbox-violets { + background-image: linear-gradient(45deg, rgb(93, 63, 218), rgb(252, 54, 253)); + color: white; + } + .postbox-grayblack { + background-image: linear-gradient(45deg, rgb(93, 99, 116), rgb(22, 24, 29)); + color: white; + } + .postbox-tealblue { + background-image: linear-gradient(to bottom, #4bdfdf 0%,#207cca 50%,#19094a 100%); + color: white; + } + .postbox-greengray { + background-image: linear-gradient(to right, #c8dbbd 0%,#dedede 100%); + color: black; + } + .postbox-tealgray { + background-image: linear-gradient(to right, #8dcad0 0%,#dedede 100%); + color: black; + } + .postbox-bluegray { + background-image: linear-gradient(to right, #94bbeb 0%,#dedede 100%); + color: black; + } + .postbox-lavendergray { + background-image: linear-gradient(to right, #cfbfda 0%,#dedede 100%); + color: black; + } + .postbox-sunset { + background-image: linear-gradient(to bottom, #fecf41 0%,#fd7440 50%,#b623b1 100%); + color: white; + } + .postbox-sherbert { + background-image: linear-gradient(45deg, #fcd6cd 6%,#f8bc44 25%,#fb7d88 44%,#fb7d88 64%,#fb7d88 64%,#fed640 100%); + color: black; + } \ No newline at end of file diff --git a/zen-postbox/view/src/quattro.css b/zen-postbox/view/src/quattro.css new file mode 100644 index 0000000..2bedbae --- /dev/null +++ b/zen-postbox/view/src/quattro.css @@ -0,0 +1,54 @@ +#profile-postbox-wrapper { + display: block; + margin-bottom: -50px; +} + +#postboxbutton { + position: absolute; + margin-top: 12px; + z-index: 99; + display: none; + padding: 10px; + background-color: #FFF; + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} + +.postbox_button { + border: none; + background: none; + height: 24px; + width: 24px; + box-shadow: none; + padding: 0; + position: relative; + top: 8px; +} + +.postbox_button > img { + height: 24px; + width: 24px; +} + +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} \ No newline at end of file diff --git a/zen-postbox/view/src/smoothly.css b/zen-postbox/view/src/smoothly.css new file mode 100644 index 0000000..c29499b --- /dev/null +++ b/zen-postbox/view/src/smoothly.css @@ -0,0 +1,63 @@ +#profile-postbox-wrapper { + display: block; +} + +#postboxbutton { + display: none; + position: fixed; + background-color: #eee; + width: auto; + width: fit-content; + border-radius: 8px; + padding: 10px; + z-index: 99; + box-shadow: 0 0 5px rgba(0,0,0,.7); +} + +.postbox_button > img { + height: 22px; + width: 22px; + position: relative; + margin: 4px; + -moz-border-radius: 0px; + border-radius: 0px; +} + +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} +/* fix positioning if more than one jot tool */ +#profile-jot-plugin-wrapper { + padding: 10px 1px; +} +/* fix positioning if more than one jot tool */ +.jotplugins > div, +#profile-jot-plugin-wrapper > div { + float: left; +} + .jotplugins::after, + #profile-jot-plugin-wrapper::after { + content: ''; + display: block; + clear: both; + } \ No newline at end of file diff --git a/zen-postbox/view/src/vier.css b/zen-postbox/view/src/vier.css new file mode 100644 index 0000000..831b9c3 --- /dev/null +++ b/zen-postbox/view/src/vier.css @@ -0,0 +1,60 @@ +#profile-postbox-wrapper { + float: left; + margin-left: 15px; + cursor: pointer; + height: 10px; + display: inline-block; +} + +#profile-postbox-wrapper .btn { + padding: 0; + margin: 0; + border: 0; + background: none; + width: 20px; + height: 20px; + line-height: inherit; + display: inline-block; + overflow: hidden; + padding: 1px; + color: #999; + vertical-align: text-top; +} + +#postboxbutton { + position: absolute; + z-index: 99; + display: none; + padding: 10px; + background-color: #FFF; + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} + +.postbox_button > img { + height: 18px; + width: 18px; + margin-right: 18px; +} +div.preview-postbox div.pick-postbox { + height: 100%; + width: 100%; + display: block; +} + +div.preview-postbox > button { + ms-appearance: none; + moz-appearance: none; + webkit-appearance: none; + appearance: none; + cursor: pointer; + height: 32px; + width: 32px; + margin: 5px; + float: left; + border-radius: 8px; + margin: 0 5px 5px 0; + background: none; + border: none; + padding: 0; + overflow: hidden; +} \ No newline at end of file diff --git a/zen-postbox/view/vier.min.css b/zen-postbox/view/vier.min.css new file mode 100644 index 0000000..ab25965 --- /dev/null +++ b/zen-postbox/view/vier.min.css @@ -0,0 +1 @@ +#profile-postbox-wrapper{float:left;margin-left:15px;cursor:pointer;height:10px;display:inline-block}#profile-postbox-wrapper .btn{padding:1px;margin:0;border:0;background:0 0;width:20px;height:20px;line-height:inherit;display:inline-block;overflow:hidden;color:#999;vertical-align:text-top}#postboxbutton{position:absolute;z-index:99;display:none;padding:10px;background-color:#fff;box-shadow:0 5px 10px rgba(0,0,0,.7)}.postbox_button>img{height:18px;width:18px;margin-right:18px}div.preview-postbox div.pick-postbox{height:100%;width:100%;display:block}div.preview-postbox>button{ms-appearance:none;moz-appearance:none;webkit-appearance:none;appearance:none;cursor:pointer;height:32px;width:32px;margin:0 5px 5px 0;float:left;border-radius:8px;background:0 0;border:none;padding:0;overflow:hidden} \ No newline at end of file diff --git a/zen-postbox/zen_postbox.php b/zen-postbox/zen_postbox.php new file mode 100644 index 0000000..6e5f607 --- /dev/null +++ b/zen-postbox/zen_postbox.php @@ -0,0 +1,184 @@ + + */ + +use Friendica\App; +use Friendica\Core\Hook; +use Friendica\DI; + +function zen_postbox_install() +{ + //Register hooks + Hook::register('jot_tool', 'addon/zen_postbox/zen_postbox.php', 'zen_postbox_jot_tool'); +} + +function zen_postbox_jot_tool(string &$body) +{ + + $labels = [ + 'Black', + 'Red', + 'Green', + 'Blue', + 'Orange', + 'Purple', + 'Forest', + 'Ocean', + 'Pink', + 'Salmon', + 'Dark Gray', + 'Minty', + 'Mint Gray', + 'Red-Blue', + 'Violets', + 'Gray-Black', + 'Teal Blue', + 'Green Gray', + 'Teal Gray', + 'Blue Gray', + 'Lavender Gray', + 'Sunset', + 'Sherbert', + ]; + + $texts = [ + '[class=postbox-black]', + '[class=postbox-red]', + '[class=postbox-green]', + '[class=postbox-blue]', + '[class=postbox-orange]', + '[class=postbox-purple]', + '[class=postbox-forest]', + '[class=postbox-ocean]', + '[class=postbox-pink]', + '[class=postbox-salmon]', + '[class=postbox-darkgray]', + '[class=postbox-minty]', + '[class=postbox-mintgray]', + '[class=postbox-redblue]', + '[class=postbox-violets]', + '[class=postbox-grayblack]', + '[class=postbox-tealblue]', + '[class=postbox-greengray]', + '[class=postbox-tealgray]', + '[class=postbox-bluegray]', + '[class=postbox-lavendergray]', + '[class=postbox-sunset]', + '[class=postbox-sherbert]', + ]; + + $icons = [ + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + ]; + $params = ['texts' => $texts, 'icons' => $icons, 'string' => '', 'labels' => $labels]; + //Generate html for smiley list + $s = '
'; + for ($x = 0; $x < count($params['texts']); $x++) { + $icon = $params['icons'][$x]; + $s .= ''; + } + $s .= '
'; + + //Add control css to header + $css_file = __DIR__ . '/view/' . DI::app()->getCurrentTheme() . '.min.css'; + if (!file_exists($css_file)) { + $css_file = __DIR__ . '/view/default.min.css'; + } + + DI::page()->registerStylesheet($css_file); + + // Add zen_postbox Styling to Header + $box_styles = __DIR__ . '/view/postbox.min.css'; + DI::page()->registerStylesheet($box_styles); + + //Get the correct image for the theme + $image = 'addon/zen_postbox/view/default.png'; + + $image_url = DI::baseUrl() . '/' . $image; + + //Append the hmtl and script to the page + $body .= <<< EOT +
+ +
+ $s +
+
+ + +EOT; +} +