3 * @copyright Copyright (C) 2010-2023, 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/>.
22 * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
23 * Author: Ike <http://pirati.ca/profile/heluecht>
24 * Author: Beanow <https://fc.oscp.info/profile/beanow>
25 * Maintainer: Ike <http://pirati.ca/profile/heluecht>
26 * Description: "Vier" is a very compact and modern theme. It uses the font awesome font library: http://fortawesome.github.com/Font-Awesome/
31 * Description: Theme based on Testbubble and optimized for Tablets.
32 * Version: Version 2013-05-08
33 * Author: Anne Walk, Devlon Duthied
34 * Author: Alex <https://red.pixelbits.de/channel/alex>
35 * Maintainer: Nomen Nominandum
36 * Screenshot: <a href="screenshot.png">Screenshot</a>
40 use Friendica\Core\Renderer;
44 * This script can be included even when the app is in maintenance mode which requires us to avoid any config call
47 function smoothly_init(App $a) {
48 Renderer::setActiveTemplateEngine('smarty3');
52 $baseurl = DI::baseUrl();
53 DI::page()['htmlhead'] .= <<< EOT
56 function cmtBbOpen(id) {
57 $(".comment-edit-bb-" + id).show();
59 function cmtBbClose(comment, id) {
60 $(".comment-edit-bb-" + id).hide();
62 $(document).ready(function() {
64 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
66 $('.group-edit-icon').hover(
68 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
70 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
73 $('.sidebar-group-element').hover(
75 id = $(this).attr('id');
76 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
79 id = $(this).attr('id');
80 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
84 $('.savedsearchdrop').hover(
86 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
88 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
91 $('.savedsearchterm').hover(
93 id = $(this).attr('id');
94 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
97 id = $(this).attr('id');
98 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
107 if (!is_null($cssFile)) {
108 DI::page()['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
114 if (! function_exists('_js_in_foot')) {
115 function _js_in_foot() {
116 /** @purpose insert stuff in bottom of page
119 $baseurl = DI::baseUrl();
120 $bottom['$baseurl'] = $baseurl;
121 $tpl = Renderer::getMarkupTemplate('bottom.tpl');
123 return DI::page()['bottom'] = Renderer::replaceMacros($tpl, $bottom);
128 * @param int|null $uid
130 * @see \Friendica\Core\Theme::getBackgroundColor()
131 * @TODO Implement this function
133 function smoothly_get_background_color(int $uid = null)
139 * @param int|null $uid
141 * @see \Friendica\Core\Theme::getThemeColor()
142 * @TODO Implement this function
144 function smoothly_get_theme_color(int $uid = null)