5 * Description: Dispy Dark, Friendica theme
7 * Author: Simon <http://simon.kisikew.org/>
8 * Maintainer: Simon <http://simon.kisikew.org/>
9 * Screenshot: <a href="screenshot.png">screenshot</a>
13 $a->theme_info = array(
14 'extends' => 'dispy-dark'
17 $a->page['htmlhead'] .= <<< EOT
19 $(document).ready(function() {
20 $('.group-edit-icon').hover(
22 $(this).addClass('icon');
23 $(this).removeClass('iconspacer'); },
26 $(this).removeClass('icon');
27 $(this).addClass('iconspacer'); }
30 $('.sidebar-group-element').hover(
32 id = $(this).attr('id');
33 $('#edit-' + id).addClass('icon');
34 $('#edit-' + id).removeClass('iconspacer'); },
37 id = $(this).attr('id');
38 $('#edit-' + id).removeClass('icon');
39 $('#edit-' + id).addClass('iconspacer'); }
42 $('.savedsearchdrop').hover(
44 $(this).addClass('drop');
45 $(this).addClass('icon');
46 $(this).removeClass('iconspacer'); },
49 $(this).removeClass('drop');
50 $(this).removeClass('icon');
51 $(this).addClass('iconspacer'); }
54 $('.savedsearchterm').hover(
56 id = $(this).attr('id');
57 $('#drop-' + id).addClass('icon');
58 $('#drop-' + id).addClass('drophide');
59 $('#drop-' + id).removeClass('iconspacer'); },
62 id = $(this).attr('id');
63 $('#drop-' + id).removeClass('icon');
64 $('#drop-' + id).removeClass('drophide');
65 $('#drop-' + id).addClass('iconspacer'); }
68 // click outside notifications menu closes it
69 $('html').click(function() {
70 $('#nav-notifications-linkmenu').removeClass('selected');
71 document.getElementById("nav-notifications-menu").style.display = "none";
74 $('#nav-notifications-linkmenu').click(function(event) {
75 event.stopPropagation();
77 // click outside profiles menu closes it
78 $('html').click(function() {
79 $('#profiles-menu-trigger').removeClass('selected');
80 document.getElementById("profiles-menu").style.display = "none";
83 $('#profiles-menu').click(function(event) {
84 event.stopPropagation();
87 // main function in toolbar functioning
88 function toggleToolbar() {
89 if ( $('#nav-floater').is(':visible') ) {
90 $('#nav-floater').slideUp('fast');
91 $('.floaterflip').css({
92 backgroundPosition: '-210px -60px'
95 $('#nav-floater').slideDown('fast');
96 $('.floaterflip').css({
97 backgroundPosition: '-190px -60px'
101 // our trigger for the toolbar button
102 $('.floaterflip').click(function() {
107 // (attempt) to change the text colour in a top post
108 $('#profile-jot-text').focusin(function() {
109 $(this).css({color: '#eec'});
112 /* $('#profile-photo-wrapper').mouseover(function() {
113 $('.profile-edit-side-div').css({display: 'block'});
114 }).mouseout(function() {
115 $('.profile-edit-side-div').css({display: 'none'});
119 $('img.photo').mouseover(function() {
120 $('.profile-edit-side-div').css({display: 'block'});
121 }).mouseout(function() {
122 $('.profile-edit-side-div').css({display: 'none'});
130 function dispydark_community_info() {
133 $fostitJS = "javascript: (function() {
134 the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' +
135 encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
136 encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
137 document.getSelection() : document.selection.createRange().text));
138 a_funct = function() {
139 if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) {
140 location.href = the_url;
142 if (/Firefox/.test(navigator.userAgent)) {
143 setTimeout(a_funct, 0)
149 $aside['$fostitJS'] = $fostitJS;
150 $url = $a->get_baseurl($ssl_state);
151 $aside['$url'] = $url;
153 $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
154 $a->page['aside'] = replace_macros($tpl, $aside);