Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

83 lines
3.0 KiB

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