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 * BEWARE: currently UNSUPPORTED
27 * Description: Theme based on Testbubble and optimized for Tablets.
28 * Version: Version 2013-05-08
29 * Author: Anne Walk, Devlon Duthied
30 * Author: Alex <https://red.pixelbits.de/channel/alex>
31 * Maintainer: Nomen Nominandum
32 * Screenshot: <a href="screenshot.png">Screenshot</a>
36 use Friendica\Core\Renderer;
40 * This script can be included even when the app is in maintenance mode which requires us to avoid any config call
43 function smoothly_init(App $a) {
44 Renderer::setActiveTemplateEngine('smarty3');
48 $baseurl = DI::baseUrl();
49 DI::page()['htmlhead'] .= <<< EOT
52 function cmtBbOpen(id) {
53 $(".comment-edit-bb-" + id).show();
55 function cmtBbClose(comment, id) {
56 $(".comment-edit-bb-" + id).hide();
58 $(document).ready(function() {
60 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
62 $('.group-edit-icon').hover(
64 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
66 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
69 $('.sidebar-group-element').hover(
71 id = $(this).attr('id');
72 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
75 id = $(this).attr('id');
76 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
80 $('.savedsearchdrop').hover(
82 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
84 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
87 $('.savedsearchterm').hover(
89 id = $(this).attr('id');
90 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
93 id = $(this).attr('id');
94 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
103 if (!is_null($cssFile)) {
104 DI::page()['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
110 if (! function_exists('_js_in_foot')) {
111 function _js_in_foot() {
112 /** @purpose insert stuff in bottom of page
115 $baseurl = DI::baseUrl();
116 $bottom['$baseurl'] = $baseurl;
117 $tpl = Renderer::getMarkupTemplate('bottom.tpl');
119 return DI::page()['bottom'] = Renderer::replaceMacros($tpl, $bottom);
124 * @param int|null $uid
126 * @see \Friendica\Core\Theme::getBackgroundColor()
127 * @TODO Implement this function
129 function smoothly_get_background_color(int $uid = null)
135 * @param int|null $uid
137 * @see \Friendica\Core\Theme::getThemeColor()
138 * @TODO Implement this function
140 function smoothly_get_theme_color(int $uid = null)