]> git.mxchange.org Git - friendica.git/blob - view/theme/duepuntozero/theme.php
wrapping up 2019.12
[friendica.git] / view / theme / duepuntozero / theme.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Core\Config;
5 use Friendica\Core\PConfig;
6 use Friendica\Core\Renderer;
7
8 function duepuntozero_init(App $a) {
9
10 Renderer::setActiveTemplateEngine('smarty3');
11
12     $colorset = PConfig::get( local_user(), 'duepuntozero','colorset');
13     if (!$colorset)
14        $colorset = Config::get('duepuntozero', 'colorset');          // user setting have priority, then node settings
15     if ($colorset) {
16         if ($colorset == 'greenzero')
17             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
18         if ($colorset == 'purplezero')
19             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
20         if ($colorset == 'easterbunny')
21             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
22         if ($colorset == 'darkzero')
23             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
24         if ($colorset == 'comix')
25             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
26         if ($colorset == 'slackr')
27             $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
28     }
29 $a->page['htmlhead'] .= <<< EOT
30 <script>
31 function cmtBbOpen(comment, id) {
32         if ($(comment).hasClass('comment-edit-text-full')) {
33                 $(".comment-edit-bb-" + id).show();
34                 return true;
35         }
36         return false;
37 }
38 function cmtBbClose(comment, id) {
39         return false;
40 }
41 $(document).ready(function() {
42
43         $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
44
45         $('.group-edit-icon').hover(
46                 function() {
47                         $(this).addClass('icon'); $(this).removeClass('iconspacer');},
48                 function() {
49                         $(this).removeClass('icon'); $(this).addClass('iconspacer');}
50         );
51
52         $('.sidebar-group-element').hover(
53                 function() {
54                         id = $(this).attr('id');
55                         $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
56
57                 function() {
58                         id = $(this).attr('id');
59                         $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
60         );
61
62
63         $('.savedsearchdrop').hover(
64                 function() {
65                         $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
66                 function() {
67                         $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
68         );
69
70         $('.savedsearchterm').hover(
71                 function() {
72                         id = $(this).attr('id');
73                         $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
74
75                 function() {
76                         id = $(this).attr('id');
77                         $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
78         );
79 });
80 </script>
81 EOT;
82 }