4 * Description: Theme with clean design derived from the zero theme family. Including options to set color schemes, font sizes and resizing of images in posts
6 * Author: Christian Vogeley (https://christian-vogeley.de/profile/christian)
8 $a->theme_info = array(
9 'extends' => 'duepuntozero',
11 function cleanzero_init(&$a) {
12 $a->page['htmlhead'] .= <<< EOT
14 $(document).ready(function() {
16 $('.group-edit-icon').hover(
18 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
20 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
23 $('.sidebar-group-element').hover(
25 id = $(this).attr('id');
26 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
29 id = $(this).attr('id');
30 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
34 $('.savedsearchdrop').hover(
36 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
38 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
41 $('.savedsearchterm').hover(
43 id = $(this).attr('id');
44 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
47 id = $(this).attr('id');
48 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
56 // get resize configuration
59 $site_resize = get_config('cleanzero', 'resize' );
60 if(local_user()) $resize = get_pconfig(local_user(), 'cleanzero', 'resize' );
62 if ($resize===false) $resize=$site_resize;
63 if ($resize===false) $resize=0;
65 if (intval($resize) > 0) {
66 //load jquery.ae.image.resize.js
67 $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/cleanzero/js/jquery.ae.image.resize.js";
68 $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS);
69 $a->page['htmlhead'] .= '
73 $(".wall-item-content-wrapper img").aeImageResize({height: '.$resize.', width: '.$resize.'});