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'
94 $('.search-box').slideUp('fast');
96 $('#nav-floater').slideDown('fast');
97 $('.floaterflip').css({
98 backgroundPosition: '-190px -60px'
100 $('.search-box').slideDown('fast');
103 // our trigger for the toolbar button
104 $('.floaterflip').click(function() {
109 // (attempt) to change the text colour in a top post
110 $('#profile-jot-text').focusin(function() {
111 $(this).css({color: '#eec'});
114 /* $('#profile-photo-wrapper').mouseover(function() {
115 $('.profile-edit-side-div').css({display: 'block'});
116 }).mouseout(function() {
117 $('.profile-edit-side-div').css({display: 'none'});
121 $('img.photo').mouseover(function() {
122 $('.profile-edit-side-div').css({display: 'block'});
123 }).mouseout(function() {
124 $('.profile-edit-side-div').css({display: 'none'});
132 function dispydark_community_info() {
135 $fostitJS = "javascript: (function() {
136 the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' +
137 encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
138 encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
139 document.getSelection() : document.selection.createRange().text));
140 a_funct = function() {
141 if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) {
142 location.href = the_url;
144 if (/Firefox/.test(navigator.userAgent)) {
145 setTimeout(a_funct, 0)
151 $aside['$fostitJS'] = $fostitJS;
152 $url = $a->get_baseurl($ssl_state);
153 $aside['$url'] = $url;
155 $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
156 $a->page['aside_bottom'] = replace_macros($tpl, $aside);
159 // aside on profile page
160 if ($a->argv[0] === "profile") {
161 dispydark_community_info();