Merge https://github.com/friendica/friendica into pull
This commit is contained in:
commit
3d6c49d5b3
5 changed files with 122 additions and 86 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1 KiB |
|
@ -46,9 +46,52 @@ class Photo {
|
||||||
}
|
}
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
|
|
||||||
|
if($this->is_imagick() && $this->load_data($data)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// Failed to load with Imagick, fallback
|
||||||
|
$this->imagick = false;
|
||||||
|
}
|
||||||
|
return $this->load_data($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __destruct() {
|
||||||
|
if($this->image) {
|
||||||
|
if($this->is_imagick()) {
|
||||||
|
$this->image->clear();
|
||||||
|
$this->image->destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
imagedestroy($this->image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function is_imagick() {
|
||||||
|
return $this->imagick;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps Mime types to Imagick formats
|
||||||
|
*/
|
||||||
|
public function get_FormatsMap() {
|
||||||
|
$m = array(
|
||||||
|
'image/jpeg' => 'JPG',
|
||||||
|
'image/png' => 'PNG',
|
||||||
|
'image/gif' => 'GIF'
|
||||||
|
);
|
||||||
|
return $m;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function load_data($data) {
|
||||||
if($this->is_imagick()) {
|
if($this->is_imagick()) {
|
||||||
$this->image = new Imagick();
|
$this->image = new Imagick();
|
||||||
|
try {
|
||||||
$this->image->readImageBlob($data);
|
$this->image->readImageBlob($data);
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
// Imagick couldn't use the data
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the image to the format it will be saved to
|
* Setup the image to the format it will be saved to
|
||||||
|
@ -85,7 +128,14 @@ class Photo {
|
||||||
$quality = JPEG_QUALITY;
|
$quality = JPEG_QUALITY;
|
||||||
$this->image->setCompressionQuality($quality);
|
$this->image->setCompressionQuality($quality);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
$this->width = $this->image->getImageWidth();
|
||||||
|
$this->height = $this->image->getImageHeight();
|
||||||
|
$this->valid = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$this->valid = false;
|
$this->valid = false;
|
||||||
$this->image = @imagecreatefromstring($data);
|
$this->image = @imagecreatefromstring($data);
|
||||||
if($this->image !== FALSE) {
|
if($this->image !== FALSE) {
|
||||||
|
@ -94,35 +144,11 @@ class Photo {
|
||||||
$this->valid = true;
|
$this->valid = true;
|
||||||
imagealphablending($this->image, false);
|
imagealphablending($this->image, false);
|
||||||
imagesavealpha($this->image, true);
|
imagesavealpha($this->image, true);
|
||||||
}
|
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct() {
|
return false;
|
||||||
if($this->image) {
|
|
||||||
if($this->is_imagick()) {
|
|
||||||
$this->image->clear();
|
|
||||||
$this->image->destroy();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
imagedestroy($this->image);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function is_imagick() {
|
|
||||||
return $this->imagick;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maps Mime types to Imagick formats
|
|
||||||
*/
|
|
||||||
public function get_FormatsMap() {
|
|
||||||
$m = array(
|
|
||||||
'image/jpeg' => 'JPG',
|
|
||||||
'image/png' => 'PNG',
|
|
||||||
'image/gif' => 'GIF'
|
|
||||||
);
|
|
||||||
return $m;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function is_valid() {
|
public function is_valid() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Smoothly
|
Smoothly
|
||||||
|
|
||||||
Created by Anne Walk and Devlon Duthie on 2011-09-24
|
Created by Anne Walk and Devlon Duthie on 2011-09-24
|
||||||
Modified by alex@friendica.pixelbits.de on 2012-09-11
|
Modified by alex@friendica.pixelbits.de on 2012-09-12
|
||||||
|
|
||||||
|
|
||||||
** Colors **
|
** Colors **
|
||||||
|
@ -22,7 +22,7 @@ You can switch out the colors of the header, buttons and links by using a find a
|
||||||
body {
|
body {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-bottom: 3em;
|
padding-bottom: 3em;
|
||||||
position: relative;
|
/*position: relative;*/
|
||||||
width: 960px;
|
width: 960px;
|
||||||
font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
|
font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
@ -176,24 +176,29 @@ section {
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
border: none;
|
border: 1px solid #7C7D7B;
|
||||||
|
box-shadow: 0 0 8px #BDBDBD;
|
||||||
|
-moz-box-shadow: 3px 3px 4px #959494;
|
||||||
|
-webkit-box-shadow: 3px 3px 4px #959494;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
-moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
|
box-shadow: inset 0px 0px 0px 0px #cfcfcf;
|
||||||
-webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
|
-moz-box-shadow:inset 0px 0px 0px 0px #cfcfcf;
|
||||||
box-shadow:inset 0px 1px 0px 0px #cfcfcf;
|
-webkit-box-shadow:inset 0px 0px 0px 0px #cfcfcf;
|
||||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
|
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
|
||||||
background: -moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
|
background: -moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2');
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2');
|
||||||
background-color: #bdbdbd;
|
background-color: #bdbdbd;
|
||||||
-moz-border-radius:5px;
|
|
||||||
-webkit-border-radius:5px;
|
|
||||||
border-radius:5px;
|
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
border: none;
|
border: 1px solid #7C7D7B;
|
||||||
|
box-shadow: 0 0 8px #BDBDBD;
|
||||||
|
-moz-box-shadow: 3px 3px 4px #959494;
|
||||||
|
-webkit-box-shadow: 3px 3px 4px #959494;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) );
|
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) );
|
||||||
background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
|
background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1873a2', endColorstr='#6da6c4');
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1873a2', endColorstr='#6da6c4');
|
||||||
|
@ -300,14 +305,14 @@ nav {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
background: url("nav-bg.png") no-repeat scroll 0px 0px transparent;
|
|
||||||
/*background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #7c7d7b), color-stop(1, #555753) );*/
|
|
||||||
/*background:-moz-linear-gradient( center top, #7c7d7b 5%, #555753 100% );*/
|
|
||||||
/*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c7d7b', endColorstr='#555753');*/
|
|
||||||
/*background-color:#7c7d7b;*/
|
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
/*border-bottom: 1px solid #494948;*/
|
background: -moz-linear-gradient(center top , #BDBDBD 5%, #A2A2A2 100%) repeat scroll 0 0 #BDBDBD;
|
||||||
|
border: 1px solid #7C7D7B;
|
||||||
|
box-shadow: 0 0 8px #BDBDBD;
|
||||||
|
-moz-box-shadow: 3px 3px 4px #959494;
|
||||||
|
-webkit-box-shadow: 3px 3px 4px #959494;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
}
|
}
|
||||||
nav a { text-decoration: none; color: #eeeeec; border:0px;}
|
nav a { text-decoration: none; color: #eeeeec; border:0px;}
|
||||||
nav a:hover { text-decoration: none; color: #eeeeec; border:0px;}
|
nav a:hover { text-decoration: none; color: #eeeeec; border:0px;}
|
||||||
|
@ -326,9 +331,9 @@ nav #banner #logo-text a {
|
||||||
}
|
}
|
||||||
nav #user-menu {
|
nav #user-menu {
|
||||||
display: block;
|
display: block;
|
||||||
width: 190px; /*240*/
|
width: 190px;
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 5px; /*20%*/
|
margin-right: 5px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -340,7 +345,7 @@ nav #user-menu {
|
||||||
-moz-border-radius:5px;
|
-moz-border-radius:5px;
|
||||||
-webkit-border-radius:5px;
|
-webkit-border-radius:5px;
|
||||||
border-radius:5px;
|
border-radius:5px;
|
||||||
border: 1px solid #9A9A9A;
|
border: 1px solid #7C7D8B;
|
||||||
color:#efefef;
|
color:#efefef;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -467,11 +472,11 @@ ul#user-menu-popup li a.nav-sep { border-top: 1px solid #989898; border-style:in
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 5px; /*10%*/
|
/*margin-right: 5px;/
|
||||||
/*width: 21%;*/
|
/*width: 21%;*/
|
||||||
width: 200px; /*250*/
|
width: 205px; /*250*/
|
||||||
margin-top: 40px; /*50*/
|
margin-top: 40px; /*50*/
|
||||||
font-size: 1.0em;
|
font-size: 0.9em;
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +521,7 @@ aside h4 { font-size: 1.3em; }
|
||||||
color: #626262;
|
color: #626262;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
.allcontact-link a {
|
.allcontact-link a {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
@ -769,9 +774,12 @@ ul .sidebar-group-li .icon{
|
||||||
/* ================== */
|
/* ================== */
|
||||||
|
|
||||||
.contact-block-img {
|
.contact-block-img {
|
||||||
width: 48px; /*42*/
|
width: 47px;
|
||||||
height: 48px;
|
height: 47px;
|
||||||
padding-right: 2px;
|
margin-right: 2px;
|
||||||
|
border: 1px solid #C5C5C5;
|
||||||
|
border-radius: 3px 3px 3px 3px;
|
||||||
|
box-shadow: 0 0 8px #BDBDBD;
|
||||||
}
|
}
|
||||||
.contact-block-div {
|
.contact-block-div {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -1092,9 +1100,10 @@ profile-jot-banner-wrapper {
|
||||||
.wall-item-location .icon { float: left; }
|
.wall-item-location .icon { float: left; }
|
||||||
.wall-item-location > a {
|
.wall-item-location > a {
|
||||||
margin-left: 0px; /*25*/
|
margin-left: 0px; /*25*/
|
||||||
|
margin-right: 2px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
display: block;
|
display: block;
|
||||||
/* font-variant:small-caps; */
|
font-variant:small-caps;
|
||||||
color: #898989;
|
color: #898989;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1776,12 +1785,13 @@ margin-left: 0px;
|
||||||
|
|
||||||
.mail-list-sender {
|
.mail-list-sender {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 5px;
|
padding: 2px;
|
||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
border: 1px dotted #eeeeee;
|
border: 1px solid #C5C5C5;
|
||||||
|
border-radius: 3px 3px 3px 3px;
|
||||||
|
box-shadow: 0 0 8px #BDBDBD;
|
||||||
-moz-box-shadow: 3px 3px 4px #959494;
|
-moz-box-shadow: 3px 3px 4px #959494;
|
||||||
-webkit-box-shadow: 3px 3px 4px #959494;
|
-webkit-box-shadow: 3px 3px 4px #959494;
|
||||||
box-shadow: 3px 3px 4px #959494;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-list-detail {
|
.mail-list-detail {
|
||||||
|
@ -3170,7 +3180,7 @@ a.active {
|
||||||
background:-moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
|
background:-moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
|
||||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1873a2', endColorstr='#6da6c4');
|
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1873a2', endColorstr='#6da6c4');
|
||||||
background-color:#1873a2;
|
background-color:#1873a2;
|
||||||
color:#efefef;
|
color:#fec01d;
|
||||||
padding: 5px 10px 5px 10px;
|
padding: 5px 10px 5px 10px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/*
|
/*
|
||||||
* Name: Smoothly
|
* Name: Smoothly
|
||||||
* Description: Theme optimized for iPad/iPad2
|
* Description: Theme optimized for iPad/iPad2
|
||||||
* Version: 0.5
|
* Version: 0.6
|
||||||
* Author: Alex <https://friendica.pixelbits.de/profile/alex>
|
* Author: Alex <https://friendica.pixelbits.de/profile/alex>
|
||||||
* Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
|
* Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
|
||||||
* Screenshot: <a href="screenshot.png">Screenshot</a>
|
* Screenshot: <a href="screenshot.png">Screenshot</a>
|
||||||
|
|
Loading…
Reference in a new issue