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