friendica/view/theme/smoothly/theme.php

120 lines
3.6 KiB
PHP
Raw Normal View History

new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
<?php
/*
* Name: Smoothly
* Description: Theme opzimized for Tablets
* Version: 0.4
* Author: Alex <https://friendica.pixelbits.de/profile/alex>
* Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
* Screenshot: <a href="screenshot.jpg">Screenshot</a>
new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
*/
$a->theme_info = array(
'extends' => 'smoothly',
);
function smoothly_init(&$a) {
new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
$a->page['htmlhead'] .= <<< EOT
<script>
function insertFormatting(comment,BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
$("#comment-edit-text-" + id).val(tmpStr);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url"){
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url"){
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
function cmtBbOpen(id) {
$(".comment-edit-bb-" + id).show();
}
function cmtBbClose(comment, id) {
$(".comment-edit-bb-" + id).hide();
}
new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
$(document).ready(function() {
$('.group-edit-icon').hover(
function() {
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
function() {
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
);
$('.sidebar-group-element').hover(
function() {
id = $(this).attr('id');
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
function() {
id = $(this).attr('id');
$('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
);
$('.savedsearchdrop').hover(
function() {
$(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
function() {
$(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
);
$('.savedsearchterm').hover(
function() {
id = $(this).attr('id');
$('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
function() {
id = $(this).attr('id');
$('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
);
new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
});
new file: view/theme/smoothly/back-gradient.jpg new file: view/theme/smoothly/calendar.png new file: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/connect.png new file: view/theme/smoothly/contact_template.tpl new file: view/theme/smoothly/conversation.tpl new file: view/theme/smoothly/group_drop.tpl new file: view/theme/smoothly/group_edit.tpl new file: view/theme/smoothly/group_side.tpl new file: view/theme/smoothly/groups.png new file: view/theme/smoothly/icons.png new file: view/theme/smoothly/icons.svg new file: view/theme/smoothly/jot-header.tpl new file: view/theme/smoothly/jot.tpl new file: view/theme/smoothly/lock.cur new file: view/theme/smoothly/login-bg.gif new file: view/theme/smoothly/lrarrow.gif new file: view/theme/smoothly/mail_head.tpl new file: view/theme/smoothly/match.tpl new file: view/theme/smoothly/menu-user-pin.jpg new file: view/theme/smoothly/menu-user-pin.png new file: view/theme/smoothly/nav-bg.png new file: view/theme/smoothly/nav.tpl new file: view/theme/smoothly/nets.tpl new file: view/theme/smoothly/next.png new file: view/theme/smoothly/notifications.png new file: view/theme/smoothly/photo-menu.jpg new file: view/theme/smoothly/photo_album.tpl new file: view/theme/smoothly/photo_top.tpl new file: view/theme/smoothly/photo_view.tpl new file: view/theme/smoothly/photography.png new file: view/theme/smoothly/premium.png new file: view/theme/smoothly/prev.png new file: view/theme/smoothly/profile_entry.tpl new file: view/theme/smoothly/profile_vcard.tpl new file: view/theme/smoothly/saved_searches_aside.tpl new file: view/theme/smoothly/screenshot.jpg new file: view/theme/smoothly/screenshot.png new file: view/theme/smoothly/search.png new file: view/theme/smoothly/search_item.tpl new file: view/theme/smoothly/star.png new file: view/theme/smoothly/style.css new file: view/theme/smoothly/theme.php new file: view/theme/smoothly/user.png new file: view/theme/smoothly/wall_item.tpl new file: view/theme/smoothly/wallwall_item.tpl
2012-09-02 11:11:17 +00:00
</script>
EOT;
// get resize configuration
$resize=false;
$site_resize = get_config('smoothly', 'resize' );
if(local_user()) $resize = get_pconfig(local_user(), 'smoothly', 'resize' );
if ($resize===false) $resize=$site_resize;
if ($resize===false) $resize=0;
if (intval($resize) > 0) {
//load jquery.ae.image.resize.js
$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/smoothly/js/jquery.ae.image.resize.js";
$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS);
$a->page['htmlhead'] .= '
<script>
$(function() {
$(".wall-item-content img").aeImageResize({height: '.$resize.', width: '.$resize.'});
});
</script>';}
}