]> git.mxchange.org Git - friendica.git/blob - view/theme/smoothly/theme.php
wrapping up 2019.12
[friendica.git] / view / theme / smoothly / theme.php
1 <?php
2
3 /*
4  * Name: Smoothly
5  * Description: Theme based on Testbubble and optimized for Tablets.
6  * Version: Version 2013-05-08
7  * Author: Anne Walk, Devlon Duthied
8  * Author: Alex <https://red.pixelbits.de/channel/alex>
9  * Maintainer: Nomen Nominandum
10  * Screenshot: <a href="screenshot.png">Screenshot</a>
11  */
12
13 use Friendica\App;
14 use Friendica\Core\Renderer;
15 use Friendica\Core\System;
16
17 function smoothly_init(App $a) {
18         Renderer::setActiveTemplateEngine('smarty3');
19
20         $cssFile = null;
21         $ssl_state = null;
22         $baseurl = System::baseUrl($ssl_state);
23         $a->page['htmlhead'] .= <<< EOT
24
25 <script>
26 function cmtBbOpen(id) {
27         $(".comment-edit-bb-" + id).show();
28 }
29 function cmtBbClose(comment, id) {
30         $(".comment-edit-bb-" + id).hide();
31 }
32 $(document).ready(function() {
33
34         $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
35
36         $('.group-edit-icon').hover(
37                 function() {
38                         $(this).addClass('icon'); $(this).removeClass('iconspacer');},
39                 function() {
40                         $(this).removeClass('icon'); $(this).addClass('iconspacer');}
41         );
42
43         $('.sidebar-group-element').hover(
44                 function() {
45                         id = $(this).attr('id');
46                         $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
47
48                 function() {
49                         id = $(this).attr('id');
50                         $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
51         );
52
53
54         $('.savedsearchdrop').hover(
55                 function() {
56                         $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
57                 function() {
58                         $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
59         );
60
61         $('.savedsearchterm').hover(
62                 function() {
63                         id = $(this).attr('id');
64                         $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
65
66                 function() {
67                         id = $(this).attr('id');
68                         $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
69         );
70
71 });
72
73 </script>
74 EOT;
75
76         /** custom css **/
77         if (!is_null($cssFile)) {
78         $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
79         }
80
81         _js_in_foot();
82 }
83
84 if (! function_exists('_js_in_foot')) {
85         function _js_in_foot() {
86                 /** @purpose insert stuff in bottom of page
87                 */
88                 $a = \get_app();
89                 $ssl_state = null;
90                 $baseurl = System::baseUrl($ssl_state);
91                 $bottom['$baseurl'] = $baseurl;
92                 $tpl = Renderer::getMarkupTemplate('bottom.tpl');
93
94                 return $a->page['bottom'] = Renderer::replaceMacros($tpl, $bottom);
95         }
96 }