3 * @copyright Copyright (C) 2010-2022, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 use Friendica\Core\Renderer;
26 function duepuntozero_init(App $a) {
28 Renderer::setActiveTemplateEngine('smarty3');
30 $colorset = DI::pConfig()->get( local_user(), 'duepuntozero','colorset');
32 $colorset = DI::config()->get('duepuntozero', 'colorset'); // user setting have priority, then node settings
34 if ($colorset == 'greenzero')
35 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
36 if ($colorset == 'purplezero')
37 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
38 if ($colorset == 'easterbunny')
39 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
40 if ($colorset == 'darkzero')
41 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
42 if ($colorset == 'comix')
43 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
44 if ($colorset == 'slackr')
45 DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
47 DI::page()['htmlhead'] .= <<< EOT
49 function cmtBbOpen(comment, id) {
50 if ($(comment).hasClass('comment-edit-text-full')) {
51 $(".comment-edit-bb-" + id).show();
56 function cmtBbClose(comment, id) {
59 $(document).ready(function() {
61 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
63 $('.group-edit-icon').hover(
65 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
67 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
70 $('.sidebar-group-element').hover(
72 id = $(this).attr('id');
73 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
76 id = $(this).attr('id');
77 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
81 $('.savedsearchdrop').hover(
83 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
85 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
88 $('.savedsearchterm').hover(
90 id = $(this).attr('id');
91 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
94 id = $(this).attr('id');
95 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
103 * @param int|null $uid
105 * @see \Friendica\Core\Theme::getBackgroundColor()
106 * @TODO Implement this function
108 function duepuntozero_get_background_color(int $uid = null)
114 * @param int|null $uid
116 * @see \Friendica\Core\Theme::getThemeColor()
117 * @TODO Implement this function
119 function duepuntozero_get_theme_color(int $uid = null)