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.jpg">Screenshot</a>
12 $a->page['htmlhead'] .= <<< EOT
14 $(document).ready(function() {
15 $('.group-edit-icon').hover(
17 $(this).addClass('icon');
18 $(this).removeClass('iconspacer'); },
21 $(this).removeClass('icon');
22 $(this).addClass('iconspacer'); }
25 $('.sidebar-group-element').hover(
27 id = $(this).attr('id');
28 $('#edit-' + id).addClass('icon');
29 $('#edit-' + id).removeClass('iconspacer'); },
32 id = $(this).attr('id');
33 $('#edit-' + id).removeClass('icon');
34 $('#edit-' + id).addClass('iconspacer'); }
37 $('.savedsearchdrop').hover(
39 $(this).addClass('drop');
40 $(this).addClass('icon');
41 $(this).removeClass('iconspacer'); },
44 $(this).removeClass('drop');
45 $(this).removeClass('icon');
46 $(this).addClass('iconspacer'); }
49 $('.savedsearchterm').hover(
51 id = $(this).attr('id');
52 $('#drop-' + id).addClass('icon');
53 $('#drop-' + id).addClass('drophide');
54 $('#drop-' + id).removeClass('iconspacer'); },
57 id = $(this).attr('id');
58 $('#drop-' + id).removeClass('icon');
59 $('#drop-' + id).removeClass('drophide');
60 $('#drop-' + id).addClass('iconspacer'); }
63 // click outside notifications menu closes it
64 $('html').click(function() {
65 $('#nav-notifications-linkmenu').removeClass('selected');
66 document.getElementById("nav-notifications-menu").style.display = "none";
69 $('#nav-notifications-linkmenu').click(function(event) {
70 event.stopPropagation();
72 // click outside profiles menu closes it
73 $('html').click(function() {
74 $('#profiles-menu-trigger').removeClass('selected');
75 document.getElementById("profiles-menu").style.display = "none";
78 $('#profiles-menu').click(function(event) {
79 event.stopPropagation();
82 // main function in toolbar functioning
83 function toggleToolbar() {
84 if ( $('#nav-floater').is(':visible') ) {
85 $('#nav-floater').slideUp('fast');
86 $('.floaterflip').css({
87 backgroundPosition: '-210px -60px'
89 $('.search-box').slideUp('fast');
91 $('#nav-floater').slideDown('fast');
92 $('.floaterflip').css({
93 backgroundPosition: '-190px -60px'
95 $('.search-box').slideDown('fast');
98 // our trigger for the toolbar button
99 $('.floaterflip').click(function() {
104 // (attempt) to change the text colour in a top post
105 $('#profile-jot-text').focusin(function() {
106 $(this).css({color: '#eec'});
113 function dispydark_community_info() {
116 $fostitJS = "javascript: (function() {
117 the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' +
118 encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
119 encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
120 document.getSelection() : document.selection.createRange().text));
121 a_funct = function() {
122 if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) {
123 location.href = the_url;
125 if (/Firefox/.test(navigator.userAgent)) {
126 setTimeout(a_funct, 0)
132 $aside['$fostitJS'] = $fostitJS;
133 $url = $a->get_baseurl($ssl_state);
134 $aside['$url'] = $url;
136 $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
137 $a->page['aside_bottom'] = replace_macros($tpl, $aside);
140 // aside on profile page
141 if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) {
142 dispydark_community_info();